Solved

SQL Data Page Storage

Posted on 2011-09-15
2
319 Views
Last Modified: 2012-05-12
Reading through a book (SQL 2008) to increase my SQL knowledge in hopes of moving towards a DBA role and had a question.  The book states "Data pages contain data rows from tables. These rows cannot span pages. Because of the page header and row offset information, the maximum row size is limited to 8,060 bytes."

Is the row they are refering to an entire row in a table because it seems like a single row could easily be larger than 8060 bytes?  Or can a Data Page row be just a single column value with a table row spanning mutliple Data Pages?  If not what happens when a table row is larger than 8,060 bytes?

0
Comment
Question by:tim_cs
2 Comments
 
LVL 22

Accepted Solution

by:
pivar earned 500 total points
ID: 36546308
Hi,

No, a row can store maximum 8060 bytes. But you could use a blob, that is, datatypes VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX). They have a maximum size of 2GB, but add only 16 bytes to the 8060 bytes limit.

If you define a table with more than 8060 bytes, you will get an error.  You could define a table with varying length (varchars for instead) more than 8060 byte, but as soon as you exceed 8060 bytes of real data you will get an error.

/peter
0
 
LVL 15

Author Closing Comment

by:tim_cs
ID: 36548814
Ok, Thank You!!!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now