x

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?
more ▼

asked Aug 22, 2011 at 02:53 PM in Default

Kevin Feasel gravatar image

Kevin Feasel
6.1k 3 5 11

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

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
more ▼

answered Aug 23, 2011 at 01:19 AM

Kev Riley gravatar image

Kev Riley ♦♦
53k 47 49 76

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.
Aug 23, 2011 at 02:00 AM Kevin Feasel
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1840
x13
x5
x1

asked: Aug 22, 2011 at 02:53 PM

Seen: 1196 times

Last Updated: Aug 23, 2011 at 04:54 AM