SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 undo update query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

scottichrosaviakosmos
Yak Posting Veteran

Russia
66 Posts

Posted - 07/26/2010 :  06:27:07  Show Profile  Reply with Quote
is it possible to undo an update statement which has updated my table .
i was not useing any transaction but i directly updated it.
now i want to recover old data and i dont have back also.

scoo

RickD
Slow But Sure Yak Herding Master

United Kingdom
3608 Posts

Posted - 07/26/2010 :  06:32:55  Show Profile  Reply with Quote
If you have a backup from before you ran the update, you can recover that, but even if you do, any changes between the last backup and your update will be lost (unless you take regular log backups).

If not, then see it as a lesson on why you should always use BEGIN TRANS before an ad-hoc update.

EDIT: oh, missed the bit where you said you didn't have a backup. Oh well, there is another lesson, always have backups. If you learn nothing else, learn how to take backups and drill it into your brain..

Edited by - RickD on 07/26/2010 06:34:28
Go to Top of Page

slimt_slimt
Aged Yak Warrior

Switzerland
746 Posts

Posted - 07/26/2010 :  06:34:17  Show Profile  Reply with Quote
if you have backup it can be done. If you were doing update directly on performance-live database and there is no logging/backup, there is no magical undo.
Go to Top of Page

Sachin.Nand
Flowing Fount of Yak Knowledge

2937 Posts

Posted - 07/26/2010 :  06:43:28  Show Profile  Reply with Quote
What was the Update statement?If it was some easy update like replcacing "NULL values" with "some values",you can rewrite the update to set all those values to NULL again.

If it cannot be done that easily then without any BackUp you are at dead end !!!



Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless.

PBUH
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000