Re: SQL SERVER Rollback Problems
From: Andrew J. Kelly (sqlmvpnooospam_at_shadhawk.com)
Date: 10/09/04
- Next message: Joe Celko: "Re: Table design issue"
- Previous message: Bonj: "Re: extended stored proc programming"
- In reply to: Sajan Rajagopal.M: "SQL SERVER Rollback Problems"
- Next in thread: Dan Guzman: "Re: SQL SERVER Rollback Problems"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 9 Oct 2004 10:48:07 -0400
When you issue a BEGIN TRAN everything from there on is wrapped in that
transaction. It will not be fully committed until you issue a COMMIT TRAN.
If your sp had an error or was manually stopped the transaction is still
open and will sit like that until you issue a COMMIT or a ROLLBACK. If you
issue the ROLLBACK ALL operations are rolled back up until that first BEGIN
TRAN. It is up to you to issue the COMMIT or ROLLBACK unless you have SET
XACT_ABORT ON (See BOL for details). But in any case ALL the transactions
in there are either fully committed when you issue a COMMIT or ALL of them
are rolled back in the case of a ROLLBACK. This is how the integrity the
database is upheld and is no different than in any other modern relational
db. If you lost data it was due to something you did and not the engine.
-- Andrew J. Kelly SQL MVP "Sajan Rajagopal.M" <samy_mss@rediffmail.com> wrote in message news:1d9001c4adf8$6931c2e0$a301280a@phx.gbl... > I have included a query (procedure) inside a begin and > rollback. The Query got Hanged and i stopped the > execution. Upon Stopping the query didnt get rollbacked > instead it got executed and i had lost few data as there > was a delete scripts inside my query.After that i executed > the ROLLBACK alone and it got executed. > Kindly tell me if this is a limitation in SQL server or is > there any patch to be run in order to prevent this. This > is a show stopper in my organisation as all the Back End > Operations are totally dependant on SQL server and if this > case keeps continuing i may have to take precautionary > measures before executing even inside a BEGIN and ROLLBACK > transaction. > Thanking You > > Saminathan.S > (Cognizant Technologies Solutions)
- Next message: Joe Celko: "Re: Table design issue"
- Previous message: Bonj: "Re: extended stored proc programming"
- In reply to: Sajan Rajagopal.M: "SQL SERVER Rollback Problems"
- Next in thread: Dan Guzman: "Re: SQL SERVER Rollback Problems"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|