Removing an Active Replication Server

Drop subscriptions, replication definitions, connections, routes, and perform other tasks in the correct sequence to ensure you can safely remove an active Replication Server from service.

  1. Query the RSSD to determine what replication definitions are defined at the primary Replication Server (the server you are removing from service). You can use the rs_helprep stored procedure to do this. See Replication Server Reference Manual > RSSD Stored Procedures > rs_helprep and, see Replication Server Reference Manual > Replication Server System Tables
  2. Drop subscriptions and replication definitions.
    1. For each replication definition defined at the primary Replication Server, execute the drop subscription command for each subscription on all Replication Servers that manage subscribing data.

      To retain data at the replicate, execute the drop subscription command without purge.

      To delete data at the replicate, execute the drop subscription command with purge.

    2. Drop all replication definitions for primary data managed by the Replication Server (determined in step 1).

      Wait for the replication definitions to disappear from the RSSDs of Replication Servers that the Replication Server has a route to.

    3. At the Replication Server you are removing, drop all subscriptions to replication definitions on other Replication Servers.

      To retain data at the replicate, execute the drop subscription command without purge.

      To purge data at the replicate, execute the drop subscription command with purge.

  3. If the Replication Server is the primary Replication Server for a function-string class or error class, execute the move primary command at another Replication Server to change the primary Replication Server for each class.

    During a move primary operation, routes must exist from the old primary site to the new primary site, and from the new primary site to the old primary site. The Replication Server assuming the role of the primary site also must have routes to all of the same Replication Servers as the old primary site.

  4. Drop database connections.
    1. Stop all RepAgents connected to the Replication Server, using the sp_stop_rep_agent system procedure at Adaptive Server.
    2. Remove connections to all databases managed by this Replication Server, using the drop connection command.
    Note: If you want to continue to maintain the replicate data in databases previously managed by a Replication Server that has been removed from service, you must create connections to those databases from some other Replication Server and create new subscriptions.
  5. Perform the following routing tasks:
    1. If the Replication Server is an intermediate site in a route, use the alter route command so it is no longer an intermediate site.
    2. Drop all routes from the Replication Server.

      To do this, execute the drop route command for each route from the Replication Server to another Replication Server.

    3. Drop all routes to the Replication Server.

      To do this, execute the drop route command on each Replication Server that has a route to the Replication Server you are removing.

  6. After all subscriptions and routes to and from the Replication Server are dropped, 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.

  7. 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.

Related concepts
drop subscription Command
Manage Routes