cdr disable server

The cdr disable server command disables replication on a server.

Syntax


1  cdr disable server?  %Connect Option  (1)?   --local  server_group
Notes:
Element Purpose Restrictions Syntax
server_group Name of the database server on which to disable replication. Must be the name of an existing database server group in sqlhosts. Long Identifiers

The following table describes the cdr disable server option.

Long Form Short Form Meaning
--local -l Disables the specified replication server. Must be run on both the replication server to disable and another replication server in the domain. Use this option if the connection is down between the replication server to disable and other replication servers.

Usage

Use the cdr disable server command when you need to temporarily stop replication and your replicates use the time stamp or delete wins conflict resolution rule.

When you run the cdr disable server command, the replication server is disabled and the rest of the replication domain is notified that the server is disabled.

If the replication server that you want to disable is not connected to the replication domain, you must run the cdr disable server command with the --local option on both the replication server to disable and another replication server in the domain. If the server on which you need to disable replication is currently offline, then run the cdr disable server command with the --local option on it after you restart it.

Disabling replication has the following effects:

  • There is no connection between the disabled replication server and active replication servers.
  • Transactions on the disabled replication server are not queued for replication
  • Transactions on active replication servers are not queued for the disabled replication server.
  • Control messages on active replication server are queued for the disabled replication server.
  • Information about deleted rows on the disabled replication server is saved in delete tables.
  • You can run only the following Enterprise Replication commands on the disabled replication server:
    • cdr enable server
    • cdr stop server
    • cdr delete server
    • cdr check replicateset with the --repair and the --enable options

You must synchronize the server after you enable replication on it. Shutting down and restarting the disabled replication server does not enable replication. You can both enable and synchronize a disabled replication server by running the cdr check replicateset command with the --repair and the --enable options. Alternatively, you can run the cdr enable server command and then synchronize the server.

Example 1: Stopping replication on a connected server

The following command disables the server, g_cdr1, which is connected to the replication domain:

cdr disable server -c g_cdr1 g_cdr1

Example 2: Stopping replication on a disconnected server

The following commands disable the replication server, g_cdr1, which is not connected to the replication domain:

cdr disable server -c g_cdr1 --local g_cdr1
cdr disable server -c g_cdr2 --local g_cdr1

The first command runs on the server g_cdr1 and disables replication on it. The second command runs on the server g_cdr2 and stops the other servers in the replication domain from queuing transactions for the server g_cdr1.