Cannot issue SAVE TRANSACTION when there is no active transaction.

Posted on : 17-05-2012 | By : Devi Prasad | In : Msg 628, SQL Errors

0



Error Message:

Msg 628, Level 16, State 0, Line 1
Cannot issue SAVE TRANSACTION when there is no active transaction.

Why This Error?
– This error occurs when SAVE TRANSACTION/TRAN command is issued prior to issuing BEGIN TRANSACTION Command.
– The transaction could be commited/Rollbacked before issuing SAVE TRANSACTION command

Examples:

SAVE TRAN Tran1

OR

BEGIN TRAN
ROLLBACK TRAN
SAVE TRAN Tran1

Fix/Resolution:

Check for BEGIN TRAN command before SAVE TRAN command.
Check if the tran is commited/rollbacked before SAVE Tran Command.
If the transaction needs to be saved then make sure that the SAVE TRAN command is issued after the BEGIN TRAN command and before the COMMIT/ROLLBACK Tran command.




Reference : Devi Prasad (sqlserverlearner.com)

Do you like my blog?

If you liked reading this blog, please help spread the word by sharing this blog with your friends.



Need Help On SQL Server?

Cannot Find Solution to your problem (or) If you are looking for some help on SQL Server. Dont worry Click Here to Post your question and solve your issue.




Your Ad Here


Tags: ,