<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>Comments on: SQL Server Connection Reset for Connection Pooling</title>
	<atom:link href="http://thinknook.com/sql-server-connection-reset-for-connection-pooling-2012-02-26/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinknook.com/sql-server-connection-reset-for-connection-pooling-2012-02-26/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sql-server-connection-reset-for-connection-pooling</link>
	<description>Because the world needs another Business Intelligence blog!</description>
	<lastBuildDate>Fri, 14 Sep 2018 19:30:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>By: Prakash Bhojegowda</title>
		<link>http://thinknook.com/sql-server-connection-reset-for-connection-pooling-2012-02-26/#comment-3483</link>
		<dc:creator><![CDATA[Prakash Bhojegowda]]></dc:creator>
		<pubDate>Mon, 18 Sep 2017 17:46:48 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=447#comment-3483</guid>
		<description><![CDATA[Good article!]]></description>
		<content:encoded><![CDATA[<p>Good article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://thinknook.com/sql-server-connection-reset-for-connection-pooling-2012-02-26/#comment-1006</link>
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 26 Nov 2012 10:52:59 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=447#comment-1006</guid>
		<description><![CDATA[Hey Chandan,

I think this is to do with the way the OS Ring Buffer records notifications (or traces).
You can try this procedure instead (using NotificationTime rather than RecordTime):


;WITH connectivity_ring_buffer as 
(SELECT
cast(record as xml).value(&#039;(Record/@id)[1]&#039;, &#039;int&#039;) as id,
cast(record as xml).value(&#039;(Record/@type)[1]&#039;, &#039;varchar(50)&#039;) as type,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/RecordType)[1]&#039;, &#039;varchar(50)&#039;) as RecordType,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/RecordSource)[1]&#039;, &#039;varchar(50)&#039;) as RecordSource,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/Spid)[1]&#039;, &#039;int&#039;) as Spid,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/SniConnectionId)[1]&#039;, &#039;uniqueidentifier&#039;) as SniConnectionId,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/SniProvider)[1]&#039;, &#039;int&#039;) as SniProvider,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/OSError)[1]&#039;, &#039;int&#039;) as OSError,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/SniConsumerError)[1]&#039;, &#039;int&#039;) as SniConsumerError,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/State)[1]&#039;, &#039;int&#039;) as State,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/RemoteHost)[1]&#039;, &#039;varchar(50)&#039;) as RemoteHost,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/RemotePort)[1]&#039;, &#039;varchar(50)&#039;) as RemotePort,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/LocalHost)[1]&#039;, &#039;varchar(50)&#039;) as LocalHost,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/LocalPort)[1]&#039;, &#039;varchar(50)&#039;) as LocalPort,
dateadd (ms, rbf.[timestamp] - tme.ms_ticks, GETDATE()) as NotificationTime,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/LoginTimers/TotalLoginTimeInMilliseconds)[1]&#039;, &#039;bigint&#039;) as TotalLoginTimeInMilliseconds,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/LoginTimers/LoginTaskEnqueuedInMilliseconds)[1]&#039;, &#039;bigint&#039;) as LoginTaskEnqueuedInMilliseconds,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/LoginTimers/NetworkWritesInMilliseconds)[1]&#039;, &#039;bigint&#039;) as NetworkWritesInMilliseconds,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/LoginTimers/NetworkReadsInMilliseconds)[1]&#039;, &#039;bigint&#039;) as NetworkReadsInMilliseconds,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/LoginTimers/SslProcessingInMilliseconds)[1]&#039;, &#039;bigint&#039;) as SslProcessingInMilliseconds,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/LoginTimers/SspiProcessingInMilliseconds)[1]&#039;, &#039;bigint&#039;) as SspiProcessingInMilliseconds,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/LoginTimers/LoginTriggerAndResourceGovernorProcessingInMilliseconds)[1]&#039;, &#039;bigint&#039;) as LoginTriggerAndResourceGovernorProcessingInMilliseconds,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/TdsBuffersInformation/TdsInputBufferError)[1]&#039;, &#039;int&#039;) as TdsInputBufferError,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/TdsBuffersInformation/TdsOutputBufferError)[1]&#039;, &#039;int&#039;) as TdsOutputBufferError,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/TdsBuffersInformation/TdsInputBufferBytes)[1]&#039;, &#039;int&#039;) as TdsInputBufferBytes,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/PhysicalConnectionIsKilled)[1]&#039;, &#039;int&#039;) as PhysicalConnectionIsKilled,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/DisconnectDueToReadError)[1]&#039;, &#039;int&#039;) as DisconnectDueToReadError,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/NetworkErrorFoundInInputStream)[1]&#039;, &#039;int&#039;) as NetworkErrorFoundInInputStream,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/ErrorFoundBeforeLogin)[1]&#039;, &#039;int&#039;) as ErrorFoundBeforeLogin,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/SessionIsKilled)[1]&#039;, &#039;int&#039;) as SessionIsKilled,
cast(record as xml).value(&#039;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/NormalDisconnect)[1]&#039;, &#039;int&#039;) as NormalDisconnect
--record.value(&#039;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/NormalLogout)[1]&#039;, &#039;int&#039;) as NormalLogout
FROM
sys.dm_os_ring_buffers rbf
cross join sys.dm_os_sys_info tme
WHERE ring_buffer_type = &#039;RING_BUFFER_CONNECTIVITY&#039;

)
SELECT c.NotificationTime,m.[text],* 
FROM connectivity_ring_buffer c 
    LEFT JOIN sys.messages m ON c.SniConsumerError = m.message_id AND m.language_id = 1033 
ORDER BY c.NotificationTime DESC]]></description>
		<content:encoded><![CDATA[<p>Hey Chandan,</p>
<p>I think this is to do with the way the OS Ring Buffer records notifications (or traces).<br />
You can try this procedure instead (using NotificationTime rather than RecordTime):</p>
<p>;WITH connectivity_ring_buffer as<br />
(SELECT<br />
cast(record as xml).value(&#8216;(Record/@id)[1]&#8217;, &#8216;int&#8217;) as id,<br />
cast(record as xml).value(&#8216;(Record/@type)[1]&#8217;, &#8216;varchar(50)&#8217;) as type,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/RecordType)[1]&#8217;, &#8216;varchar(50)&#8217;) as RecordType,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/RecordSource)[1]&#8217;, &#8216;varchar(50)&#8217;) as RecordSource,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/Spid)[1]&#8217;, &#8216;int&#8217;) as Spid,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/SniConnectionId)[1]&#8217;, &#8216;uniqueidentifier&#8217;) as SniConnectionId,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/SniProvider)[1]&#8217;, &#8216;int&#8217;) as SniProvider,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/OSError)[1]&#8217;, &#8216;int&#8217;) as OSError,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/SniConsumerError)[1]&#8217;, &#8216;int&#8217;) as SniConsumerError,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/State)[1]&#8217;, &#8216;int&#8217;) as State,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/RemoteHost)[1]&#8217;, &#8216;varchar(50)&#8217;) as RemoteHost,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/RemotePort)[1]&#8217;, &#8216;varchar(50)&#8217;) as RemotePort,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/LocalHost)[1]&#8217;, &#8216;varchar(50)&#8217;) as LocalHost,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/LocalPort)[1]&#8217;, &#8216;varchar(50)&#8217;) as LocalPort,<br />
dateadd (ms, rbf.[timestamp] &#8211; tme.ms_ticks, GETDATE()) as NotificationTime,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/LoginTimers/TotalLoginTimeInMilliseconds)[1]&#8217;, &#8216;bigint&#8217;) as TotalLoginTimeInMilliseconds,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/LoginTimers/LoginTaskEnqueuedInMilliseconds)[1]&#8217;, &#8216;bigint&#8217;) as LoginTaskEnqueuedInMilliseconds,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/LoginTimers/NetworkWritesInMilliseconds)[1]&#8217;, &#8216;bigint&#8217;) as NetworkWritesInMilliseconds,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/LoginTimers/NetworkReadsInMilliseconds)[1]&#8217;, &#8216;bigint&#8217;) as NetworkReadsInMilliseconds,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/LoginTimers/SslProcessingInMilliseconds)[1]&#8217;, &#8216;bigint&#8217;) as SslProcessingInMilliseconds,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/LoginTimers/SspiProcessingInMilliseconds)[1]&#8217;, &#8216;bigint&#8217;) as SspiProcessingInMilliseconds,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/LoginTimers/LoginTriggerAndResourceGovernorProcessingInMilliseconds)[1]&#8217;, &#8216;bigint&#8217;) as LoginTriggerAndResourceGovernorProcessingInMilliseconds,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/TdsBuffersInformation/TdsInputBufferError)[1]&#8217;, &#8216;int&#8217;) as TdsInputBufferError,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/TdsBuffersInformation/TdsOutputBufferError)[1]&#8217;, &#8216;int&#8217;) as TdsOutputBufferError,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/TdsBuffersInformation/TdsInputBufferBytes)[1]&#8217;, &#8216;int&#8217;) as TdsInputBufferBytes,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/PhysicalConnectionIsKilled)[1]&#8217;, &#8216;int&#8217;) as PhysicalConnectionIsKilled,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/DisconnectDueToReadError)[1]&#8217;, &#8216;int&#8217;) as DisconnectDueToReadError,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/NetworkErrorFoundInInputStream)[1]&#8217;, &#8216;int&#8217;) as NetworkErrorFoundInInputStream,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/ErrorFoundBeforeLogin)[1]&#8217;, &#8216;int&#8217;) as ErrorFoundBeforeLogin,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/SessionIsKilled)[1]&#8217;, &#8216;int&#8217;) as SessionIsKilled,<br />
cast(record as xml).value(&#8216;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/NormalDisconnect)[1]&#8217;, &#8216;int&#8217;) as NormalDisconnect<br />
&#8211;record.value(&#8216;(Record/ConnectivityTraceRecord/TdsDisconnectFlags/NormalLogout)[1]&#8217;, &#8216;int&#8217;) as NormalLogout<br />
FROM<br />
sys.dm_os_ring_buffers rbf<br />
cross join sys.dm_os_sys_info tme<br />
WHERE ring_buffer_type = &#8216;RING_BUFFER_CONNECTIVITY&#8217;</p>
<p>)<br />
SELECT c.NotificationTime,m.,*<br />
FROM connectivity_ring_buffer c<br />
    LEFT JOIN sys.messages m ON c.SniConsumerError = m.message_id AND m.language_id = 1033<br />
ORDER BY c.NotificationTime DESC</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chandan Jha</title>
		<link>http://thinknook.com/sql-server-connection-reset-for-connection-pooling-2012-02-26/#comment-1005</link>
		<dc:creator><![CDATA[Chandan Jha]]></dc:creator>
		<pubDate>Mon, 26 Nov 2012 09:48:54 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=447#comment-1005</guid>
		<description><![CDATA[I tried that script but the time stamp that it gives are wrong in my case. for example it is yet to clock 8 am EST on 26th NOV but I already see that timing in my results. any ideas?

Thanks
Chandan]]></description>
		<content:encoded><![CDATA[<p>I tried that script but the time stamp that it gives are wrong in my case. for example it is yet to clock 8 am EST on 26th NOV but I already see that timing in my results. any ideas?</p>
<p>Thanks<br />
Chandan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://thinknook.com/sql-server-connection-reset-for-connection-pooling-2012-02-26/#comment-708</link>
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 26 Oct 2012 21:34:25 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=447#comment-708</guid>
		<description><![CDATA[Thats true, in some cases it can be really difficult to diagnose the issue after a SQL restart since many stats reset, unless ofcourse you were profiling the session. As you suggested I would keep an eye and next time it happens you can start digging around in the right places.]]></description>
		<content:encoded><![CDATA[<p>Thats true, in some cases it can be really difficult to diagnose the issue after a SQL restart since many stats reset, unless ofcourse you were profiling the session. As you suggested I would keep an eye and next time it happens you can start digging around in the right places.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saurabh Sinha</title>
		<link>http://thinknook.com/sql-server-connection-reset-for-connection-pooling-2012-02-26/#comment-703</link>
		<dc:creator><![CDATA[Saurabh Sinha]]></dc:creator>
		<pubDate>Thu, 25 Oct 2012 15:13:59 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=447#comment-703</guid>
		<description><![CDATA[Thanks for sharing query , but it doesnt give records before sql restart  so have to wait for re-occurence of issue]]></description>
		<content:encoded><![CDATA[<p>Thanks for sharing query , but it doesnt give records before sql restart  so have to wait for re-occurence of issue</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://thinknook.com/sql-server-connection-reset-for-connection-pooling-2012-02-26/#comment-450</link>
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 14 Jun 2012 12:48:54 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=447#comment-450</guid>
		<description><![CDATA[Cheers! And thanks for pointing out the &quot;record.value&quot; issue,

Its a little quirk in the syntax highlighter plugin am using, which is applying some capitalization on its own, I&#039;ve turned that off, doesn&#039;t look as pretty, but atleast it isnt wrong :)]]></description>
		<content:encoded><![CDATA[<p>Cheers! And thanks for pointing out the &#8220;record.value&#8221; issue,</p>
<p>Its a little quirk in the syntax highlighter plugin am using, which is applying some capitalization on its own, I&#8217;ve turned that off, doesn&#8217;t look as pretty, but atleast it isnt wrong <img src="http://thinknook.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carsten Johannesen</title>
		<link>http://thinknook.com/sql-server-connection-reset-for-connection-pooling-2012-02-26/#comment-449</link>
		<dc:creator><![CDATA[Carsten Johannesen]]></dc:creator>
		<pubDate>Thu, 14 Jun 2012 11:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=447#comment-449</guid>
		<description><![CDATA[The code in the XML conversion script must be &quot;record.value&quot; and not &quot;record.VALUE&quot;, as the function name is case sensitive. Otherwise excellent article.]]></description>
		<content:encoded><![CDATA[<p>The code in the XML conversion script must be &#8220;record.value&#8221; and not &#8220;record.VALUE&#8221;, as the function name is case sensitive. Otherwise excellent article.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.w3-edge.com/products/


Served from: thinknook.com @ 2026-04-07 21:39:08 by W3 Total Cache
-->