Lesson 1: Getting Started with SQL Server HA and DR
Activity 1: Troubleshooting Snapshot Replication
Solution:
To modify the publication, follow these steps:
Connect to the Publisher instance and expand Replication | Local Publication. Select the WWI-Snapshot publication and select Properties:
In the Publisher Properties window, select the pre-snapshot and post-snapshot scripts, as shown in the following screenshot:
Click OK to continue and save the new settings. You will be asked to generate a new snapshot after saving the modifications:
Leave the checkbox checked and click on Yes.
A new snapshot will be generated. You can verify this by either checking the snapshot folder or viewing the snapshot agent history.
Now, apply the new snapshot and see if this fixes the issue. You can apply the snapshot (run the distribution agent) by using any one of the methods that we have discussed earlier.
Once the distribution agent runs successfully, observe the agent history output:
The distribution agent now runs the pre-snapshot script to drop the view. It then applies the snapshot and executes the post-snapshot script to create the view.
This completes the activity.