How to get the details of Open Transaction in SQL Server






4.75/5 (3 votes)
The below query can be used to get the details of OPEN TRANSACTION:
SELECT DB_NAME(dbid) AS DBNAME, (SELECT text FROM sys.dm_exec_sql_text(sql_handle)) AS SQLSTATEMENT FROM master..sysprocesses WHERE open_tran > 0