An inactive Replication Server is one that is not running. To take an inactive Replication Server out of service, follow these steps:
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.
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:
Choose a Replication Server that has routes to all other Replication Servers that use the class.
Create a new class at that Replication Server containing the same function strings or error actions as the original class. See Chapter 2, “Customizing Database Operations” and Chapter 6, “Handling Errors and Exceptions” in the Replication Server Administration Guide Volume 2 for details.
Alter each database connection that is using the original class to use the new class instead. See Chapter 7, “Managing Database Connections” for details.
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.
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 the Replication Server Reference Manual for more information on the sysadmin droprs command.
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 the Replication Server Reference Manual for more information on the sysadmin dropdb command.
This completes the removal of an inactive Replication Server from a replication system.
Keep in mind these three additional points:
If you want to continue to replicate any data in the databases previously managed by the Replication Server, you must reassign those databases to some other Replication Server.
Since the subscriptions to the Replication Server data did not go through normal subscription dematerialization, replicate data has not been deleted from replicate Replication Servers.
You may need to create additional routes to maintain the replication system—for example, if the Replication Server is an intermediate on an indirect route.