Show TOC

move primaryLocate this document in the navigation structure

Changes the primary Replication Server for an error class or a function-string class.

Syntax
move primary
 of {[replication server] error class | function string class} <class_name
 >to <replication_server>
Parameters
replication server

Specify to modify a Replication Server error class. Leave out to modify a data server error class.

error class

Specifies that the primary Replication Server for an error class is to be changed.

function string class

Specifies that the primary Replication Server for a function-string class is to be changed.

class_name

The name of the error class or function-string class whose primary Replication Server is to be changed.

replication_server

Specifies the new primary Replication Server for the error class or function-string class. It is the name of the Replication Server where the command is executed, since move primary must be executed at the new primary Replication Server.

Examples
Example 1

Changes the primary Replication Server for the <pubs2_db_err_class> error class to the SYDNEY_RS Replication Server. The command is entered at SYDNEY_RS:

move primary
   of error class pubs2_db_err_class
   to SYDNEY_RS
Example 2

Changes the primary Replication Server for the Replication Server error class <my_rs_error_class> to the SYDNEY_RS Replication Server. The command is entered at SYDNEY_RS:

move primary 
   of replication server error class my_rs_error_class
   to SYDNEY_RS
Example 3
Changes the primary Replication Server for the <sqlserver2_function_class> function-string class to the SYDNEY_RS Replication Server. The command is entered at SYDNEY_RS:
move primary
   of function string class sqlserver2_function_class
   to SYDNEY_RS
Usage
  • If you have changed the routing configuration, use move primary to ensure that error responses and function strings are distributed, via the new routes, to the Replication Servers where they are needed.

  • move primary must be executed at the new primary Replication Server.

  • move primary can be used to change the primary Replication Server from A to B only if routes exist from A to B and from B to A.

  • There is no primary site for the system-provided <rs_sqlserver_function_class> until you assign one. <rs_default_function_class> and <rs_db2_function_class> are system-provided, cannot be modified, and have no primary site.

  • The primary site for a derived function-string class is the site of its parent class, unless the parent class is <rs_default_function_class> or <rs_db2_function_class>. In that case, the primary site of the derived class is the site where it was created.

  • If you use <rs_sqlserver_function_class>, you must specify a primary site before you can modify a default function-string. To specify a primary site for the function-string class, execute create function string class rs_sqlserver_function_class at the primary site. Then use the move primary command to change the primary site for the class.

  • There is no primary site for the default error class, <rs_sqlserver_error_class> and <rs_repserver_error_class>, until you assign one. You must specify a primary site before you use assign action to change default error actions. To specify a primary site, execute create error class rs_sqlserver_error_class or create replication server error class rs_repserver_error_class at the primary site. Then you can use move primary to change the primary site.

Permissions

move primary requires “sa” permission.