sysadmin apply_truncate_table

Description

Turns on or off the “subscribe to truncate table” option for all existing subscriptions to a particular table, enabling or disabling replication of truncate table.

Syntax

sysadmin apply_truncate_table, data_server,
 database, {table_owner | '' | ""}, table_name 
{'on'| 'off'}You 

Parameters

data_server

The name of the replicate data server.

database

The name of the replicate database managed by the data server.

table_owner

Identifies the owner of the replicate table. If owner is not specified, Replication Server sets owner to “dbo.”

table_name

Identifies the replicate table for which you want to turn on or off the “subscribe to truncate table” option for existing subscriptions.

on

Turns on the “subscribe to truncate table” option for existing subscriptions.

off

Turns off the “subscribe to truncate table” option for existing subscriptions.

Examples

Example 1

Turns on “subscribe to truncate table” for all subscriptions to the publishers table owned by emily in the pubs2 database:

sysadmin apply_truncate_table, SYDNEY_DS,
 pubs2, emily, publishers, 'on'

Usage

Permissions

sysadmin apply_truncate_table requires “sa” permission.

See also

create subscription, define subscription