<?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>8 kb &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/8-kb/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, 11 Jul 2017 21:11:21 +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>
	</channel>
</rss>
