Deleting Lost Transactions in MS SQL Server

Introduction

Quite often, transactions in MS SQL Server are lost by those who launched them. It is not infrequent that one runs a script in SSMS, which starts an explicit transaction with the BEGIN TRANSACTION statement, but then an error occurs and COMMIT TRANSACTION or ROLLBACK TRANSACTION fails while the transaction initiator has left this query for some time. Transactions left forgotten for long periods of time can prevent users from accessing the locked resources (tables, server resources (RAM, CPU, I / O system).

In this article, we will consider how to delete lost transactions using SQL Complete.