Click here to Skip to main content
15,885,546 members
Articles / Database Development
Tip/Trick

How to get the details of Open Transaction in SQL Server

Rate me:
Please Sign up or sign in to vote.
4.75/5 (3 votes)
2 Sep 2010CPOL 61.9K   3   5
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)


Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
AnswerHow to identify open transactions in SQL Server Pin
Dilip Kr. Singh22-Sep-15 19:36
Dilip Kr. Singh22-Sep-15 19:36 
Generalnice Pin
beffes10-Nov-10 0:34
beffes10-Nov-10 0:34 
GeneralGood Tip.......... Pin
Vivek Johari6-Sep-10 20:42
Vivek Johari6-Sep-10 20:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.