select session_id,transaction_id,is_user_transaction,is_local
from sys.dm_tran_session_transactions
where is_user_transaction=1
select s.text from sys.dm_exec_connections c cross apply sys.dm_exec_sql_text(c.most_recent_sql_Handle) s
where session_id=63
DBCC OPENTRAN
select st.text,hostname,hostprocess,* from master..sysprocesses a
cross apply
sys.dm_exec_sql_text(a.sql_handle) as st
where a.spid='193'