Changes or displays the owner status of tables marked for replication, and enables or disables table-level SQL statement replication for a specific DML operation.
sp_setrepdefmode table_name [, 'owner_on' | 'owner_off' | ‘SQLDML_option [SQLDML_option [ ...]]’ [, ‘on’ | ‘off’ | ‘never’ ] | ‘threshold’, ‘value’]
SQLDML_option ::= { U | D | I }
When the table replication mode is set to any combination of UDI the RepAgent sends additional information to enable SQL statement replication for the specified DML operation.
1> sp_setrepdefmode t, 'UDI', 'on' 2> go
sp_setrepdefmode t, 'threshold', '10'
1> sp_setrepdefmode rs_ticket_history,'udi' 2> go
The replication status for 'rs_ticket_history' is currently owner_off, 'udi'. The replication threshold for table 'rs_ticket_history' is '0'. (return status = 0)
sp_setrepdbmode t, 'threshold', '0'
Use sp_setrepdefmode with RepAgent-enabled Adaptive Server databases.
If sp_setrepdefmode is executed with the table name only, it displays the SQL replication settings and owner status of the table.
Use sp_setrepdefmode to change the mode of the table. You cannot change the owner mode of tables with sp_setreptable.
If the owner_off option is supplied and the current mode of the table is “owner on,” sp_setrepdefmode checks that the table name is unique among all replicated tables in owner off mode. If the name is unique, sp_setrepdefmode changes the table mode to owner off. If the name is not unique, the procedure fails.
The default threshold is 50 rows, which means that Adaptive Server uses SQL statement replication if the DML statement affects at least 51 rows. To use the default threshold, set the threshold parameter to 0. The threshold parameter range is 0 to 10,000.