Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

REPL_NODEID

REPL_NODEID <nodeid>

The FairCom Server assigns a node ID to FairCom Replication. The Local/Master replication scheme also assigns a node ID to connections that are established from the target server to the source server.

A local c-tree Server can set its replication node ID by using the REPL_NODEID option in ctsrvr.cfg. For example, consider a source server and two target servers:

; source server configuration

SERVER_NAME MASTER

REPL_NODEID 10.0.0.1


; target server 1 configuration

SERVER_NAME LOCAL01

REPL_NODEID 10.0.0.2


; target server 2 configuration

SERVER_NAME LOCAL02

REPL_NODEID 10.0.0.3

ID values are arbitrary and do not need to match the IP address of the system on which the c-tree Server is running. They only need to be unique and not change during replication. (This example demonstrates IP v4 addresses.)

FairCom Replication reads the node ID of the source and target servers. If the node ID is not set for a source or target server, FairCom Replication uses the IP address of the system on which that FairCom DB is running.

Note: REPL_NODEID should be used if the entry for source_server or target_server in ctreplagent.cfg does not specify an IP address (e.g., if localhost or the DNS name is used).

Dynamically Set Replication Node ID

A replication node ID value (REPL_NODEID) associates a Replication Agent to a specific source or target server. Having this required association prevents Replication Agents from arbitrarily connecting to inappropriate servers. Setting a REPL_NODEID required modifying the server configuration file, ctsrvr.cfg, and restarting a server, which is challenging in round-the-clock production environments.

c-tree Server now supports setting a REPL_NODEID value dynamically at runtime if it has not yet been set. This keyword sets the node ID of a local c-tree Server for use in replication.

To set the value, use the ctadmn utility's option to change a server configuration option value using option 10 or call the ctSETCFG() function as shown here:

NINT rc;

rc = ctSETCFG(setcfgCONFIG_OPTION, value);

where value is the REPL_NODEID value to set, specified as a NULL-terminated string in IPv4 format (n.n.n.n.), for example "10.0.0.1". (ID values are arbitrary and do not need to match the IP address of the server.)

Note that the value is only changed in memory and not persisted to disk. Be sure to update the configuration file such that the new value is persisted and enabled on the next server startup.

TOCIndex