Cannot create a row of size 8937 which is greater than the allowable maximum of 8060

Viewed 50245

We are getting this error on a table in our database:

Cannot create a row of size 8937 which is greater than the allowable maximum of 8060.

The table consists of about 400 varchar(max) fields. We are, however, only inserting empty strings into these fields.

The insert seems to work, however when using SqlXml to read the data or when running DBCC DBREINDEX on the primary key of the table, the error occurs.

It is only occurring on one particular SQL Server (2005) and not on others (2005 Express). The problem machine is running 64-bit Windows and the others are running 32-bit windows.

Has anyone got any ideas about this? Please let me know if I need to include any more information.

I'd like to point out that I completely agree that it is rather extreme, unusual and not at all sensible to be attempting to use this many varchar(max) columns. There are reasons for it, mainly not under my control, that I will not go into here.

4 Answers

I have this problem today. but this table's column is small and only hundreds rows. and this table work good before. I cost many time to research.

finally, I backup this table data. I delete the table. and create same new table; then restore data. everything is ok.

It shows the old table maybe crashed inside. maybe SQL server bug. anyway, issue is gone. hope save others time.

backgroud: MS SQL 2012

Related