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.