Question

Is there any way to restore an entire Transaction Log but one query?

for example a delete query, or update query, that you accidentally execute?

Cause i know its is posible, to restore to a certain time, but what if the evil query affected only one table, and you dont want to loose the changes in the other tables?

Was it helpful?

Solution

There is no way to do that using just the tools that come with SQL Server, though as you said you can come close using point in time recovery.

I believe ApexSqlLog may allow you to do this, but I have never tested using it in that fashion. SQL Log Rescue from Red Gate also seems to allow you to do this, and whil I have used many products from Red Gate and have generally been very happy with them, I have not tried that particular product either.

OTHER TIPS

You can certainly use ApexSQL Log. You can recover deleted or updated rows, but you can also choose what data you are going to recover.

Tool working great and it is very flexible. A lot of filters to help you narrow the search for data you want to recover.

Here you can find some info: How to recover SQL Server data from accidental UPDATE and DELETE operations.

This is what I would recommend you try. A fairly common scenario actually.

  1. Restore the database to a "second" copy on the server

    (full backup or log backup to bring you back to the point of loss)

  2. Isolate the single table or data in the copy database and move it over to the live database

There are a variety of ways to accomplish step 2 such as

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top