How can I make sure that a certain table is not selected as an article in a publication? So that this table is never replicated (even by error). The replication for the database is setup by different people and one particular table should never be included in the replication. Can we make that table non selectable in the publication wizard (the step where the articles are added to the publication) or is there any way we can use the database schema to define that this table is not available as article in a publication?

Type of replication used: merge replication

Thanks!

up vote 0 down vote accepted

The only way I know to do that is to leverage this limitation:

Tables published for transactional replication must have a primary key.

Publish Data and Database Objects

So replace the table's primary key with a unique clustered index called pk_MyTable_PreventReplication or somesuch.

Merge replication requires a special ROWGUIDCOL column on the table, which you can prevent with security or a DDL trigger.

  • Thank you! this is a great hint, unfortunately the type of replication we use is merge-replication where this limitation doesn't seem to apply (I will update my question - I only had added this bit of information as a tag instead of text in my question - sorry). Is there any similar limitation for merge-replication that would prevent replication of a table? – d3006652 Sep 11 at 8:13
  • See update to answer for merge Replication. – David Browne - Microsoft Sep 11 at 9:37

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.