|
Can database snapshot be used in restoring full backup?
(comments are locked)
|
|
If all you have is the snapshot file, you can't use it to restore a database, since its files will only contain those pages that have been changed in the original since you created the snapshot. But if you want to revert a database to the point in time when you created the snapshot, you can use your snapshot in a RESTORE command: There's an SQL Server Central article about database snapshots, how they are built and how they are used to revert a db: http://www.sqlservercentral.com/articles/Database+Snapshots/63004/ Excellent answer! I use snapshots in test environment to revert back to a point in time when a new test iteration starts / restarts
Feb 03 '11 at 02:13 AM
Håkan Winther
(comments are locked)
|
|
You can only use a database snapshot on the instance you created it on. Think of it as a sort of undo file. You take a snapshot of a database and then run a monster update script (using multiple transactions). The monster script is wrong and breaks your system. You can then "undo" the changes using the snapshot - similar to a restore, just a whole lot faster. A database snapshot is based on sparse files (NTFS feature) which basically keeps track of changed data in an extra file. When you create a snapshot a sparse file is created and the changes in the database are tracked in there. This is why you can make a snapshot of a multiple TB database in an instant. Because the sparse file is directly connected to the actual database files (MDF), you cannot use the snapshot directly against another database or backup. This is also the reason why only one snapshot can be created per database. You could restore a database alongside a snapshot and run a data comparison, but that would use twice the disk space - once for the database + snapshot and once more for the parallel restore. Read How Database Snapshots Work to get a better understanding
(comments are locked)
|

