Transaction Replication After Snapshot Script

  • Does the after snapshot script apply even if adding one article? 

    I use this script to add one article at a time without having to snapshot again for all articles. 

    execsp_changepublication @publication=N'PublicationName' ,@property=N'allow_anonymous' , @value='false';

    go

    execsp_changepublication @publication=N'PublicationName' ,@property=N'immediate_sync' , @value='false';

    go

  • Yes, it should run the scripts even after a single article is added because the mini-snapshot that is generated is still a snapshot.

    See Microsoft Docs: https://docs.microsoft.com/en-us/sql/relational-databases/replication/snapshot-options?view=sql-server-2017

    The script must be repeatable because if you need to reinitialize a subscription for which the script has already been applied, the script will be applied again when the new snapshot is applied during reinitialization.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply