Enable SQL Statement Replication at the Database-level

Use sp_setrepdbmode to enable SQL statement replication at the database-level for a specific DML operation.

The DML operations that apply to SQL statement replication include:

For example, to replicate delete statements as SQL statements and also enable replication of select into, enter:

sp_setrepdbmode pdb, 'DS', 'on'

When an user executes a delete on a table in database pdb, Adaptive Server logs additional information for SQL statement replication. The RepAgent sends both individual log records, and the information needed by the Replication Server, to build the SQL statement.You can set SQL statement replication at the database level only when the database has been marked for replication by setting sp_setreptostandby to ALL or L1.

The threshold parameter defines the minimum number of rows that a DML statement must affect, to activate SQL statement replication. The default threshold is 50 rows, which means that Adaptive Server automatically uses SQL statement replication if the DML statement affects at least 51 rows.

For example, to set the threshold at the database-level to trigger SQL statement replication when a data manipulation language (DML) statement affects more than 100 rows:

sp_setrepdbmode pubs2, ‘threshold’, ‘100’
go

See Replication Server Reference Manual > Adaptive Server Commands and System Procedures > sp_setrepdbmode.

Related concepts
Set SQL Statement Replication Threshold