Error Message:

Msg 6401, Level 16, State 1, Line 1
Cannot roll back t2. No transaction or savepoint of that name was found.

This error orccurs when the Transaction or save point name that is specified in the rollback transaction is not found.

Example:
[sql]
BEGIN TRAN
SAVE TRAN T1
ROLLBACK TRAN T2
ROLLBACK TRAN
[/sql]

When the above code is executed error 6401 will occur as the save point with the name T2 cannot be found in Line 3

Fix/Resolution:
Update ROLLBACK Tran/TRANSACTION Query with the correct name of the Save Point.

[sql]
BEGIN TRAN
SAVE TRAN T1
ROLLBACK TRAN T1
ROLLBACK TRAN
[/sql]

Leave a Reply

Your email address will not be published. Required fields are marked *