Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Execute Scripts Before and After a Snapshot Is Applied (SQL Server Management Studio)

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Specify an optional script to execute before or after the snapshot is applied on the Snapshot page of the Publication Properties - <Publication> dialog box. For more information about accessing this dialog box, see View and Modify Publication Properties.

Note Note

These options are not available if the Snapshot format option is set to Character.

To execute a script before or after a snapshot is applied

  1. On the Snapshot page of the Publication Properties - <Publication> dialog box:

    • To specify a script to execute before the snapshot is applied, click Browse to navigate to the script, or enter a path to the script in the Before applying the snapshot, execute this script text box.

      Note Note

      The Distribution Agent or Merge Agent must have read permissions for the directory you specify. If pull subscriptions are used, you must specify a shared directory as a universal naming convention (UNC) path, such as \\computername\scripts\myscript.sql.

    • To specify a script to execute after the snapshot is applied, click Browse to navigate to the script, or enter a UNC path to the script in the After applying the snapshot, execute this script text box.

  2. Click OK.

Community Additions

ADD
Show:
© 2015 Microsoft