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.
Author |
Topic |
akki1563
Starting Member
10 Posts |
Posted - 2012-04-02 : 07:38:22
|
Hi,I ran one update query without specifying where clause..The update query is not inside Transaction. Is there any way to roll back this update statement ?Please let me know.Regards,Akki |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-04-02 : 08:52:18
|
Ouch! None that I know of, Akki.The only option that I know of is to restore your latest backup (to another location), get the data as it existed before the update, and then carefully recover the data you need.Often times, when I have to make critical changes on a production server, I do the following:-- 1BEGIN TRANUPDATE SEcurities SET MarketPrice = 598.55 WHERE TICKER = 'AAPL';-- 2ROLLBACK-- 3COMMIT I would run step 1, take a quick look to make sure it updated only one row, and then run step 3 if all seems well. Even this is dangerous on a production server, because you may be locking up a page, or more or locking up some hot rows etc. |
|
|
akki1563
Starting Member
10 Posts |
Posted - 2012-04-02 : 09:59:40
|
Thanks sunitha. |
|
|
X002548
Not Just a Number
15586 Posts |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2012-04-02 : 12:35:21
|
There are some log reader tools available, with which you may be able to "undo" the update. N 56°04'39.26"E 12°55'05.63" |
|
|
|
|
|
|
|