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
 Any way to undo the last command?

Author  Topic 

EugeneLim11
Posting Yak Master

167 Posts

Posted - 2009-09-04 : 05:42:22
I accidentially delete some data in my MSSQL table and am wondering if it is possible to undo the last command - I have no clue about the data

:(

Regards,

Yu-Jin

check out my blog at http://www.aquariumlore.blogspot.com

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-09-04 : 05:54:54
Do you have a backup?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-04 : 05:55:18
First: this is an MS SQL Server forum.
Second: I don't believe there is an undo in MySql.
You have to restore the data from a backup.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-09-04 : 06:02:24
quote:
Originally posted by webfred

First: this is an MS SQL Server forum.
Second: I don't believe there is an undo in MySql.
You have to restore the data from a backup.


No, you're never too old to Yak'n'Roll if you're too young to die.


Has the OP said anything about mysql?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-04 : 06:04:48
quote:
Originally posted by madhivanan

quote:
Originally posted by webfred

First: this is an MS SQL Server forum.
Second: I don't believe there is an undo in MySql.
You have to restore the data from a backup.


No, you're never too old to Yak'n'Roll if you're too young to die.


Has the OP said anything about mysql?

Madhivanan

Failing to plan is Planning to fail



Oops! It is friday
@OP: sorry for that!


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-09-04 : 06:08:46
quote:
Originally posted by webfred

quote:
Originally posted by madhivanan

quote:
Originally posted by webfred

First: this is an MS SQL Server forum.
Second: I don't believe there is an undo in MySql.
You have to restore the data from a backup.


No, you're never too old to Yak'n'Roll if you're too young to die.


Has the OP said anything about mysql?

Madhivanan

Failing to plan is Planning to fail



Oops! It is friday
@OP: sorry for that!


No, you're never too old to Yak'n'Roll if you're too young to die.


It is because of this

my MSSQL

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2009-09-04 : 06:36:19
If you don't have backups, unfortunately you will have to use some third party tools like Log Explorer to recover deleted data.

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

EugeneLim11
Posting Yak Master

167 Posts

Posted - 2009-09-06 : 21:49:28
Thank you. I have recovered from a last backup and successfully restore MSSQL. Luckily I got daily backup, but the last backup is one day old.

check out my blog at http://www.aquariumlore.blogspot.com
Go to Top of Page

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2009-09-07 : 01:47:55
After you found that you have accidentally deleted your data and if database is in full recovery mode, you must...
1- Have a full backup (how old doesn't matter)
2- Take transactional backup
3- Restore your existing (already taken) full backup
4- Restore your currently taken transactional backup BUT with point in time recovery option

NO DATA LOSS AND YOU CAN RECOVER YOU DATABASE UP TO YOUR FAULT TIME.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-09-07 : 03:21:28
Providing that no log backups have been taken and the log has not been truncated.

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

- Advertisement -