set replication

Description

A Transact-SQL command that enables or disables replication of data definition language (DDL) and/or data manipulation language (DML) commands to the standby database for the current isql session.

Syntax

set replication [on | force_ddl | default | off]

Parameters

on

Enables replication of DML commands for tables marked with sp_setreptable, if sp_reptostandby is set to “none.” If sp_reptostandby is set to “L1” or “all,” enables replication of DML and DDL commands to the standby database. This is the default setting.

force_ddl

Always enables replication of DDL commands for the current session. If sp_reptostandby is set to “L1” or “all,” DML commands are replicated for all user tables. If sp_reptostandby is set to “none,” DML commands are replicated for tables marked with sp_setreptable.

NoteBeginning with Replication Server version 12.0, force_ddl as used in the command set replication force_ddl is no longer a reserved word. This does not affect set replication force_ddl functionality; you no longer have to use double quotes when using force_ddl in other object names.

default

Turns off force_ddl and returns set replication status to “on”—the default.

off

Turns off replication of marked tables and user stored procedures for the current session. No DML commands and no DDL commands are copied to the standby or replicate database.

Usage

Permissions

set replication requires “sa” or “dbo” permission and replication_role.

See also

sp_reptostandby, sp_setreptable