Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Can't revert from snapshot


Can't revert from snapshot

Author
Message
dan-572483
dan-572483
SSChasing Mays
SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)

Group: General Forum Members
Points: 641 Visits: 1958
I wanted to remove user data from a database to make a new version of the database with no user data, then restore the database to the original state. To save the time it takes to run a backup of a 600GB DB, I create a database snapshot which I could revert to later. My steps were:

1) Create a snapshot of database A
2) Run stored procedure to drop 500+ GB of userdata
3) Run DBCC SHRINKDATABASE to shrink the data files
4) Run Full Backup job
5) Run ALTER DATABASE commands to regrow DB files to their previous size
5) Run RESTORE DATABASE <database name> FROM DATABASE_SNAPSHOT = '<Snapshot name>'

This produces the result:
"Msg 3137, Level 16, State 1, Line 2
Database cannot be reverted. Either the primary or the snapshot names are improperly specified, all other snapshots have not been dropped, or there are missing files.
Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally."


There are no other snapshots and no Read Only filegroups. Recovery mode is SIMPLE. What went wrong? Did I do too much stuff to the DB?
dan-572483
dan-572483
SSChasing Mays
SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)

Group: General Forum Members
Points: 641 Visits: 1958
Lesson learned: If you are doing massive changes to a large database that you'll want to reverse, use a full backup, not a snapshot.

http://support.microsoft.com/kb/2002606


Dan
Igor Micev
Igor Micev
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4158 Visits: 4843
Hi,

A database snapshot is not a backup, it is just an "empty" database that holds the changes in the source database pages and during time it grows as more transactions commit.

Here are some links: http://www.sqlservercentral.com/articles/Disaster+Recovery+(DR)/2598/
http://blog.sqlauthority.com/2010/04/05/sql-server-2008-introduction-to-snapshot-database-restore-from-snapshot/

Regards
IgorMi


Igor Micev,SQL Server developer at Seavuswww.seavus.com
MissTippsInOz
MissTippsInOz
SSC Veteran
SSC Veteran (289 reputation)SSC Veteran (289 reputation)SSC Veteran (289 reputation)SSC Veteran (289 reputation)SSC Veteran (289 reputation)SSC Veteran (289 reputation)SSC Veteran (289 reputation)SSC Veteran (289 reputation)

Group: General Forum Members
Points: 289 Visits: 597
dan-572483 (10/12/2012)
Lesson learned: If you are doing massive changes to a large database that you'll want to reverse, use a full backup, not a snapshot.

http://support.microsoft.com/kb/2002606


Dan


The article is very interesting but it doesn't seem to refer to the same issue that you were experiencing. If you have decided to use a full backup as your rollback process then fair enough but, if it were me, I wouldn't be relying on that KB article as the resolution to your problem.

Clare
_________________________________________________________________________________________________________________
Measure twice; cut once (and have a good saw)

Hey, just a thought.....did you check Books Online yet?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search