I added a new article in an existing publication.

I saw that it generated a new snapshot folder (E:\Database\Snapshots\unc\S749TCAPDB01_NFS_XXXX_XXXX_PUBLICATION\20190417114556).

But this folder only contains a single article definition which I added previously.

It makes me wonder if this snapshots folder are only one time use and can be deleted afterwards


The lifecycle of snapshot files is dependent on a number of factors. Firstly, if your publications have immediate_sync enabled it means that new subscribers will use the existing snapshot to initialise the new subscription (provided the snapshot is within the retention period).

This has additional impacts as commands in the distribution DB are also retained for the retention period which can cause excess growth of that database. The snapshot remains valid until the retention period expires at which point it is removed by the distribution cleanup job.

Secondly, if you have immediate_sync disabled and you reinitialise a subscription, a new snapshot must be generated for the reinitialisation. You can reinitialise multiple subscriptions at a time, but only if they're all marked for reinitialisation prior to running the snapshot agent. Once those subscriptions marked for reinitialisation have been reinitialised, the snapshot is invalid for further use. At this point, it should be cleaned up by the distribution cleanup job.

Thirdly, if you perform a mini-snapshot due to something like adding a single article to an existing publication (as per your described scenario), that mini-snapshot is only valid for the subscribers that existed and were synchronising/synchronised at the time the snapshot was generated. Any new or expired subscriptions would require a full snapshot to reinitialise.

At all stages, the distribution cleanup job should be cleaning up expired or invalid snapshots, however, you can remove them manually if desired.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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