Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

System-health extended-event session does not capture latest deadlocks Expand / Collapse
Author
Message
Posted Friday, December 21, 2012 4:04 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 6:04 AM
Points: 1,825, Visits: 3,478
While running the following query to capture the latest deadlocks recorded in the default system-health extended-event session, I noticed that the latest deadlock captured was 3 days ago. However, in the SQL ERRORLOG I see that several deadlocks have occurred as recently as today.

Has anyone else noticed this issue?

--http://www.quest.com/whitepaper/how-to-use-sql-servers-extended-events-and-notifications816315.aspx

;WITH SystemHealth
AS (
SELECT
CAST ( target_data AS xml ) AS SessionXML
FROM
sys.dm_xe_session_targets st
INNER JOIN
sys.dm_xe_sessions s
ON
s.[address] = st.event_session_address
WHERE
name = 'system_health'
)
SELECT
Deadlock.value ( '@timestamp', 'datetime' ) AS DeadlockDateTime
, CAST ( Deadlock.value ( '(data/value)[1]', 'Nvarchar(max)' ) AS XML ) AS DeadlockGraph
FROM
SystemHealth s
CROSS APPLY
SessionXML.nodes ( '//RingBufferTarget/event' ) AS t (Deadlock)
WHERE
Deadlock.value ( '@name', 'nvarchar(128)' ) = N'xml_deadlock_report'
ORDER BY
Deadlock.value ( '@timestamp', 'datetime' );



__________________________________________________________________________________

Turbocharge Your Database Maintenance With Service Broker: Part 1
Real-Time Tracking of Tempdb Utilization Through Reporting Services
Monitoring Database Blocking Through SCOM 2007 Custom Rules and Alerts
Preparing for the Unthinkable - a Disaster/Recovery Implementation
Post #1399315
Posted Friday, December 21, 2012 5:12 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:26 AM
Points: 6,737, Visits: 11,791
I have not seen deadlock events in the system_health session that I thought should have been there. The session is setup to 'allow single event loss' so it's possible that is the reason but I never tracked it down fully.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1399344
Posted Tuesday, March 05, 2013 3:32 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, April 26, 2013 11:41 PM
Points: 72, Visits: 298
I am seeing this same issue. I was trying to evaluate to make a switch from using Event Notification and going through Extended Events due to the "multiple-victim" scenario that seems to be happening in our environment. However, I don't get the same amount of deadlocks and the last deadlock in the extended events happened more than a day ago.

It seems that the scenario you are seeing is the same that I am facing right now, have you ever find out what could the issue be?

Thanks a lot!
Post #1427060
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse