rs_send_repserver_cmd

Executes replication definition change requests directly at the primary database.

Syntax

rs_send_repserver_cmd ‘rs_api

Parameters

Examples

Usage

  • Before you use rs_send_repserver_cmd at the primary database, use admin verify_repserver_cmd to verify that you can execute the replication definition request successfully at the Replication Server.

  • Replication Server supports rs_send_repserver_cmd for these replication definition commands:

    • alter replication definition

    • create replication definition

    • drop replication definition

    • alter applied function replication definition

    • create applied function replication definition

    • alter request function replication definition

    • create request function replication definition

    Note: Besides Adaptive Server, Replication Server extends support for rs_send_repserver_cmd to supported versions of these non-ASE databases: Microsoft SQL Server and Oracle. See the Release Bulletin for Replication Agent for the supported database versions.
  • When you execute rs_send_repserver_cmd at the primary database, the Replication Agent sends the RCL command stored in rs_api to the Replication Server, which then executes the RCL command. This ensures that Replication Server replicates the primary data with the proper replication definition version—primary data before the rs_send_repserver_cmd is replicated with the old replication definition version, while primary data after the rs_send_repserver_cmd is replicated with the new replication definition version.

  • You do not always need to issue replication definition change requests directly from a primary data server. For example, you can execute the alter replication definition request directly from the primary Replication Server in these situations:

    • If there is no subscription to the replication definition

    • If there are subscriptions to the replication definition, but there is no data in the primary database log for the table or stored procedure

    • If you are adding or dropping a searchable column to or from a table replication definition

    • If you are adding or dropping a searchable parameter to or from a function replication definition

    • If you are altering a replication definition to turn Dynamic SQL on or off

Warning!  As Replication Server accepts all commands that Replication Agent sends to Replication Server, you must control access to rs_send_repserver_cmd at the primary database.
Related reference
admin verify_repserver_cmd
alter replication definition
create replication definition
drop replication definition
alter applied function replication definition
create applied function replication definition
alter request function replication definition
create request function replication definition
sysadmin skip_bad_repserver_cmd