Solved

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

Posted on 2002-06-18
3
393 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
curtis591 earned 100 total points
ID: 7090928
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
ID: 7090949
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
ID: 7090994
I can't answer that myself.  
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

717 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