mmccy
asked on
undo the delete sql in MS Server
I accidentally execute a sql and delete some rows of records !
is there any method that can restore the rows of records ?? it is very urgent !!
Thanks !
is there any method that can restore the rows of records ?? it is very urgent !!
Thanks !
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
yes, there is, it will depend on how your backups are being done though...
Check your maintenance plans and see if any regular backups are scheduled.
Then load the backup into another DB and recover the rows on the relative table.
Your transaction logs, may have a clue, but I doubt it would be of any help since the row updates could have occurred anytime in the past...
Check your maintenance plans and see if any regular backups are scheduled.
Then load the backup into another DB and recover the rows on the relative table.
Your transaction logs, may have a clue, but I doubt it would be of any help since the row updates could have occurred anytime in the past...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You may check these out as well for additional info:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1263379&SiteID=1
https://www.experts-exchange.com/questions/21718172/Undo-Delete-Update.html
http://www.velocityreviews.com/forums/t108926-how-to-quotundoquot-a-database-delete.html
http://www.thescripts.com/forum/thread160550.html
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1263379&SiteID=1
https://www.experts-exchange.com/questions/21718172/Undo-Delete-Update.html
http://www.velocityreviews.com/forums/t108926-how-to-quotundoquot-a-database-delete.html
http://www.thescripts.com/forum/thread160550.html
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Both suggestions are good
- But the 'verry urgent' part off the question could be a problem with the third party tools.
- restore a backup and roll-forward to the last good transactionlog backup , you will have recovered the carelessly deleted records, but do you know wath you trow away on modifications afther that restored backup? Only if you're the only user you can be sure.
So I think my suggestion was also worthwile (even when I won't get any points out of it)
- But the 'verry urgent' part off the question could be a problem with the third party tools.
- restore a backup and roll-forward to the last good transactionlog backup , you will have recovered the carelessly deleted records, but do you know wath you trow away on modifications afther that restored backup? Only if you're the only user you can be sure.
So I think my suggestion was also worthwile (even when I won't get any points out of it)
If you don´t have a transaction scope defined around the command:
BEGIN TRANSACTOON
DELETE FROM SomeTable
ROLLBACK --THis does a rollback
...you can´t. You will need to restore your data from a backup.
or
Two options:
1) Use a third-party tool that is able to read the transaction log
and construct undo batches from it. Two such products are
Lumigent Log Explorer and Log PI.
2) a) Make a note of when the fatal error occurred. b) Backup the
transaction log. c) Restore the last full backup with norecovery.
d) Apply transaction log dumps with a STOPAT just before the
fatal DELETE was done.