question

Kevin Feasel avatar image
Kevin Feasel asked

Restoring From A Database Snapshot: History

Does anybody know if there is a place where database restorations from snapshots are logged? I checked msdb.dbo.restorehistory, but if you restore from a snapshot, no record is inserted into that table. Hitting the Googles, I wasn't able to find anything, except that they don't get added to that table and that it seems like they may not be added into any system table... **Update:** Checking up more on Paul Randal's link (in my comment on @Kev Riley's answer), I noticed that I do get a log entry for reversions. Right now, I'm thinking of using a script to split out the database name from those entries and getting the set of reversions that way. Is there a better way of going about this?
sql-server-2008database-snapshothistoryrestorehistory
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Kev Riley avatar image
Kev Riley answered
That's strange, [according to BOL][1], there are certain values for some of the columns in `restorehistory` for reverted databases (I haven't got an Ent or Dev edition to try on at the mo....) [1]: http://msdn.microsoft.com/en-us/library/ms187408.aspx
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kevin Feasel avatar image Kevin Feasel commented ·
That kind of makes sense. I guess the way it's supposed to work is that the restorehistory records should remain until you drop the snapshot (if you leave the default option of clearing restore history upon dropping a database), but there might be a bug ( http://sqlskills.com/BLOGS/PAUL/post/Database-snapshots-when-things-go-wrong.aspx). I get the same results as Paul: even while the snapshot exists, there isn't a record in restorehistory.
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.