sp_setreptable

Enables or disables replication for an Adaptive Server table or displays the current replication status of a table.

Syntax

sp_setreptable [table_name [, {'true' | 'false' | 'never'} 
     [, {owner_on | owner_off | null}] [, use_index]]]

Parameters

Examples

Usage

  • Use sp_setreptable with no parameters to display a list of replicated tables in the database.

  • Use sp_setreptable table_name without true or false to display the current replication status of the table.

  • When you include the owner_on option, multiple tables with the same table name but different owners may be replicated to replicate and warm standby databases. Make sure that the replication definition on the table also includes owner information or replication may fail.

  • If a table has been marked for replication with sp_setreptable, you can change the owner mode with the sp_setrepdefmode system procedure.

  • The replication index status order of precedence is: column, table, database. For example, in a database marked for replication using indexes, the table status overrides the index status.

  • When a large table containing one or more text, unitext, image, or rawobject columns is marked for replication, the internal process is performed in a single transaction and may take a long time. To speed up the process, use the use_index option to create a global nonclustered index for every text, unitext, image, or rawobject column.

  • With use_index, a shared-table lock is held while the global nonclustered index is created.

  • You cannot use drop index to manually drop indexes created for text, unitext, image, or rawobject replication. You can use only the supported replication stored procedures sp_reptostandby, sp_setreptable, and sp_setrepcol to change the replication index status.

Permissions

sp_setreptable requires “sa” or “dbo” permission or replication_role.

Related reference
sp_reptostandby
sp_setrepcol
sp_setrepdefmode
sp_setreplicate
sp_setrepproc