Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Data Page Storage

Posted on 2011-09-15
2
Medium Priority
?
330 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

885 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