cdr autoconfig serv

The cdr autoconfig serv command can autoconfigure connectivity for servers in a high-availability cluster or Enterprise Replication domain, and can automatically configure replication.

Syntax


1  cdr autoconfig serv?  %Connect Option  (1)? 
2.1 %Source options
2.1 %Target options
2.1  %Source options %Target options
Source options

1   --sourcehost host  --sourceport port
Target options

1   --targethost host  --targetport port
Notes:
Element Purpose Restrictions
host The name of a database server host.
port The port number that is used for communication

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 command 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 cdr autoconfig serv command to autoconfigure connectivity for servers in a high-availability cluster or Enterprise Replication domain, and to 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 or high-availability cluster, before you can run the cdr autoconfig serv command. A newly installed database severs that is added to an Enterprise Replication domain through the cdr autoconfig serv command must have a configured storage pool.

If the source server is already configured for Enterprise Replication, the command 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 of the domain information in the syscdr catalog to the target server starts.
If the source server is not configured for Enterprise Replication, the command 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.
The following restrictions apply to the cdr autoconfig serv command:
  • All replication servers must be active, or the cdr autoconfig serv command fails.
  • Do not run the cdr autoconfig serv command 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 cdr autoconfig serv command if your replication servers have secure ports configured.
  • The cdr autoconfig serv command 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 command from within an SQL statement by using the SQL administration API.

Example 1: Define Enterprise Replication on a database server

For this example, you have one database server that is not configured for Enterprise Replication:
  • server_1 on host_1
The following command is run on server_1.
cdr autoconfig serv

The command defines Enterprise Replication on server_1.

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

For this example, you have two stand-alone database servers:
  • server_1 on host_1
  • server_2 on host_2
The following command is run on server_1:
cdr autoconfig serv -c server_2 --sourcehost host_1 --sourceport 9000
The command performs the following actions:
  1. The command connects to server_2.
  2. Enterprise Replication is defined on server_1.
  3. Enterprise Replication is defined on server_2.
  4. server_1 replicates the domain data to server_2.

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

For this example, you have two stand-alone database servers:
  • server_1 on host_1
  • server_2 on host_2
The following command is run on server_2:
cdr autoconfig serv -c server_1 --targethost host_2 -targetport 9002
The command performs the following actions:
  1. The command connects to server_1.
  2. Enterprise Replication is defined on server_1.
  3. Enterprise Replication is defined on server_2.
  4. server_1 replicates the domain data to server_2.

Example 4: Configure connectivity and ER between two stand-alone servers

For this example, you have three stand-alone database servers:
  • server_1 on host_1
  • server_2 on host_2
  • server_3 on host_3
The following commands are run on server_1:
cdr autoconfig serv --targethost hos_t2 -targetport 9002
cdr autoconfig serv --targethost host_3 -targetport 9003
The commands perform the following actions:
  1. The first command connects to server_1.
  2. Enterprise Replication is defined on server_1.
  3. Enterprise Replication is defined on server_2.
  4. server_1 replicates its data to server_2.
  5. The second command connects to server_1.
  6. Enterprise Replication is defined on server_3.
  7. server_1 replicates the domain data to server_3.