Changes or displays the owner status of tables marked for replication.
sp_setrepdefmode table_name [,{'owner_on' | 'owner_off'}]
The name of a table in the current database that has been marked for replication with sp_setreptable.
Changes the owner status of the table so the table name and owner name are considered when the table is marked for replication. Enables replication of multiple tables of the same name with different owners.
Changes the owner status of the table so that only the table name is considered when the table is marked for replication.
Use sp_setrepdefmode with RepAgent-enabled Adaptive Server databases.
If sp_setrepdefmode is executed with the table name only, it displays the current mode of the table—”owner on” or “owner off.”
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.
sp_setrepdefmode requires “sa” or “dbo” permission or replication_role.