It will remain open until you COMMIT
, ROLLBACK
, or the connection is closed and that recession is killed.
This will block other processes and cause all other problems.
As a rule, always check as shown below in the CATCH
block to make sure that you have closed the cleanliness.
IF @@TRANCOUNT > 0 ROLLBACK
or
WHILE @@Trancount > 0 BEGIN ROLLBACK END
source share