Enabling replication of the truncate table command

When you create, refresh, or define a publication subscription, you can enable replication of truncate table to the replicate table. If you do not, you must execute truncate table yourself at the replicate database.

For example, to create the publication subscription pubs2_sub and enable replication of truncate table, enter this command at the destination Replication Server:

create subscription pubs2_sub 
		for publication pubs2_sub
		with primary at TOKYO_DS.pubs2
		with replicate at SYDNEY_DS.pubs2
		subscribe to truncate table

All subscriptions to the same replicate table must use truncate table consistently. If a replicate table has a subscription that does not enable replication of truncate table and you add another subscription that does enable replication of truncate table, the publication subscription fails.

You do not need to include subscribe to truncate table when you activate and validate the publication subscription.

See “Enabling replication of truncate table” for more information.