Posted by Erland Sommarskog on 10/02/27 11:45
Jack (cawoodm@gmail.com) writes:
> Is there anyway in SQL Server to rollback an SQL statement which was
> already executed. I know there is a transaction log but what it
> contains and how it works is still a mystery to me.
> Assuming I delete all records from a table - can I somehow undo this?
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.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|