[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 400
  • Last Modified:

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

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
deeznutz
Asked:
deeznutz
  • 2
1 Solution
 
curtis591Commented:
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
 
deeznutzAuthor Commented:
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
 
curtis591Commented:
I can't answer that myself.  
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now