问题
Is there anyway to map transaction_id
from somewhere like sys.dm_tran_active_transactions
to an SPID
in SQL Server 2005?
回答1:
It may sound obvious, but the first two columns documented for sys.dm_tran_session_transactions are session_id
and transaction_id
. This is the table that maps between transactions and sessions.
来源:https://stackoverflow.com/questions/12703549/sql-server-2005-map-transaction-id-to-spid