Connecting to Your Database with lmcfg.txt
The lmcfg.txt file defines the database type, name and authentication information that ListManager will use when connecting to your database. The installer will insert the values you choose as part of the installation process. To change the SQL server, database, user or password, use a plain text editor to edit the lmcfg.txt file.
Each variable is given a "$name", followed by an equals sign (=) and the value, in quotation marks. A semicolon (;) should be at the end of each line. All lines which begin with a hash (#) are commented out, and not read when connecting to the database.
$node_name
The $node_name variable specifies the machine name of this ListManager instance. If you are running ListManager in a clustered configuration, each node must have a distinct node name. This name is usually the machine's hostname.
Do not edit or change the node name! If you do so, ListManager will create a new node in the database with no configuration information. ListManager will not function properly until the node is removed. See Database Operations for more information about the renamenode function.
$sql_type
The $sql_type variable defines which database driver ListManager should use. Valid values for $sql_type are:
"MSSQL" - Native Microsoft SQL Server.
"Oracle" - Native Oracle OCI driver.
"Postgres" - Native PostgreSQL driver.
Example:
$sql_type="MSSQL";
$sql_server
The $sql_server value is the host name of the machine running the your SQL server software. This value should be blank if the database is local for PostgreSQL, MSDE, or Microsoft SQL Server. Example:
$sql_server="mysqlserver.example.com";
$sql_user
The $sql_user value is the login name of the user to connect to the database. This user must have full permissions to create/delete/modify values in this database. May be blank if using MSSQL and integrated security. Example:
$sql_user="lyris";
$sql_encoded_user
This value is the encrypted login name of the user to connect to the database. The user name may be encrypted by running lm encode_string from the command prompt. The encrypted string may then be used in the lmcfg.txt file for a more secure login to ListManager, as the SQL database user will not be passed in clear text to ListManager. The $sql_user value should not be used or commented out when using $sql_encoded_username. Example:
$sql_encoded_user="we418c53"
$sql_password
The $sql_password value is the login password of the user to log in as. May be blank if using MSSQL and integrated security. Example:
$sql_password="lyrissqlpassword";
$sql_encoded_password
This value is the encrypted password of the user to connect to the database. The password may be encrypted by running lm encode_string from the command prompt. The encrypted string may then be used in the lmcfg.txt file for a more secure login to ListManager, as the SQL database password will not be passed in clear text to ListManager. The $sql_password value should not be used or commented out when using $sql_encoded_username. Example:
$sql_encoded_password="we418c53"
$sql_database
The $sql_database value is the name of the database ListManager should use. This value is ignored by Oracle. Example:
$sql_database="listmanager";
$sql_askpassword
The $sql_askpassword option causes ListManager to ignore $sql_password and prompt for the SQL database password on the console. The $sql_password parameter is only valid when starting ListManager from the console, not when starting as a service or as a daemon. This feature enables ListManager to be run without having the SQL database password saved unencrypted in the lmcfg.txt file.
To enable this option, enter the variable and set to "yes". Example:
$sql_askpassword="yes"
$sql_pool
The $sql_pool value is the maximum size of the connection pool that ListManager will keep. This allows ListManager to recycle connections rather than creating a new connection for every command. Example:
$sql_pool="25";
With the exception of the MSDE server which is optimized for 8 connections, a setting of 25 will give good performance for most database connections. By default, the $sql_pool value is set to 8 for MSDE installations and 25 for all other installations. The minimum number of database connections typically in use by ListManager is 15. Even if you set a number lower than this, ListManager will set to 15 (8 for MSDE).
$log_startup_messages
If set to "no", the ListManager startup messages will not be logged, either to the console or the log file. Example:
$log_startup_messages="no"
$log_directory
The $log_directory value is the directory where log files will be placed. For example, "/var/log/lm" or "C:\lm\log." Log file names have the format "lognnnn.txt" where "nnnn" is a positive integer. If not set the log files will be placed in the same directory as the ListManager executable.
$log_new_file_on_startup
The $log_new_file_on_startup value should be "yes" or "no." When set to "yes" a new log file will be created each time ListManager is run. When set to "no" ListManager will append to the latest log file. If not set ListManager will create a new log file on startup.
Database Timeout Values
If your database is exceptionally large, you may experience performance issues. In extreme cases, the web server can lock up waiting for a database connection due to long running database queries. To prevent this, you can specify database timeouts as options in the lmcfg.txt file. These options initialize the timeout values and the size of the reserved pool. They are recommended values; you can fine-tune as necessary.
NOTE You can also set these values in ListManager. The time in both places is measured in seconds.
$sql_reserved_pool = "1";
$sql_default_pool_timeout = "-1"; // indefinite (default).
$sql_default_command_timeout = "3600"; // 2 hrs.
$sql_list_posting_timeout = "3600"; // 2 hrs.
$sql_nightly_job_timeout = "3600"; // 2 hrs.
$sql_incremental_update_timeout = "600"; // 10 minutes
$sql_tclport_pool_timeout = "60"; // 1 minute
$sql_tclport_command_timeout = "60"; // 1 minute
$sql_master_thread_pool_timeout = "1"; // 1 second
$sql_master_thread_command_timeout = "1"; // 1 second
Descriptions:
$sql_reserved_pool: This is not a timeout. It is a count of the number of database connections to be used by certain processes.
$sql_default_pool_timeout: Pool timeouts not defined by any other timeout type.
$sql_default_command_timeout: Command timeouts not defined by any other timeout type.
$sql_list_posting_timeout: Task that handles the processing of an incoming mailing.
$sql_nightly_job_timeout: Used for nightly jobs.
$sql_incremental_update_timeout: Update summary statistics for only those mailings that have
changes since the previous update.
$sql_tclport_pool_timeout: Timeout to get a TCL port command connection.
$sql_tclport_command_timeout: Timeout when TCL port command takes too long. Used for GUI (web
server) transactions (HTTP GETs and REQUESTs).
$sql_master_thread_pool_timeout: Timeout to get a master thread command connection.
$sql_master_thread_command_timeout: Timeout when Master thread command takes too long. Used
to accept incoming socket connections.
ANSI-Related Settings
The following ANSI-related settings are necessary for the situation where tables on remote database servers are connected to directly through fully qualified schema names, or indirectly through linked server tables. They are only applicable for the Microsoft SQL Server version of ListManager 9.3. They address errors such as the following:
Database error information:
msgno: 7405
msgstate: 1
severity: 16 - Generated by user and can be corrected by the user
msgtext: Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query.
$sql_ansi_nulls
The $sql_ansi_nulls value controls the ANSI_NULLS setting for the session connection. When set to ON, all comparisons to a null value evaluate to NULL (unknown). When set to OFF, comparisons of non-Unicode values to a null value evaluate to TRUE if both values are NULL. By default, the ANSI_NULLS database option is OFF.
$sql_ansi_nulls="on";
$sql_ansi_padding
The $sql_ansi_padding value controls the ANSI_PADDING setting for the session connection. When set to ON, trailing blanks in character values inserted into varchar columns and trailing zeros in binary values inserted into varbinary columns are not trimmed. Values are not padded to the length of the column. When set to OFF, the trailing blanks (for varchar) and zeros (for varbinary) are trimmed. This setting affects only the definition of new columns.
$sql_ansi_padding="on";
$sql_ansi_warnings
The $sql_ansi_warnings value controls the ANSI_WARNINGS setting for the session connection. When set to ON, errors or warnings are issued when conditions such as "divide by zero" occur or null values appear in aggregate functions. When set to OFF, no warnings are raised when null values appear in aggregate functions, and null values are returned when conditions such as "divide by zero" occur. By default, ANSI_WARNINGS is OFF.
$sql_ansi_warnings="on";
Specifying lmcfg.txt on Startup
You can specify a different lmcfg.txt file by adding a command-line argument. This option allows programmers to have different icons on the desktop for different lmcfg.txt files.
You can use an alternate configuration file using the cfgfile command-line option. The file to load is specified after the "cfgfile" command-line argument. For example:
lm.exe start cfgfile mycfg.txt
The cfgfile arg can appear anywhere in the command line, and must be a relative path.