<?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>Shared Global Allocation Map &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/shared-global-allocation-map/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>Thu, 16 Nov 2017 07:12:38 +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: GAM and SGAM Pages to find the Extent Space Information</title>
		<link>https://www.dbrnd.com/2016/04/sql-server-gam-and-sgam-pages-to-find-the-extent-space-information/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 17 Apr 2016 21:16:21 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[extent]]></category>
		<category><![CDATA[GAM]]></category>
		<category><![CDATA[Global Allocation Map]]></category>
		<category><![CDATA[SGAM]]></category>
		<category><![CDATA[Shared Global Allocation Map]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=2325</guid>

					<description><![CDATA[In the previous article, I shared information about the SQL Server Extent which is storing eight data pages. The SQL Server manages two important pages to store information about occupied and free space of each extent. GAM: Stands for Global Allocation Map. SGAM: Stands for Shared Global Allocation Map. Global Allocation Map (GAM): GAM has [&#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%2F2016%2F04%2Fsql-server-gam-and-sgam-pages-to-find-the-extent-space-information%2F&amp;linkname=SQL%20Server%3A%20GAM%20and%20SGAM%20Pages%20to%20find%20the%20Extent%20Space%20Information" 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%2F2016%2F04%2Fsql-server-gam-and-sgam-pages-to-find-the-extent-space-information%2F&amp;linkname=SQL%20Server%3A%20GAM%20and%20SGAM%20Pages%20to%20find%20the%20Extent%20Space%20Information" 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%2F2016%2F04%2Fsql-server-gam-and-sgam-pages-to-find-the-extent-space-information%2F&amp;linkname=SQL%20Server%3A%20GAM%20and%20SGAM%20Pages%20to%20find%20the%20Extent%20Space%20Information" 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%2F2016%2F04%2Fsql-server-gam-and-sgam-pages-to-find-the-extent-space-information%2F&amp;linkname=SQL%20Server%3A%20GAM%20and%20SGAM%20Pages%20to%20find%20the%20Extent%20Space%20Information" 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%2F2016%2F04%2Fsql-server-gam-and-sgam-pages-to-find-the-extent-space-information%2F&amp;linkname=SQL%20Server%3A%20GAM%20and%20SGAM%20Pages%20to%20find%20the%20Extent%20Space%20Information" 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%2F2016%2F04%2Fsql-server-gam-and-sgam-pages-to-find-the-extent-space-information%2F&amp;linkname=SQL%20Server%3A%20GAM%20and%20SGAM%20Pages%20to%20find%20the%20Extent%20Space%20Information" 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%2F2016%2F04%2Fsql-server-gam-and-sgam-pages-to-find-the-extent-space-information%2F&#038;title=SQL%20Server%3A%20GAM%20and%20SGAM%20Pages%20to%20find%20the%20Extent%20Space%20Information" data-a2a-url="https://www.dbrnd.com/2016/04/sql-server-gam-and-sgam-pages-to-find-the-extent-space-information/" data-a2a-title="SQL Server: GAM and SGAM Pages to find the Extent Space Information"></a></p><p>In the previous article, I shared information about the <a href="https://www.dbrnd.com/2016/04/sql-server-understanding-the-role-of-extent/" target="_blank"><strong>SQL Server Extent</strong></a> which is storing eight data pages.</p>
<p>The SQL Server manages two important pages to store information about occupied and free space of each extent.</p>
<p><em>GAM: Stands for Global Allocation Map.<br />
SGAM: Stands for Shared Global Allocation Map.</em></p>
<p><strong>Global Allocation Map (GAM):</strong></p>
<blockquote><p>GAM has a bit for every extent, and it records what extents have been allocated for any use.</p>
<p>It stores information about both Uniform and Mixed extents.</p></blockquote>
<blockquote><p>If the bit value is 0, extent is in use, and If the bit value is 1, extent is free.<br />
It can hold information about the total 64000 extents, and approximately size is 4000 MB.</p></blockquote>
<blockquote><p>When a new page needs to be allocated, SQL Server finds available extent into GAM pages. When an extent is de-allocated, the bit for this extent is reset in GAM and it makes an available for future allocations.</p></blockquote>
<p><strong>Shared Global Allocation Map (SGAM):</strong></p>
<blockquote><p>SGAM has a bit for every extent, and it records what extents are currently being used as mixed extent and have at least one unused page.</p></blockquote>
<blockquote><p>If the bit value is 0, either extent is not a mixed extent, or it is a mixed extent and all its pages being used.<br />
If the bit value is 1, it is a mixed extent and having an at least one unused page.</p></blockquote>
<blockquote><p>It can hold information about the total 64000 extents and approximately size is 4000 MB.</p>
<p>When almost all extents are full and SQL Server unable to find free extent information from the GAM page, it uses the SGAM page to find the information about the free extent.</p></blockquote>
<p><strong>DBCC PAGE to check Allocation Status:</strong></p><pre class="crayon-plain-tag">/*
FileID: 1
PageID: 296
*/
DBCC TRACEON(3604)
GO
DBCC PAGE('database_name',1,296,3)</pre><p>
<p><a href="https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerGAMPage.png" rel="attachment wp-att-2333"><img fetchpriority="high" decoding="async" class="alignnone wp-image-2333 size-full" title="SQL Server GAM Page" src="https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerGAMPage.png" alt="SQL Server GAM Page" width="728" height="71" srcset="https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerGAMPage.png 728w, https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerGAMPage-300x29.png 300w, https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerGAMPage-150x15.png 150w" sizes="(max-width: 728px) 100vw, 728px" /></a></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
