<?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>data exceeding &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/data-exceeding/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>Tue, 14 Nov 2017 11:36:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>SQL Server: Practical example of Exceeding the maximum row size of 8060</title>
		<link>https://www.dbrnd.com/2017/07/sql-server-practical-example-of-exceeding-the-maximum-row-size-of-8060/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 21 Jul 2017 16:16:36 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[8 kb]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[data exceeding]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[ROW OVERFLOW]]></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=5662</guid>

					<description><![CDATA[<div><img width="612" height="408" src="https://www.dbrnd.com/wp-content/uploads/2017/07/SQLDataOverFlow.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQL Data OverFlow" decoding="async" fetchpriority="high" /></div>I already have written a couple of articles on data overflow and data exceeding problem of SQL Server. For theory &#8211; You can access below articles because, In this post, I am sharing the practical example. SQL Server: What happened, when Row Overflow and Data Exceeding 8KB? SQL Server: The Internal Structure of the Data [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="612" height="408" src="https://www.dbrnd.com/wp-content/uploads/2017/07/SQLDataOverFlow.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQL Data OverFlow" decoding="async" loading="lazy" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F07%2Fsql-server-practical-example-of-exceeding-the-maximum-row-size-of-8060%2F&amp;linkname=SQL%20Server%3A%20Practical%20example%20of%20Exceeding%20the%20maximum%20row%20size%20of%208060" 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%2F07%2Fsql-server-practical-example-of-exceeding-the-maximum-row-size-of-8060%2F&amp;linkname=SQL%20Server%3A%20Practical%20example%20of%20Exceeding%20the%20maximum%20row%20size%20of%208060" 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%2F07%2Fsql-server-practical-example-of-exceeding-the-maximum-row-size-of-8060%2F&amp;linkname=SQL%20Server%3A%20Practical%20example%20of%20Exceeding%20the%20maximum%20row%20size%20of%208060" 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%2F07%2Fsql-server-practical-example-of-exceeding-the-maximum-row-size-of-8060%2F&amp;linkname=SQL%20Server%3A%20Practical%20example%20of%20Exceeding%20the%20maximum%20row%20size%20of%208060" 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%2F07%2Fsql-server-practical-example-of-exceeding-the-maximum-row-size-of-8060%2F&amp;linkname=SQL%20Server%3A%20Practical%20example%20of%20Exceeding%20the%20maximum%20row%20size%20of%208060" 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%2F07%2Fsql-server-practical-example-of-exceeding-the-maximum-row-size-of-8060%2F&amp;linkname=SQL%20Server%3A%20Practical%20example%20of%20Exceeding%20the%20maximum%20row%20size%20of%208060" 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%2F07%2Fsql-server-practical-example-of-exceeding-the-maximum-row-size-of-8060%2F&#038;title=SQL%20Server%3A%20Practical%20example%20of%20Exceeding%20the%20maximum%20row%20size%20of%208060" data-a2a-url="https://www.dbrnd.com/2017/07/sql-server-practical-example-of-exceeding-the-maximum-row-size-of-8060/" data-a2a-title="SQL Server: Practical example of Exceeding the maximum row size of 8060"></a></p><p>I already have written a couple of articles on data overflow and data exceeding problem of SQL Server.<br />
For theory &#8211; You can access below articles because, In this post, I am sharing the practical example. </p>
<blockquote class="wp-embedded-content" data-secret="bskmGMkA2c"><p><a href="https://www.dbrnd.com/2016/04/sql-server-what-happened-when-row-overflow-and-data-exceeding-8kb/">SQL Server: What happened, when Row Overflow and Data Exceeding 8KB?</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/04/sql-server-what-happened-when-row-overflow-and-data-exceeding-8kb/embed/#?secret=bskmGMkA2c" data-secret="bskmGMkA2c" width="600" height="338" title="&#8220;SQL Server: What happened, when Row Overflow and Data Exceeding 8KB?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote class="wp-embedded-content" data-secret="UH0PALvAgB"><p><a href="https://www.dbrnd.com/2016/04/sql-server-the-internal-structure-of-the-data-page/">SQL Server: The Internal Structure of the Data Page</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/04/sql-server-the-internal-structure-of-the-data-page/embed/#?secret=UH0PALvAgB" data-secret="UH0PALvAgB" width="600" height="338" title="&#8220;SQL Server: The Internal Structure of the Data Page&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p>Execute below steps and understand the 8kb fundamentals of SQL Server:</p>
<p><strong>Try to create a large table which exceeds 8055 bytes:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_LargeTable
(
   CharColumn1 CHAR(5000)
   ,CharColumn2 CHAR(3000)
   ,CharColumn3 CHAR(55)
)
GO</pre> </p>
<p><strong>You will get a below error:</strong></p>
<pre class="crayon-plain-tag">Msg 1701, Level 16, State 1, Line 1
Creating or altering table 'tbl_LargeTable' failed because the minimum row size would be 8062, including 7 bytes of internal overhead. This exceeds the maximum allowable table row size of 8060 bytes.</pre> </p>
<p><strong>Now, try to create a large table by adding one varchar column:</strong><br />
I changed CharColumn3 CHAR(55) to CHAR(40), and added new Varchar column.<br />
Here, you can create a table with the warning only because VARCHAR is variable type so if you try to add more data in VARCHAR which are crossing 8050 bytes, your insert or update will fail. </p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_LargeTable
(
   CharColumn1 CHAR(5000)
   ,CharColumn2 CHAR(3000)
   ,CharColumn3 CHAR(40)
   ,VarCollumn1 VARCHAR(1000)
)
GO</pre> </p>
<p><strong>You will get a below warning:</strong></p>
<pre class="crayon-plain-tag">Warning: The table "tbl_LargeTable" has been created, but its maximum row size exceeds the allowed maximum of 8060 bytes. INSERT or UPDATE to this table will fail if the resulting row exceeds the size limit.</pre> </p>
<p><strong>The Example of Successful INSERT:</strong></p>
<pre class="crayon-plain-tag">INSERT INTO tbl_LargeTable
VALUES
(
	REPLICATE('z', 5000),
	REPLICATE('b', 3000),
	REPLICATE('c', 40),
	REPLICATE('a', 5)
)</pre> </p>
<p><strong>The example of failed INSERT:</strong></p>
<pre class="crayon-plain-tag">INSERT INTO tbl_LargeTable
VALUES
(
	REPLICATE('z', 5000),
	REPLICATE('b', 3000),
	REPLICATE('c', 40),
	REPLICATE('a', 10)
)</pre> </p>
<p><strong>You will get below error:</strong></p>
<pre class="crayon-plain-tag">Msg 511, Level 16, State 1, Line 1
Cannot create a row of size 8061 which is greater than the allowable maximum row size of 8060.
The statement has been terminated.</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: What happened, when Row Overflow and Data Exceeding 8KB?</title>
		<link>https://www.dbrnd.com/2016/04/sql-server-what-happened-when-row-overflow-and-data-exceeding-8kb/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 14 Apr 2016 20:50:26 +0000</pubDate>
				<category><![CDATA[Database Designing]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[data exceeding]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[IN_ROW_DATA]]></category>
		<category><![CDATA[ROW OVERFLOW]]></category>
		<category><![CDATA[ROW_OVERFLOW_DATA]]></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=2292</guid>

					<description><![CDATA[In the previous article, I discussed the 8KB data page of the SQL Server, but what happened when the row is larger and cannot fit into a single 8KB page? Each row is strictly prohibited to use only 8KB size per data page, but the data type like char, varchar, nvarchar, and varbinary require more [&#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-what-happened-when-row-overflow-and-data-exceeding-8kb%2F&amp;linkname=SQL%20Server%3A%20What%20happened%2C%20when%20Row%20Overflow%20and%20Data%20Exceeding%208KB%3F" 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-what-happened-when-row-overflow-and-data-exceeding-8kb%2F&amp;linkname=SQL%20Server%3A%20What%20happened%2C%20when%20Row%20Overflow%20and%20Data%20Exceeding%208KB%3F" 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-what-happened-when-row-overflow-and-data-exceeding-8kb%2F&amp;linkname=SQL%20Server%3A%20What%20happened%2C%20when%20Row%20Overflow%20and%20Data%20Exceeding%208KB%3F" 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-what-happened-when-row-overflow-and-data-exceeding-8kb%2F&amp;linkname=SQL%20Server%3A%20What%20happened%2C%20when%20Row%20Overflow%20and%20Data%20Exceeding%208KB%3F" 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-what-happened-when-row-overflow-and-data-exceeding-8kb%2F&amp;linkname=SQL%20Server%3A%20What%20happened%2C%20when%20Row%20Overflow%20and%20Data%20Exceeding%208KB%3F" 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-what-happened-when-row-overflow-and-data-exceeding-8kb%2F&amp;linkname=SQL%20Server%3A%20What%20happened%2C%20when%20Row%20Overflow%20and%20Data%20Exceeding%208KB%3F" 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-what-happened-when-row-overflow-and-data-exceeding-8kb%2F&#038;title=SQL%20Server%3A%20What%20happened%2C%20when%20Row%20Overflow%20and%20Data%20Exceeding%208KB%3F" data-a2a-url="https://www.dbrnd.com/2016/04/sql-server-what-happened-when-row-overflow-and-data-exceeding-8kb/" data-a2a-title="SQL Server: What happened, when Row Overflow and Data Exceeding 8KB?"></a></p><p><em>In the previous article, I discussed the <a href="https://www.dbrnd.com/2016/04/sql-server-the-internal-structure-of-the-data-page/" target="_blank"><strong>8KB data page of the SQL Server</strong></a>, but what happened when the row is larger and cannot fit into a single 8KB page?</em></p>
<blockquote><p>Each row is strictly prohibited to use only 8KB size per data page, but the data type like char, varchar, nvarchar, and varbinary require more space to store data into data page. </p></blockquote>
<blockquote><p>Sometimes, the individual column may fit in the limit of 8KB, but if we have multiple columns and the combination of all these types of columns exceeds the limit of 8KB, SQL Server moves data in different allocation unit or raise an error. </p>
<p>e.g. we have three separate columns like VARCHAR(MAX), CHAR(6000) and TEXT so combination of these all columns cannot fit in the 8KB size.</p></blockquote>
<blockquote><p>The SQL Server Database Engine moves the record column with the largest width to another page in the ROW_OVERFLOW_DATA allocation unit, and it is maintaining a 24-byte pointer on the original page. </p></blockquote>
<blockquote><p>To moving of the large records to another page is a dynamic process because records can become a larger at any point of time while executing UPDATE operations. </p>
<p>If the UPDATE operation makes a small size of the record, it backs to the original page in the IN_ROW_DATA allocation unit.</p></blockquote>
<blockquote><p>Whenever we are combining VARCHAR, NVARCHAR, BLOB, VARBINARY kind of data column in a table, internally SQL Server separates the data pages because it may exceed the 8KB row size.
</p></blockquote>
<blockquote><p><em><strong>My suggestion is:</strong> if we have large size of data columns, we should create a separate table for those columns. Because asynchronously, we can perform JOIN operations, which is performing better than selecting data from internal fragmented pages. </em>
</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
