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
 how to rollback records

Author  Topic 

simi28
Starting Member

27 Posts

Posted - 2007-05-24 : 04:21:28
Hi All
I have updated a field in all records instead of a single record in a table by mistake.
i am working in sql 2005.
how can I rollback the records.
Plz help me me.
Thnaks

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-05-24 : 04:22:16
You can't unless you did this inside a transaction and yet to commit it.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-05-24 : 04:48:11
you have to restore from backup.
you do have those right?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-24 : 09:53:46
Or with third party tools.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-05-24 : 10:08:09
Backups?

What are those?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-05-24 : 10:11:47
i've heard about those once or twice but they were a bit of black magic to me... so i didn't dare use them.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-05-24 : 10:41:49
simi28: Note that you can restore a backup to a new, temporary, database and copy the messed-up data across to your Live database. (You don't have to restore back the whole Live database!)

If your Recovery Model is set to FULL then you will also be able to restore back to just before the accident. if the Recovery Model is SIMPLE then you can only restore to your last Full or Differential backup.

Kristen
Go to Top of Page
   

- Advertisement -