Skip to content

Configuring the Replicator Environment

Steve Ives edited this page Sep 25, 2023 · 12 revisions

The replicator process can be configured either via command line options or by setting environment variables. In all cases command line options override the equivalent environment variables.

Main Settings

These settings allow you to configure the basic environment in which the replicator runs.

Environment Variable Command Line Option Description
REPLICATOR_COMMIT_MODE -commitmode <value> Set to AUTOMATIC, BATCH (default) or MANUAL to specify how are changes are committed to the database. Refer to database commit modes for more information.
REPLICATOR_DATA -datadir <dir> Sets the location of the replication instruction file.
REPLICATOR_DATABASE -database <connect_string> Connect string identifying the database to connect to.
REPLICATOR_DATABASE_TIMEOUT -timeout <seconds> Sets the database operation timeout in seconds (default 60).
REPLICATOR_INSTANCE -instance <instance_name> Name of this replicator instance (optional).
REPLICATOR_INTERVAL -interval <sleep_seconds> Sets the replicator sleep time in seconds (default 60).
REPLICATOR_ERROR_STOP -stoponerror Set to YES to stop the replicator if an error is encountered.
REPLICATOR_DATA_COMPRESSION -datacompression Set to YES to enable page mode data compression for all tables and indexes

Bulk Load Settings

These settings allow you to enable and configure the use of the "bulk load" mechanism.

Environment Variable Command Line Option Description
REPLICATOR_BULKLOAD_TIMEOUT -bulkloadtimeout <seconds> Changes the timeout period for bulk load and indexing operations. The default value is 900 seconds.
REPLICATOR_BULKLOAD_BATCHSIZE -bulkloadbatchsize <rows> Sets the number of rows per batch for BULK INSERT statements. The default value is 0, which disables batch processing.
REPLICATOR_EXPORT_LOCAL -localexport <export_path> Location where bulk export files will be created locally.
REPLICATOR_FILESERVICE_HOST -fileservicehost <host> DNS name or TCP/IP address of the database server where an instance of FileService is running to support bulk uploads. On OpenVMS if you use a TCP/IP address you must enclose it in quotes.
REPLICATOR_FILESERVICE_PORT -fileserviceport <port> TCP/IP port number that FileService is listening on. If not specified the default port is 8080.
REPLICATOR_LOG_BULK_LOAD_EXCEPTIONS -loaderrors Log failing records during a bulk load operation to a file.

Log File Settings

These settings allow you to enable and configure the logging of messages to a log file.

Environment Variable Command Line Option Description
REPLICATOR_LOGDIR -logdir <log_location> Location where the log file should be created. A full or relative path, or an environment variable followed by a colon.
REPLICATOR_LOG_KEYS -keyvalues Should key values ve logged as transactions are processed? Set the environment variable to YES to enable. Avoid doing this in production environments as the performance overhead can be significant.
REPLICATOR_FULL_LOG -verbose Enable verbose logging. Set the environment variable to YES to enable. Avoid doing this in production environments as the performance overhead can be significant.

System Logging Settings

This setting allows you to enable the logging of messages to the system log (System Event Log on Windows, syslog on UNIX, or the Operator Log on OpenVMS).

Environment Variable Command Line Option Description
REPLICATOR_SYSTEM_LOG -syslog Set to YES to write log to the system log (SYN_REPORTEVENT) in addition to the replicator log.

Email Notification Settings

These settings allow you to configure the sending of SMTP email messages when certain major events occur. The SMTP server must accept and relay messages from unauthenticated clients, which is becoming rare.

Environment Variable Command Line Option Description
REPLICATOR_SMTP_SERVER -mailserver <smtp_server> DNS name or IP address of the SMTP mail server that will be used to send messages.
REPLICATOR_EMAIL_SENDER -mailfrom <email_address> Email address that replicator messages should be sent FROM.
REPLICATOR_ERROR_EMAIL -erroremail <email_address> Email address that start, error and stop messages should be sent TO.

Database Reconnect Settings

These settings allow you to configure how the replicator process reacts if the connection to the database is lost.

Environment Variable Command Line Option Description
REPLICATOR_RECONNECT_ATTEMPTS -reconnectattempts <n> Maximum attempts to reconnect a lost database connection (default 10).
REPLICATOR_RECONNECT_DELAY -reconnectdelay <seconds> Seconds between database reconnect attempts (default 30).

Instruction Queue Reconnect Settings

These settings allow you to configure how the replicator process reacts if the connection to a remote (via xfServer) instruction queue file is lost.

Environment Variable Command Line Option Description
REPLICATOR_QRECONNECT_ATTEMPTS -qreconnectattempts <n> Maximum attempts to reconnect a lost instruction queue connection (default 10).
REPLICATOR_QRECONNECT_DELAY -qreconnectdelay <seconds> Seconds between remote instruction queue reconnect attempts (default 30).

SQL Connection Configuration Settings

These settings allow you to override default maximums in the Synergy SQL Connection API.

Environment Variable Command Line Option Description
REPLICATOR_MAX_COLS -maxcolumns <max_columns> Maximum number of columns in a database table (default 254).
REPLICATOR_MAX_CURSORS -maxcursors <max_cursors> Maximum number of database cursors (default 128). Allow 4 per table.
Clone this wiki locally