Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server: Msg 511

 
Saumya Nair
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i get this error when i run my query...

Server: Msg 511, Level 16, State 1, Line 5
Cannot create a row of size <rowlength> which is greater than the allowable maximum of 8060.
The statement has been terminated.


how can i resolve it ???

Regards
Saumya
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35266
383
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, can you provide some more information? Like what database you are using?
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This looks like a MS SQL Server error. Correct?

I suspect you are trying to update or insert a row that is larger than 8060 bytes.

You have a few options:

1. Shorten the data (i.e., is there a string that can be truncated?)
2. Convert any large char or varchar fields to text datatype
2. Move one or more columns to different tables.
 
Saumya Nair
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, i m using SQL server.

Our project is a maintenance project so can't make those major changes like shifting the columns to other table.We are trying by reducing the length of the fields. Is any other solution possible ??? As it there can be a data which exceeds 8060 bytes..

Regards,
Saumya
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As it there can be a data which exceeds 8060 bytes..


Yes, you can switch the datatype from char/varchar to text. In SQL Server 2000 (not sure about 2005), it can hold 2^31 -1 bytes per row.
 
Saumya Nair
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The data in each field is within the defiend range.This error occurs when the total data in the table exceeds 8060 bytes. I tried changing the length of different columns but in no way can i reduce it such a value,such that it is less than 8060 bytes. The existing data might get lost in that case. Tried reducing the length of the columns which need not be that large but still the error occurs


Regards,
Saumya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic