move primary

Description

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

Permissions

move primary requires “sa” permission.

See also

alter route, assign action, create error class, create function string class