Product Documentation

FairCom DB V12 Updates

Previous Topic

Next Topic

Dynamically Set Replication Node ID (REPL_NODEID) at Runtime

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