<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Locks &amp; Waits &#8211; SQLpowered.com</title>
	<atom:link href="https://sqlpowered.com/script-category/locks-waits/feed/" rel="self" type="application/rss+xml" />
	<link>https://sqlpowered.com</link>
	<description>SQL Server + BI</description>
	<lastBuildDate>Wed, 09 Oct 2019 11:10:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://sqlpowered.com/wp-content/uploads/2020/07/FavIcon-e1594067873682-99x100.png</url>
	<title>Locks &amp; Waits &#8211; SQLpowered.com</title>
	<link>https://sqlpowered.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Deadlock Chart from XE Ring Buffer</title>
		<link>https://sqlpowered.com/script/deadlock-chart-from-xe-ring-buffer/</link>
		
		<dc:creator><![CDATA[Jan Dvořák]]></dc:creator>
		<pubDate>Wed, 09 Oct 2019 11:10:18 +0000</pubDate>
				<guid isPermaLink="false">https://sqlpowered.com/?post_type=script&#038;p=3184</guid>

					<description><![CDATA[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] INNER JOIN [sys].[dm_xe_sessions] [s] ON [s].[address] = [st].[event_session_address] WHERE [s].[NAME]...]]></description>
										<content:encoded><![CDATA[<p>Simple script to obtain deadlock graph from default XE session system_health. Contains only deadlocks capture for certain period of time back (hours).</p>
<pre class="lang:tsql decode:true ">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]
				INNER JOIN [sys].[dm_xe_sessions] [s] ON [s].[address] = [st].[event_session_address]
			  WHERE [s].[NAME] = 'system_health' AND [st].[target_name] = 'ring_buffer'
        ) [Data]
		CROSS APPLY [td].[nodes]('RingBufferTarget/event[@name="xml_deadlock_report"]') AS [XEventData]([xe])
) [a]
GO</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
