Uncategorized

Deadlock Chart from XE Ring Buffer

Simple script to obtain deadlock graph from default XE session system_health. Contains only deadlocks capture for certain period of time back (hours). SELECT [xe].[query](‘(event/data/value/deadlock)[1]’) [DeadlockGraph] FROM ( SELECT [xe].[query](‘.’) [xe] FROM ( SELECT CAST([target_data] AS XML) [td] FROM [sys].[dm_xe_session_targets] [st]…