views:

2613

answers:

2

Our Test DB is suddenly missing rows. We want them back.

Is there a way to sift through everything that has happened to the database today? Each SQL statement? I presume this kind of stuff is in the transaction log, but am not sure how to view it.

Is there a way to undo delete operations?

BTW: Yes, we do have a backup, but would prefer to find the cause of the deletion as well...

+1  A: 

You can do this with some of Red Gate's tools, but it costs. Take a look at SQL Log Rescue.

Otherwise, I'd be tempted to do a restore.

Galwegian
Yeah, we did just do a restore (to local db) and tried to figure out from there, patching to test db.
Daren Thomas
+1  A: 

You need a third-party tool to do this. The tool has to be able to go into the transaction logs and view the log entries so you can see what happened. I haven't used any of these tools, but I'd try Red Gate's SQL Log Rescue for starters. Give it a try:

http://www.red-gate.com/products/SQL_Log_Rescue/index.htm

Dave Markle