sp_setreptable

Description

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'} [, {owner_on | owner_off}]]]

Parameters

table_name

The name of a table in the current database.

true

Enables replication for the table.

false

Disables replication for the table.

owner_on

Sets the mode of the table so that both the table name and owner name are considered when the table is marked for replication. Enables tables with the same name but different owners to be replicated. This option is for Adaptive Server version 11.5 and later databases.

owner_off

Sets the mode of the table so that only the table name is considered when the table is marked for replication. This is the default. It ensures that the name for each table marked for replication is unique. This option is for Adaptive Server version 11.5 and later databases.

Examples

Example 1

Displays the replication status for all of the tables in the current database.

sp_setreptable

Example 2

Displays the replication status for the publishers table.

sp_setreptable publishers

Example 3

Enables replication for the publishers table.

sp_setreptable publishers, 'true'

Example 4

Allows multiple tables named publishers each owned by different users to be replicated.

sp_setreptable publishers, 'true', owner_on

Usage

Permissions

sp_setreptable requires sa or dbo permission or replication_role.

See also

sp_reptostandby, sp_setrepcol, sp_setrepdefmode, sp_setreplicate, sp_setrepproc