{"id":947,"date":"2009-02-23T13:49:00","date_gmt":"2009-02-23T13:49:00","guid":{"rendered":"\/blogs\/paul\/post\/Getting-historical-deadlock-info-using-extended-events.aspx"},"modified":"2017-04-13T09:51:49","modified_gmt":"2017-04-13T16:51:49","slug":"getting-historical-deadlock-info-using-extended-events","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/","title":{"rendered":"Getting historical deadlock info using extended events"},"content":{"rendered":"<p><font face=\"verdana,geneva\" size=\"2\"><\/p>\n<p>\nIn the TechNet Magazine article I wrote on <a href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/technet-magazine-feature-article-on-advanced-troubleshooting-with-extended-events\/\">Advanced Troubleshooting with Extended Events<\/a>, I mentioned the always-on event session called system_health. <a href=\"http:\/\/sqlblog.com\/blogs\/jonathan_kehayias\/default.aspx\">Jonathan Kehayias<\/a>, a fellow MVP and blogging mad-man, posted a <a href=\"http:\/\/www.sqlservercentral.com\/articles\/deadlock\/65658\/\">great article<\/a> with SQL Server Central today about how to get historical deadlock graph info from it. His article explains some of the pre-reqs for doing this (like installing 2008 RTM CU1 &#8211; see <a href=\"https:\/\/support.microsoft.com\/kb\/956717\/en-us\">KB 956717<\/a> &#8211; to get it working and a bug with the XML output) and gives some code.\n<\/p>\n<p>\nAfter wrestling with the download of CU1 (it took 5 tries to get it to download!), I got it installed in one of my VPCs and gave Jon&#39;s code a whirl. I forced a deadlock by creating two tables, locking them from separate transactions and then trying to select from the other table. See the code below:\n<\/p>\n<p><font face=\"courier new,courier\"><\/p>\n<blockquote>\n<p>\n\t<font color=\"#008000\">&#8212; Connection 1:<\/font><br \/>\n\t<font color=\"#0000ff\">CREATE TABLE<\/font> t1 <font color=\"#808080\">(<\/font>c1 <font color=\"#0000ff\">INT<\/font><font color=\"#808080\">);<\/font><br \/>\n\t<font color=\"#0000ff\">INSERT INTO<\/font> t1 <font color=\"#0000ff\">VALUES<\/font> <font color=\"#808080\">(<\/font>1<font color=\"#808080\">);<\/font><br \/>\n\tGO\n\t<\/p>\n<p>\n\t<font color=\"#0000ff\">BEGIN TRAN<\/font><br \/>\n\t<font color=\"#0000ff\">UPDATE<\/font> t1 <font color=\"#0000ff\">SET<\/font> c1 <font color=\"#808080\">=<\/font> 2<font color=\"#808080\">;<\/font><br \/>\n\tGO\n\t<\/p>\n<p>\n\t<font color=\"#008000\">&#8212; Connection 2:<\/font><br \/>\n\t<font color=\"#0000ff\">CREATE TABLE<\/font> t2 <font color=\"#808080\">(<\/font>c1 <font color=\"#0000ff\">INT<\/font><font color=\"#808080\">);<\/font><br \/>\n\t<font color=\"#0000ff\">INSERT INTO<\/font> t2 <font color=\"#0000ff\">VALUES<\/font> <font color=\"#808080\">(<\/font>1<font color=\"#808080\">);<\/font><br \/>\n\tGO\n\t<\/p>\n<p>\n\t<font color=\"#0000ff\">BEGIN TRAN<\/font><br \/>\n\t<font color=\"#0000ff\">UPDATE<\/font> t2 <font color=\"#0000ff\">SET<\/font> c1 <font color=\"#808080\">=<\/font> 2<font color=\"#808080\">;<\/font><br \/>\n\tGO\n\t<\/p>\n<p>\n\t<font color=\"#008000\">&#8212; Connection 1:<\/font><br \/>\n\t<font color=\"#0000ff\">SELECT<\/font> <font color=\"#808080\">*<\/font> <font color=\"#0000ff\">FROM<\/font> t2<font color=\"#808080\">;<\/font><br \/>\n\tGO\n\t<\/p>\n<p>\n\t<font color=\"#008000\">&#8212; Connection 2:<\/font><br \/>\n\t<font color=\"#0000ff\">SELECT<\/font> <font color=\"#808080\">*<\/font> <font color=\"#0000ff\">FROM<\/font> t1<font color=\"#808080\">;<\/font><br \/>\n\tGO\n\t<\/p>\n<\/blockquote>\n<p><\/font><\/p>\n<p>\nAnd one of them will be killed by the deadlock monitor.\n<\/p>\n<p><font face=\"courier new,courier\"><\/p>\n<blockquote>\n<p>\n\t<font color=\"#ff0000\">Msg 1205, Level 13, State 45, Line 1<br \/>\n\tTransaction (Process ID 57) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.<\/font>\n\t<\/p>\n<\/blockquote>\n<p><\/font><\/p>\n<p>\nNow running Jon&#39;s (slightly reformatted) code:\n<\/p>\n<p><font face=\"courier new,courier\"><\/p>\n<blockquote>\n<p>\n\t<font color=\"#0000ff\">SELECT <\/font><font color=\"#ff00ff\">CAST <\/font><font color=\"#808080\">(<\/font><br \/>\n\t&nbsp;&nbsp;&nbsp; <font color=\"#ff00ff\">REPLACE <\/font><font color=\"#808080\">(<\/font><br \/>\n\t<font color=\"#ff00ff\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; REPLACE <\/font><font color=\"#808080\">(<\/font><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XEventData<font color=\"#808080\">.<\/font>XEvent<font color=\"#808080\">.<\/font>value <font color=\"#808080\">(<\/font><font color=\"#ff0000\">&#39;(data\/value)[1]&#39;<\/font><font color=\"#808080\">,<\/font> <font color=\"#ff0000\">&#39;varchar(max)&#39;<\/font><font color=\"#808080\">),<\/font><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#ff0000\">&#39;&lt;victim-list&gt;&#39;<\/font><font color=\"#808080\">, <\/font><font color=\"#ff0000\">&#39;&lt;deadlock&gt;&lt;victim-list&gt;&#39;<\/font><font color=\"#808080\">),<\/font><br \/>\n\t<font color=\"#ff0000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;&lt;process-list&gt;&#39;<\/font><font color=\"#808080\">, <\/font><font color=\"#ff0000\">&#39;&lt;\/victim-list&gt;&lt;process-list&gt;&#39;<\/font><font color=\"#808080\">)<\/font><br \/>\n\t<font color=\"#0000ff\">&nbsp;&nbsp;&nbsp;&nbsp;AS XML<\/font><font color=\"#808080\">)<\/font><font color=\"#0000ff\"> AS<\/font> DeadlockGraph<br \/>\n\t<font color=\"#0000ff\">FROM <\/font><font color=\"#808080\">(<\/font><font color=\"#0000ff\">SELECT<\/font> <font color=\"#ff00ff\">CAST <\/font><font color=\"#808080\">(<\/font>target_data <font color=\"#0000ff\">AS XML<\/font><font color=\"#808080\">)<\/font><font color=\"#0000ff\"> AS<\/font> TargetData<br \/>\n\t<font color=\"#0000ff\">&nbsp;&nbsp;&nbsp; FROM<\/font><font color=\"#008000\"> sys.dm_xe_session_targets<\/font> st<br \/>\n\t<font color=\"#808080\">&nbsp;&nbsp;&nbsp; JOIN<\/font><font color=\"#008000\"> sys.dm_xe_sessions<\/font> s <font color=\"#0000ff\">ON<\/font> s<font color=\"#808080\">.<\/font>address <font color=\"#808080\">=<\/font> st<font color=\"#808080\">.<\/font>event_session_address<br \/>\n\t<font color=\"#0000ff\">&nbsp;&nbsp;&nbsp; WHERE<\/font> [name] <font color=\"#808080\">= <\/font><font color=\"#ff0000\">&#39;system_health&#39;<\/font><font color=\"#808080\">)<\/font> <font color=\"#0000ff\">AS<\/font> Data<br \/>\n\t<font color=\"#808080\">CROSS APPLY<\/font> TargetData<font color=\"#808080\">.<\/font>nodes <font color=\"#808080\">(<\/font><font color=\"#ff0000\">&#39;\/\/RingBufferTarget\/event&#39;<\/font><font color=\"#808080\">)<\/font> <font color=\"#0000ff\">AS<\/font> XEventData <font color=\"#808080\">(<\/font>XEvent<font color=\"#808080\">)<\/font><br \/>\n\t<font color=\"#0000ff\">&nbsp;&nbsp;&nbsp; WHERE<\/font> XEventData<font color=\"#808080\">.<\/font>XEvent<font color=\"#808080\">.<\/font>value<font color=\"#808080\">(<\/font><font color=\"#ff0000\">&#39;@name&#39;<\/font><font color=\"#808080\">, <\/font><font color=\"#ff0000\">&#39;varchar(4000)&#39;<\/font><font color=\"#808080\">) = <\/font><font color=\"#ff0000\">&#39;xml_deadlock_report&#39;<\/font><font color=\"#808080\">;<\/font>\n\t<\/p>\n<\/blockquote>\n<p><\/font><\/p>\n<p>\nGives the XML deadlock graph (which unfortunately can&#39;t be displayed graphically because the format differs from the Profiler\/trace-flag output)\n<\/p>\n<p><font face=\"courier new,courier\"><\/p>\n<blockquote><p>\n\t&lt;deadlock-list&gt;<br \/>\n\t&nbsp; &lt;deadlock&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;victim-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;victimProcess id=&quot;process53d9000&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;\/victim-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;process-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;process id=&quot;process53d9000&quot; taskpriority=&quot;0&quot; logused=&quot;256&quot; waitresource=&quot;RID: 1:1:304:0&quot; waittime=&quot;331&quot; ownerId=&quot;1868&quot; transactionname=&quot;user_transaction&quot; lasttranstarted=&quot;2009-02-23T13:32:05.100&quot; XDES=&quot;0x4eb8c10&quot; lockMode=&quot;S&quot; schedulerid=&quot;1&quot; kpid=&quot;2216&quot; status=&quot;suspended&quot; spid=&quot;57&quot; sbid=&quot;0&quot; ecid=&quot;0&quot; priority=&quot;0&quot; trancount=&quot;1&quot; lastbatchstarted=&quot;2009-02-23T13:32:33.093&quot; lastbatchcompleted=&quot;2009-02-23T13:32:05.100&quot; clientapp=&quot;Microsoft SQL Server Management Studio &#8211; Query&quot; hostname=&quot;CHICAGO&quot; hostpid=&quot;2552&quot; loginname=&quot;CHICAGO\\Administrator&quot; isolationlevel=&quot;read committed (2)&quot; xactid=&quot;1868&quot; currentdb=&quot;1&quot; lockTimeout=&quot;4294967295&quot; clientoption1=&quot;671090784&quot; clientoption2=&quot;390200&quot;&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;executionStack&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;frame procname=&quot;&quot; line=&quot;1&quot; sqlhandle=&quot;0x02000000c70b7b1daba27f2ddf3e772600949464d524b6f2&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/executionStack&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;inputbuf&gt;<br \/>\n\tSELECT * FROM t1;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;\/inputbuf&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/process&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;process id=&quot;process4985558&quot; taskpriority=&quot;0&quot; logused=&quot;256&quot; waitresource=&quot;RID: 1:1:294:0&quot; waittime=&quot;10181&quot; ownerId=&quot;1877&quot; transactionname=&quot;user_transaction&quot; lasttranstarted=&quot;2009-02-23T13:32:08.067&quot; XDES=&quot;0x4eb9be0&quot; lockMode=&quot;S&quot; schedulerid=&quot;1&quot; kpid=&quot;2020&quot; status=&quot;suspended&quot; spid=&quot;56&quot; sbid=&quot;0&quot; ecid=&quot;0&quot; priority=&quot;0&quot; trancount=&quot;1&quot; lastbatchstarted=&quot;2009-02-23T13:32:23.240&quot; lastbatchcompleted=&quot;2009-02-23T13:32:08.067&quot; clientapp=&quot;Microsoft SQL Server Management Studio &#8211; Query&quot; hostname=&quot;CHICAGO&quot; hostpid=&quot;2552&quot; loginname=&quot;CHICAGO\\Administrator&quot; isolationlevel=&quot;read committed (2)&quot; xactid=&quot;1877&quot; currentdb=&quot;1&quot; lockTimeout=&quot;4294967295&quot; clientoption1=&quot;671090784&quot; clientoption2=&quot;390200&quot;&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;executionStack&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;frame procname=&quot;&quot; line=&quot;1&quot; sqlhandle=&quot;0x02000000f4d34532698b7ad324df813feb2ba5024730cb79&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/executionStack&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;inputbuf&gt;<br \/>\n\tSELECT * FROM t2;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;\/inputbuf&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/process&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;\/process-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;resource-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ridlock fileid=&quot;1&quot; pageid=&quot;304&quot; dbid=&quot;1&quot; objectname=&quot;&quot; id=&quot;lock47aea80&quot; mode=&quot;X&quot; associatedObjectId=&quot;72057594039042048&quot;&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;owner-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;owner id=&quot;process4985558&quot; mode=&quot;X&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/owner-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;waiter-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;waiter id=&quot;process53d9000&quot; mode=&quot;S&quot; requestType=&quot;wait&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/waiter-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/ridlock&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ridlock fileid=&quot;1&quot; pageid=&quot;294&quot; dbid=&quot;1&quot; objectname=&quot;&quot; id=&quot;lock47af200&quot; mode=&quot;X&quot; associatedObjectId=&quot;72057594038976512&quot;&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;owner-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;owner id=&quot;process53d9000&quot; mode=&quot;X&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/owner-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;waiter-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;waiter id=&quot;process4985558&quot; mode=&quot;S&quot; requestType=&quot;wait&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/waiter-list&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/ridlock&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;\/resource-list&gt;<br \/>\n\t&nbsp; &lt;\/deadlock&gt;<br \/>\n\t&lt;\/deadlock-list&gt;\n<\/p><\/blockquote>\n<p><\/font><\/p>\n<p>\nCool!\n<\/p>\n<p><\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the TechNet Magazine article I wrote on Advanced Troubleshooting with Extended Events, I mentioned the always-on event session called system_health. Jonathan Kehayias, a fellow MVP and blogging mad-man, posted a great article with SQL Server Central today about how to get historical deadlock graph info from it. His article explains some of the pre-reqs [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,39,57,86],"tags":[],"class_list":["post-947","post","type-post","status-publish","format-standard","hentry","category-example-scripts","category-extended-events","category-locking","category-sql-server-2008"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Getting historical deadlock info using extended events - Paul S. Randal<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting historical deadlock info using extended events - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"In the TechNet Magazine article I wrote on Advanced Troubleshooting with Extended Events, I mentioned the always-on event session called system_health. Jonathan Kehayias, a fellow MVP and blogging mad-man, posted a great article with SQL Server Central today about how to get historical deadlock graph info from it. His article explains some of the pre-reqs [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2009-02-23T13:49:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-13T16:51:49+00:00\" \/>\n<meta name=\"author\" content=\"Paul Randal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul Randal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/\",\"name\":\"Getting historical deadlock info using extended events - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2009-02-23T13:49:00+00:00\",\"dateModified\":\"2017-04-13T16:51:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Getting historical deadlock info using extended events\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\",\"name\":\"Paul S. Randal\",\"description\":\"In Recovery...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\",\"name\":\"Paul Randal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"caption\":\"Paul Randal\"},\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/paul\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Getting historical deadlock info using extended events - Paul S. Randal","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/","og_locale":"en_US","og_type":"article","og_title":"Getting historical deadlock info using extended events - Paul S. Randal","og_description":"In the TechNet Magazine article I wrote on Advanced Troubleshooting with Extended Events, I mentioned the always-on event session called system_health. Jonathan Kehayias, a fellow MVP and blogging mad-man, posted a great article with SQL Server Central today about how to get historical deadlock graph info from it. His article explains some of the pre-reqs [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/","og_site_name":"Paul S. Randal","article_published_time":"2009-02-23T13:49:00+00:00","article_modified_time":"2017-04-13T16:51:49+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/","name":"Getting historical deadlock info using extended events - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2009-02-23T13:49:00+00:00","dateModified":"2017-04-13T16:51:49+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/getting-historical-deadlock-info-using-extended-events\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"Getting historical deadlock info using extended events"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/","name":"Paul S. Randal","description":"In Recovery...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce","name":"Paul Randal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","caption":"Paul Randal"},"sameAs":["http:\/\/3.209.169.194\/blogs\/paul"],"url":"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/947","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/comments?post=947"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/947\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}