Removing a Database Snapshot

If you want to get rid of a snapshot or overlay a current snapshot with a more up-to-date snapshot, you simply use the DROP DATABASE command and then create it again. The DROP DATABASE command immediately removes the database snapshot entry and all sparse file allocations associated with the snapshot. The following example drops the database snapshot previously created:

Use [master]goDROP DATABASE AdventureWorks2012_6AM_snapshotgo

If you want, you can also drop (delete) a database snapshot from SQL Server Management Studio by right-clicking the database snapshot entry and choosing the Delete option. However, it’s best to do everything with scripts so that you can accurately reproduce ...

Get Microsoft SQL Server 2014 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.