0

Adding an article(table) to a publication, and then running the snapshot agent should create a snapshot only for the new article. However, sometimes replication decides to re-snapshot every article in the publication. So, I have 2 questions:

  1. Why sometimes all articles are re-snapshotted if only one article was added?
  2. Is it possible to know beforehand which articles are marked to be snapshotted next time the snapshot agent runs (such as in a DMV or system table) ?

Thanks a lot.

Lab
  • 1

2 Answers2

0

If memory serves, this behavior is governed by two settings on the publication: immediate_sync and allow_anonymous. In order to get the behavior that you want (i.e. add one article and have the snapshot be of one article), both of those settings need to be false. Luckily, you can find the value of both in the syspublications table in the published database and change them with sp_changepublication

Ben Thul
  • 31,080
  • 4
  • 45
  • 68
0

It seems weird, but I have seen this when adding an article and the solution was to cancel the article addition as it was asking to create a full snapshot. Then run the snapshot agent and it should find it has nothing to do, then add the article. Weird I know, but after 7 years of replication experience I have found this has worked everytime for me. Ben Thul is also correct on immediate_sync according to BOL.

SQLGuyChuck
  • 192
  • 7