<?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>dm_os_buffer_descriptors &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/dm_os_buffer_descriptors/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Mon, 14 Aug 2017 20:23:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>SQL Server: When DBCC DROPCLEANBUFFERS fails, script to find dirty pages from Memory</title>
		<link>https://www.dbrnd.com/2017/08/sql-server-when-dbcc-dropcleanbuffers-fails-script-to-find-dirty-pages-from-memory-dm_os_buffer_descriptors/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 13 Aug 2017 16:16:45 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[DBCC DROPCLEANBUFFERS]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[dm_os_buffer_descriptors]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5818</guid>

					<description><![CDATA[In this post, I am sharing a script to check dirty pages or clean pages in SQL Server Memory area. Most of the DBAs know about DBCC DROPCLEANBUFFERS which clear the data or pages from the memory area. We need to execute DBCC DROPCLEANBUFFERS while testing the performance of queries. First time when you execute [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F08%2Fsql-server-when-dbcc-dropcleanbuffers-fails-script-to-find-dirty-pages-from-memory-dm_os_buffer_descriptors%2F&amp;linkname=SQL%20Server%3A%20When%20DBCC%20DROPCLEANBUFFERS%20fails%2C%20script%20to%20find%20dirty%20pages%20from%20Memory" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F08%2Fsql-server-when-dbcc-dropcleanbuffers-fails-script-to-find-dirty-pages-from-memory-dm_os_buffer_descriptors%2F&amp;linkname=SQL%20Server%3A%20When%20DBCC%20DROPCLEANBUFFERS%20fails%2C%20script%20to%20find%20dirty%20pages%20from%20Memory" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F08%2Fsql-server-when-dbcc-dropcleanbuffers-fails-script-to-find-dirty-pages-from-memory-dm_os_buffer_descriptors%2F&amp;linkname=SQL%20Server%3A%20When%20DBCC%20DROPCLEANBUFFERS%20fails%2C%20script%20to%20find%20dirty%20pages%20from%20Memory" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F08%2Fsql-server-when-dbcc-dropcleanbuffers-fails-script-to-find-dirty-pages-from-memory-dm_os_buffer_descriptors%2F&amp;linkname=SQL%20Server%3A%20When%20DBCC%20DROPCLEANBUFFERS%20fails%2C%20script%20to%20find%20dirty%20pages%20from%20Memory" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F08%2Fsql-server-when-dbcc-dropcleanbuffers-fails-script-to-find-dirty-pages-from-memory-dm_os_buffer_descriptors%2F&amp;linkname=SQL%20Server%3A%20When%20DBCC%20DROPCLEANBUFFERS%20fails%2C%20script%20to%20find%20dirty%20pages%20from%20Memory" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F08%2Fsql-server-when-dbcc-dropcleanbuffers-fails-script-to-find-dirty-pages-from-memory-dm_os_buffer_descriptors%2F&amp;linkname=SQL%20Server%3A%20When%20DBCC%20DROPCLEANBUFFERS%20fails%2C%20script%20to%20find%20dirty%20pages%20from%20Memory" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F08%2Fsql-server-when-dbcc-dropcleanbuffers-fails-script-to-find-dirty-pages-from-memory-dm_os_buffer_descriptors%2F&#038;title=SQL%20Server%3A%20When%20DBCC%20DROPCLEANBUFFERS%20fails%2C%20script%20to%20find%20dirty%20pages%20from%20Memory" data-a2a-url="https://www.dbrnd.com/2017/08/sql-server-when-dbcc-dropcleanbuffers-fails-script-to-find-dirty-pages-from-memory-dm_os_buffer_descriptors/" data-a2a-title="SQL Server: When DBCC DROPCLEANBUFFERS fails, script to find dirty pages from Memory"></a></p><p>In this post, I am sharing a script to check dirty pages or clean pages in SQL Server Memory area. Most of the DBAs know about DBCC DROPCLEANBUFFERS which clear the data or pages from the memory area.</p>
<blockquote><p>We need to execute DBCC DROPCLEANBUFFERS while testing the performance of queries. </p>
<p>First time when you execute your query, it requires physical reads but for the second execution it stores the information in memory, and it will perform fast compare to previous execution.</p></blockquote>
<p><em>But few people said that DBCC DROPCLEANBUFFERS is not working all the times. I don&#8217;t know why but found below script to check dirty pages and clean pages in the Memory area. </em></p>
<p>Dirty pages mean has not written to disk and Clean pages say the page is brought in to memory by the buffer manager.</p>
<blockquote data-secret="bjGeZB3Bqc" class="wp-embedded-content"><p><a href="https://www.dbrnd.com/2015/10/sql-server-dbcc-command-clean-cache-buffer-for-stored-procedure/">SQL Server: DBCC to Clean Cache and Clean Buffer for Stored Procedure</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/10/sql-server-dbcc-command-clean-cache-buffer-for-stored-procedure/embed/#?secret=bjGeZB3Bqc" data-secret="bjGeZB3Bqc" width="600" height="338" title="&#8220;SQL Server: DBCC to Clean Cache and Clean Buffer for Stored Procedure&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<pre class="crayon-plain-tag">SELECT 
    DatabaseName
	,DirtyPageCount
	,CleanPageCount
	,[DirtyPageCount] * 8 / 1024 AS DirtyPageInMB
    ,[CleanPageCount] * 8 / 1024 AS CleanPageInMB
FROM
    (SELECT
        (CASE WHEN ([database_id] = 32767)
            THEN N'Resource Database'
            ELSE DB_NAME ([database_id]) END) AS [DatabaseName],
        SUM (CASE WHEN ([is_modified] = 1)
            THEN 1 ELSE 0 END) AS [DirtyPageCount],
        SUM (CASE WHEN ([is_modified] = 1)
            THEN 0 ELSE 1 END) AS [CleanPageCount]
FROM sys.dm_os_buffer_descriptors
GROUP BY [database_id]) AS [buffers]
ORDER BY [DatabaseName]
GO</pre> </p>
<p><a href="https://www.sqlskills.com/blogs/paul/when-dbcc-dropcleanbuffers-doesnt-work/" target="_blank">Reference is taken from sqlskills.com:</a></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
