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
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 rollback

Author  Topic 

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2003-09-20 : 06:35:53
hi,
I have a question ,
if the trasaction in going on and in the middle of the transaction the database server crashes,so how do I rollback the half done transaction.
regards,
harshal

The Judgement of the Judge is as good as the Judge.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-09-20 : 08:04:24
If the error is severe enough to terminate the batch, it will roll back automatically. Otherwise simply issue a ROLLBACK TRAN in the same query window.
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2003-09-20 : 17:57:57
The transaction will be maintained by the transaction log.
Part of the boot-up process to bring a database on-line after a crash is to rollback any uncommitted transactions.

See Transaction Recovery in bol.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2003-09-22 : 00:34:09
thanks to u both.This was asked to me in an interview,I answered the same but was not confident.

The Judgement of the Judge is as good as the Judge.
Go to Top of Page
   

- Advertisement -