Solved

Warning: The table .. .has been created but its maximum row size (8102) exceeds the maximum...

Posted on 2002-06-18
3
389 Views
Last Modified: 2008-03-10
When I create the table a get the following error,
Warning: The table 't_COM_AuditEntryData' has been created but its maximum row size (8102) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.

Here is the table script.

CREATE TABLE dbo.t_COM_AuditEntryData
(
         AuditEntryDataID     d_ID             IDENTITY,
         AuditEntryID          d_ID               ,
         BeforeOrAfter        d_BeforeAfter          , --B or A
     AuditDataString          Varchar(8000)          ,
         UpdatedDate          datetime      NULL      ,
     UpdatedBy          varchar(50)      NULL

)

The row causing the grief I figured is AuditDataString varchar(8000), when I change to AuditDataString          Varchar(7500) I dont get the error, what I dont understand is that it does not exceed 8060? WHat am I missing, and more importantly how do I resolve this?
0
Comment
Question by:deeznutz
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
curtis591 earned 100 total points
Comment Utility
You are hitting the maximum number of bytes you can have in a row in a sql table.   If you add up the size it takes you to store your 6 fields in your table it should total 8102.  You can see the amount of space each data type takes inside Enterprise Manager.  One thing you can do to fix it is to turn your big field into a text data type.
0
 
LVL 1

Author Comment

by:deeznutz
Comment Utility
Strangly enough when I add the total for lenght of the datafield in Enterprise manager I get 8077 and not the 8102 indicated by the warning, what gives? Where is the difference in 25?
0
 
LVL 6

Expert Comment

by:curtis591
Comment Utility
I can't answer that myself.  
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

728 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

10 Experts available now in Live!

Get 1:1 Help Now