move primary

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

Examples

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.

Related reference
alter error class
alter route
assign action
create error class
create function string class