cdr autoconfig serv argument: Autoconfigure connectivity and replication (SQL administration API)

The cdr autoconfig serv argument with the admin() or task() function can autoconfigure connectivity for servers in a high-availability cluster or Enterprise Replication domain, and can autoconfigure replication.

Read syntax diagramSkip visual syntax diagram
Syntax

>>-EXECUTE FUNCTION--+-admin-+--(--'--cdr autoconfig serv--'---->
                     '-task--'                                 

>--+-------------------------------------------------------------------------+-->
   '-,'--+---------------------+--+-| Source options |---------------------+-'   
         '-| Connect Option  |-'  +-| Target options |---------------------+     
                                  '-| Source options |--| Target options |-'     

>--)--;--------------------------------------------------------><

Connect option

|--+- -c -server-------------+----------------------------------|
   +- --connect=server-------+   
   +- -c -server_group-------+   
   '- --connect=server_group-'   

Source options

|-- --sourcehost--host-- --sourceport--port---------------------|

Target options

|-- --targethost--host-- --targetport--port---------------------|

Element Purpose Restrictions
host The name of a database server host.  
port The port number that is used for communication  
server Name of the database server to connect to The name must be the name of a database server or server connection.
server_group Name of the database server group that includes the database server to connect to The name must be the name of an existing database server group.

The following table describes the options to cdr autoconfig serv.

Long Form Short Form Meaning
--sourcehost -H The host of the database server that is sending autoconfiguration information. If --sourcehost and --sourceport are not specified, the database server where the function is run is considered the source database server.
--sourceport -P The port that is used by the database server that is sending autoconfiguration information.
--targethost -h The host of the database server that is receiving autoconfiguration information.
--targetport -p The port that is used by the database server that is receiving autoconfiguration information.

Usage

Run the admin() or task() function with the cdr autoconfig serv argument can autoconfigure connectivity for servers in a high-availability cluster or Enterprise Replication domain, and can autoconfigure replication if you are adding database servers to an Enterprise Replication domain. The CDR_AUTO_DISCOVER configuration parameter must be set to 1 on all database servers that are participating in an Enterprise Replication domain, before you can run the admin() or task() function with the cdr autoconfig serv argument. A newly installed database server that is added to an Enterprise Replication domain through the cdr autoconfig serv argument must have a configured storage pool.

If the source server is already configured for Enterprise Replication, the function performs the following actions:
  1. The source server propagates its trusted-host file to target server.
  2. The target server adds entries for itself and all other replication servers to its sqlhosts file.
  3. The source server updates its sqlhost file with entries for the target server.
  4. Each replication server updates its sqlhost file and trusted-host file with entries for the target server.
  5. The target server sets its CDR_DBSPACE configuration parameter and creates the dbspace that is required for Enterprise Replication.
  6. The target server sets its CDR_QDATA_SBSPACE configuration parameter and creates the sbspace that is required for Enterprise Replication.
  7. The aborted transactions spooling (ATS) file directory $INFORMIXDIR/tmp/ats_dbservername is created on the target server.
  8. The row information spooling (RIS) file directory $INFORMIXDIR/tmp/ris_dbservername is created on the target server.
  9. Replication to the target server starts.
If the source server is not configured for Enterprise Replication, the function performs the additional actions:
  1. The source server adds entries for itself to its sqlhosts file.
  2. The source server sets its CDR_DBSPACE configuration parameter and creates the dbspace that is required for Enterprise Replication.
  3. The source server sets its CDR_QDATA_SBSPACE configuration parameter and creates the sbspace that is required for Enterprise Replication.
  4. The aborted transactions spooling (ATS) file directory $INFORMIXDIR/tmp/ats_dbservername is created on the source server.
  5. The row information spooling (RIS) file directory $INFORMIXDIR/tmp/ris_dbservername is created on the source server.
  6. Replication on the source server begins before replication on the target server begins.
The following restrictions apply to the admin() or task() function with the cdr autoconfig serv argument:
  • All replication servers must be active, or the function fails.
  • Do not run the admin() or task() function with the cdr autoconfig serv argument if you have configured trusted-host information, manually, rather than through running the admin() or task() function with the cdr add trustedhost argument.
  • Do not run the admin() or task() function with the cdr autoconfig serv argument if your replication servers have secure ports that are configured.
  • The admin() or task() function with the cdr autoconfig serv argument does not copy hosts.equiv information to the trusted-host file that is set by the REMOTE_SERVER_CFG configuration parameter. Run the admin() or task() function with the cdr add trustedhost argument if you must add information from the hosts.equiv file to the trusted-host file that is set by the REMOTE_SERVER_CFG configuration parameter.

Database servers are configured serially. Parallel configuration is not supported.

You can run this function as a cdr utility command.

Example 1: Configure Enterprise Replication on the local server

For this example, you have a local database server that is not configured for Enterprise Replication:

The following task function is run on the local server:

EXECUTE FUNCTION task('cdr autoconfig server');

The task function configures Enterprise Replication on the local server.

Example 2: Configure connectivity and ER between two stand-alone servers by using source syntax

For this example, you have two database servers:
  • server_1 on host_1 is configured for Enterprise Replication
  • server_2 on host_2 is not configured for Enterprise Replication
EXECUTE FUNCTION task('cdr autoconfig server', '--connect server_2
   --sourcehost host_1 --sourceport 9020');
The task function performs the following actions:
  1. The command connects to server_2.
  2. Enterprise Replication is defined on server_2.
  3. server_1 replicates its data to server_2

Example 3: Configure connectivity and ER between two stand-alone servers by using target syntax

The following command

EXECUTE FUNCTION task('cdr autoconfig server', '--connect server_1
   -–targethost host_2 --targetport 9030');
The task function performs the following actions:
  1. The command connects to server_1.
  2. Enterprise Replication is defined on server_2.
  3. server_1 replicates its data to server_2

Copyright© 2019 HCL Technologies Limited