cdr delete server

The cdr delete server disables a database server from participating in Enterprise Replication.

Syntax


1  cdr delete server?  %Connect Option(1)?   --force  server_group
Notes:
Element Purpose Restrictions Syntax
server_group A database server's group entry in its ONEDB_ SQLHOSTS file and the global catalog. Long Identifiers

The following table describes the option to the cdr delete server command.

Long Form Short Form Purpose
--force -f Remove an inactive Enterprise Replication server from the global catalog. You must use this option for standard servers that were converted from high-availability cluster servers.

Usage

The cdr delete server command disables a database server from to participating in Enterprise Replication. Use the --force option to disable an inactive replication server or to remove Enterprise Replication from a standard server that has been converted from a high-availability cluster server by the oninit -d standard command. You cannot delete a server that has non-root or leaf children under it. You must delete the children of a server before deleting the parent server.

The cdr delete server command generates event alarms with class IDs of 67 and 71, if the alarms are enabled.

You can run this command from within an SQL statement by using the SQL administration API.

To remove a server from an Enterprise Replication domain, run the cdr delete server command two times:
  1. Run the command on the database server being removed, to disable it. This command does not propagate to other database servers in the domain.
  2. Run the same command on a different server within the Enterprise Replication domain. This removes the disabled database server from the domain.
To remove an entire Enterprise Replication domain, run the cdr delete server command once on each replication server. The cdr delete server command performs the following tasks on each server:
  1. Drops the Enterprise Replication connection to other hosts in the domain. A 25582 error and an operating system error might be printed to the online log.
  2. Removes Enterprise Replication information, including delete tables and shadow columns.
  3. Shuts down Enterprise Replication, if it is running.
  4. Drops the local copy of the global catalog.
When you run the cdr delete server command on a different root server within an Enterprise Replication domain, the command performs the following tasks:
  1. Deletes the command-specified database server from the global catalogs of all other servers in the domain.
  2. Removes the command-specified database server from all participating replicates.
  3. Purges all replication data destined for the command-specified database server from the send queues of all other servers in the domain.
Attention: Do not delete a replication server and immediately re-create it with the same name. If you re-create the objects immediately (before the operation finishes propagating to the other Enterprise Replication database servers in the domain), failures might occur in the Enterprise Replication system at the time of the operation or later.
Important: If you are creating a replication server to replace the one you deleted, use the cdr check queue --qname=ctrlq command to make sure that the delete operation propagated to all the servers.

Example 1: Removing a single database server from the domain

This example removes the database server g_italy from the Enterprise Replication environment. The commands are issued from g_usa:
cdr delete server -c italy g_italy
cdr delete server -c usa g_italy

The first command connects to database server g_italy and disables Enterprise Replication by removing the syscdr database and removing or stopping other Enterprise Replication components.

The second command performs the following actions:
  • Removes g_italy from the g_usa global catalog
  • Drops the connection between g_usa andg_italy
  • Removes g_italy from all participating replicates
  • Purges the replication data destined for g_italy from send queues
  • Broadcasts the delete command to all the other database servers in the Enterprise Replication domain so that the other servers can perform the same actions

Example 2: Removing the whole domain

The following illustration shows a replication environment with three replication servers, g_usa, g_italy, and g_japan.
Figure 1: Three Replication Servers

The image is described in the surrounding text.
To remove Enterprise Replication from every server in the domain, issue the cdr delete server command while connecting to each server. For example, from the computer containing the g_usa replication server, run these commands to remove Enterprise Replication and eliminate the domain:
cdr delete server -c italy g_italy
cdr delete server -c japan g_japan
cdr delete server g_usa

Example 3: Removing Enterprise Replication from a high-availability server

In this example, the replication server group g_usa contains two servers that participate in a high-availability cluster: a primary (usa_p) and a secondary (usa_s). After usa_s is converted to a stand-alone server, the following command removes Enterprise Replication from it:
cdr delete server -c usa_s -f g_usa