Analyze the Deadlock using the default system_health (Deadlock)

Source: Internet
Author: User
Before December 2008, we used profilertrace or traceflag1222, 1204. introduced a new feature in section 2008: ExtendedEvents (Extended events), which can monitor Deadlock events and improve performance.

Before December 2008, we used profilertrace or traceflag1222, 1204. introduced a new feature in section 2008: ExtendedEvents (Extended events), which can monitor Deadlock events and improve performance.

SELECT xed. value ('@ timestamp', 'datetime') as Creation_Date, xed. query ('. ') AS Extend_Event FROM (select cast ([target_data] as xml) AS Target_Data FROM sys. dm_xe_session_targetsAS xt INNERJOIN sys. dm_xe_sessions AS xs ONxs. address = xt. event_session_address WHERE xs. name = N 'System _ health' ANDxt.tar get_name = N 'ring _ buffer') AS XML_Data cross apply Target_Data.nodes ('ringbuffertarget/event [@ name = "xml_deadlock_report"] ') AS XEventData (xed) order by Creation_Date DESC

This article is from the "follow SQL Server Technology" blog. Be sure to keep this source

,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.