65.9K
CodeProject is changing. Read more.
Home

How to get the details of Open Transaction in SQL Server

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.75/5 (3 votes)

Sep 2, 2010

CPOL
viewsIcon

63123

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