Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 RollingBack Transactions

Author  Topic 

gv_pradeep
Starting Member

19 Posts

Posted - 2008-08-18 : 01:46:07
Hi,

I've executed a query which has updated multiple rows which was not intended. I've not used BEGIN TRAN :(

Is there any way to revert back the table to the stage before the update statement?

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-08-18 : 01:55:44
You could potentially do a RESTORE to a point in time

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-08-18 : 04:08:03
If you have a database backup and transaction log backups you can restore the database backup, then restore the log backups one at a time using the STOPAT to stop just before the update that you did.

You could get one of the log recovery tools and see if they can reverse the changes based on the transaction log. That depends on what recovery model you are using.

There's no way from within SQL to just undo the changes.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

gv_pradeep
Starting Member

19 Posts

Posted - 2008-08-20 : 09:04:53
Ok..Hav to be very careful while updating or deleting the records.. :)
Thanks for your response..
Go to Top of Page
   

- Advertisement -