I need T-SQL to count Coun开发者_如何学JAVAt All incomplete SQL Transactions running on database in another way I need to count all current sql transactions runnging right now on sql server instance.
I hope if I explained well what I need ?
thanks.
OK, I think I meant sys.dm_tran_active_transactions
:
SELECT *
FROM sys.dm_tran_active_transactions
Original Post:
As shown on this post here: SQL SERVER – 2005 -Track Down Active Transactions Using T-SQL
SELECT *
FROM sys.dm_tran_session_transactions
This is for active transactions on the currently selected database. See sys.dm_tran_session_transactions
.
精彩评论