set repmode

Enables or disables, at the session level, the replication of update, delete, insert select, or select into as SQL statements.

Syntax

set repmode {“on” SQLDML_option | “never” | “off” | ‘threshold’, ‘value’}
SQLDML_option ::= { U | D | I | S }

Parameters

Examples

Usage

  • You can set the session-level options either at login by using a “login trigger”, or at the beginning of a batch. Your session settings overwrites the table or database settings.

  • Session-level settings are active only for the duration of the session. When you set the options inside a stored procedure or a trigger, the settings are reverted back to the table-level or database-level settings when the stored procedure or trigger execution terminates.

Related reference
sp_setrepdbmode
sp_setrepdefmode