Changing the primary Replication Server for an error class

Use the move primary command to change the primary site for an error class. This is necessary when you are changing the primary site from one Replication Server to another so that error actions can be distributed through new routes. For example, you must use this command if you are dropping from the replication system the Replication Server that is the current primary site for an error class.

Before you execute move primary, make sure that a route exists from:

The syntax for the move primary command, for error classes, is:

move primary
   of [replication server] error class class_name
   to replication_server

Execute the move primary command at the Replication Server that you want to designate as the new primary site for the error class.

The following command changes the primary site for the pubs2_error_class error class to the TOKYO_RS Replication Server where the command is entered:

move primary of error class pubs2_error_class
 to TOKYO_RS

For the default error class, rs_sqlserver_error_class, no Replication Server is the primary site until you assign one as the primary site. You must specify a primary site before you can use the assign action command to change default error actions.

To specify a primary site for the default error class, execute the following command in that Replication Server:

create error class rs_sqlserver_error_class

After you have executed this command, you can use the move primary command to change the primary site for the error class.