[SQL Server] Afficher la liste des transactions SQL ouvertes

--Afficher les transactions sql ouvertes
USE master
GO
SELECT spid,
PROGRAM_NAME,
nt_userName,
loginame,
DB_NAME(s.dbid) AS DatabaseName,
CR.TEXT AS Query
FROM sysprocesses s
CROSS apply sys.Dm_exec_sql_text(sql_handle) CR
WHERE open_tran = 1

DBCC OPENTRAN('database_name')