Solved

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

Posted on 2002-06-18
3
391 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
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
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.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

820 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