Tuesday, February 21, 2012

Retrieve Deleted Items > Log

Looking for a little assistance with a big problem.

I lost some data from a query that went wrong. I still have the logfile though, is there anyway of retrieving the data from the log file (.LDF) so that I can undo what someone did?

I located some 3rd party software but they are big bucks and the demos won't allow you to do it..

Thanks in advance,

JayThe safest thing would be to backup the transaction log, then restore the database froma full backup with norecovery, then restore the transaction log with 'stopat = time' where time is just before the bad query was run. This assumes that you are in full recovery mode, however.

Alternatively, if you have the disk space, you can restore the database to a new location, and try to transfer some of the lost data over. This is much more risky, as you have to be sure you get all of the relationships, id values, etc. right. Most vendors will invalidate their support contracts, if you do this sort of thing to their databases.

No comments:

Post a Comment