DBD: Data Replication System - Set up Data Replication Parameters (Optional)

1: How to set Data Replication parameters

There are several parameters that can be modified to change the behavior of Data Replication:

  • Queue entries to process before resetting server
  • Maximum age of server process (in seconds)
  • Maximum age of database connections (in seconds)
  • O/S Error Command

You can change these parameters by executing the Parameters utility as follows:

GUI: DB Distributor Optional Modules > Data Replication > Setup > Parameters

CHUI: D/R menu, option SP

2: Define the maximum number of Queue entries

Queue entries to process before resetting server

Each Data Replication server will process this many entries from the Data Replication Queue, then will restart itself so that all of its information will be refreshed to pick-up any changes in parameters or table replication information and to re-establish connections to the database.

Range of values is 0 … 9999 (0 will default to 10000). Most users set this to “0100."

3: Set the maximum age of the server process

Maximum age of server process (in seconds)

The Data Replication process is a long running process and there may be a need for periodically restarting the process without manual intervention for housekeeping purposes (cleaning up internal variables, closing and reopening stale connections, etc.). This parameter allows you to adjust the maximum amount of time (in seconds) the Data Replication server is allowed to run before it is automatically restarted.

Range of values is 0 … 9999 (0 will default to 10000). Most users set this to “0100."

4: Set the maximum age of database connections

Maximum age of database connections (in seconds)

The Data Replication server process uses cached connections for optimum performance and efficiency reasons when replicating to an external database. It is possible to enforce a maximum age (in seconds) for cached database connections. Cached connections can be forced to automatically close every time they grow older than the specified age.

The Data Replication server process is subsequently forced to initiate a fresh connection to the external database when a cached connection is closed. The number of seconds specified is the maximum amount of time that any cached connection can stay open and be reused.

Setting this value to 0 seconds disables the maximum age check for cached connections. The largest permitted value for this parameter is 9999 seconds (approximately 2 hours and 47 minutes).

Every time a cached connection is retrieved for use in the Data Replication server process, the process will check to see if the connection has been open for more than the maximum age. If this is true, then the connection is closed and a fresh connection is opened for use.

If this parameter is in use and if a cached connection happens to be closed because its age exceeds the maximum age limit, a log file entry will be written to the Data Replication server log.

A sample log file entry of this message is shown below:

CONNECTION|2012-06-05 13:51:12|ICF500 55|MAX AGE (contd.) CHECK|OPENED|15496|49790|NOW|15496|49872|EXPIRED|

In the above example, the following fields represent the Julian day and time in seconds (starting at midnight), respectively. Together they are used to compute the age of the cached connection:

OPENED|15496|49790|NOW |15496|49872|

5: Define a special O/S Error Command

O/S Error Command

If the field is not blank, then this is the external operating system command to run whenever an error is encountered while processing a Data Replication entry.

Information about the error will be substituted for the following tokens:

&QUE_KEY Value of the key used to put entry into Data Rep Queue
&QUE_COMMAND The Queue command "W"rite or "D"elete
&TABLE_NAME Name of Table to be updated
&DATA_KEY Key of the entry being replicated
&DATA_VALUE Data of the entry being replicated
&ERR_MSG The error message that was received

For example, the following “bash” shell syntax could be used to concatenate several fields of information (including the name of the table, the key to the entry being replicated and the received error message) and write them to a specified log file:

echo &TABLE_NAME &DATA_KEY &ERR_MSG > /tmp/kmc.log

The maximum allowed length for the command is 120 characters.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.