chapter twelve

12 Snapshots

 

Have you ever pressed F5 to execute a perfectly crafted update statement, only to discover you didn’t highlight the where clause? Or perhaps ran a whole script when you only meant to run the select portion? If only SQL Server had a built in undo option. Well, good news - database snapshots can help here!

Now, in the previous two chapters we talked about backups and restores. The first thing to note about database snapshots is that they do not take the place of a solid backup strategy. However, they can be really useful for rapid rollbacks in certain situations.

We actually debated on whether or not to include this chapter because snapshots aren’t the most popular SQL Server feature, but this is likely due to their inaccessibility within SSMS. We hope that you’ll give snapshots a chance if you don’t have experience with them because they can be incredibly useful. Personally, I have relied on snapshots during my career for both fast rollback scenarios when things have gone wrong, or for reporting on certain points in time.

12.1 Snapshots and SSMS

12.2 Application Upgrade

12.3 When to use snapshots?

12.4 Create a Snapshot

12.5 Upgrade

12.6 Rollback the entire database from a snapshot

12.7 Restore certain objects or data from a snapshot

12.8 Clearing up

12.9 Reporting

12.10 Hands-on Lab