Monday, March 27, 2017

SQL Server - Is there an open transaction on a session_id?




-- Is there an open transaction on a session_idSELECT  st.transaction_id,
  at.name,
  at.transaction_begin_time,
  at.transaction_state,
  at.transaction_status
FROM    sys.dm_tran_session_transactions st
  JOIN    sys.dm_tran_active_transactions at    ON st.transaction_id = at.transaction_id
WHERE   st.session_id = 52;--your blocking spid

No comments:

Post a Comment