SQL Server 8060 row size query limit
Posted by jpluimers on 2019/06/19
Every now and then you bump into a limit you did not know it existed before:
Cannot create a row of size 8209 which is greater than the allowable maximum row size of 8060.
This is while querying a few tables having a combined column size of more than 8060. Which means it is not just about single tables being too wide.
Related:
- [WayBack] Why should I rebuild a table after dropping or adding a column? – Simple Talk
- [WayBack] sql server – Cannot create a row of size 8937 which is greater than the allowable maximum of 8060 – Stack Overflow
- [WayBack] SQL Server: Practical example of Exceeding the maximum row size of 8060
While creating a new table:
Msg 1701, Level 16, State 1, Line 1 Creating or altering table 'tbl_LargeTable' failed because the minimum row size would be 8062, including 7 bytes of internal overhead. This exceeds the maximum allowable table row size of 8060 bytes.
While expanding an existing table:
Warning: The table "tbl_LargeTable" has been created, but its maximum row size exceeds the allowed maximum of 8060 bytes. INSERT or UPDATE to this table will fail if the resulting row exceeds the size limit.
While inserting:
Msg 511, Level 16, State 1, Line 1 Cannot create a row of size 8061 which is greater than the allowable maximum row size of 8060. The statement has been terminated.
- [WayBack] SQL Server: What happened, when Row Overflow and Data Exceeding 8KB?
- [WayBack] SQL Server: The Internal Structure of the Data Page:
Database Research & Development: Explained basic about the internal 8KB Data Page structure of the SQL Server.
–jeroen
Leave a Reply