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 new primary site to each Replication Server that will use the error class
The current primary to the new primary site
The new primary to the current primary site
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.
class_ name – the name of the error class whose primary Replication Server is to be changed.
replication_server – specifies the new primary Replication Server 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.