Removing an Inactive Replication Server

An inactive Replication Server is one that is not running. To take an inactive Replication Server out of service, you must drop and purge routes, and perform other tasks to safely remove the Replication Server from service.

  1. Drop all routes to the Replication Server.
    To do this, execute the drop route command with the with nowait option on each Replication Server that has a route to the Replication Server. For example:
    drop route to OLD_RS with nowait

    This command also deletes information about subscriptions created at OLD_RS for data managed by this Replication Server.

  2. If the Replication Server you are removing is primary for any function-string classes or error classes other than the system defaults, rs_default_function_class and rs_sqlserver_error_class, create a replacement for each class at a new primary. To do this:
    1. Choose a Replication Server that has routes to all other Replication Servers that use the class.
    2. Create a new class at that Replication Server containing the same function strings or error actions as the original class. See Replication Server Administration Guide Volume 2 > Customize Database Operations and Replication Server Administration Guide Volume 2 > Handle Errors and Exceptions.
    3. Alter each database connection that is using the original class to use the new class instead.
  3. On each Replication Server that has a route from the Replication Server, purge the Replication Server route.
    To purge a route, execute the sysadmin purge_route_at_replicate command on each Replication Server to which the Replication Server had a route. For example:
    sysadmin purge_route_at_replicate, OLD_RS
    This command also removes:
    • Subscription information for data originating at the Replication Server you are removing from service.

    • Function-string and error classes defined at the Replication Server you are removing from service. If the Replication Server is the primary site for rs_default_function_class, rs_sqlserver_function_class, or rs_sqlserver_error_class, these classes are not removed but are reset to have no primary Replication Server.

  4. Remove the Replication Server from the list maintained by the ID Server. To do this, execute the sysadmin droprs command on the ID Server:
    sysadmin droprs, replication_server

    See Replication Server Reference Manual > Replication Server Commands > sysadmin droprs.

  5. Remove all databases managed by the Replication Server from the database list maintained by the ID Server. Include the RSSD. To remove databases, run the sysadmin dropdb command on the ID Server, for each database:
    sysadmin dropdb, data_server, database

    See Replication Server Reference Manual > Replication Server Commands > sysadmin dropdb.

This completes the removal of an inactive Replication Server from a replication system.

Next
Keep in mind these three additional points:
Related concepts
Manage Database Connections