Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / database

How to get the details of Open Transaction in SQL Server

4.75/5 (3 votes)
2 Sep 2010CPOL 63.1K  
The below query can be used to get the details of OPEN TRANSACTION:
SQL
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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)