Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server Maximum row size

Tags:

sql-server

Came across this error today. Wondering if anyone can tell me what it means:

Cannot sort a row of size 9522, which is greater than the allowable maximum of 8094.

Is that 8094 bytes? Characters? Fields? Is this a problem joining multiple tables that are exceeding some limit?

like image 502
TheSmurf Avatar asked Aug 19 '08 19:08

TheSmurf


People also ask

How do I find the maximum row size in SQL?

MS SQL server allows only 8060 bytes of data max to be stored in a row. Hence your row size will always be <= 8060. But it is relaxed when a table contains varchar, nvarchar, varbinary, sql_variant, or CLR user-defined type colums.

What is the maximum row size possible on a page in SQL Server 2012?

Show activity on this post. SQL server uses page to store data. Page size is 8kb. So a record size (row size) in SQL server cannot be greater than 8060 bytes.

How can I insert more than 1000 rows in SQL Server?

A table can store upto 1000 rows in one insert statement. If a user want to insert multiple rows at a time, the following syntax has to written. If a user wants to insert more than 1000 rows, multiple insert statements, bulk insert or derived table must be used.

What is the maximum database size in SQL Server 2016?

Microsoft SQL Server 2016 Express edition has a database size limit to 10GB.


1 Answers

In SQL 2000, the row limit is 8K bytes, which is the same size as a page in memory.

[Edit]

In 2005, the page size is the same (8K), but the database uses pointers on the row in the page to point to other pages that contain larger fields. This allows 2005 to overcome the 8K row size limitation.

like image 105
JeremiahClark Avatar answered Oct 05 '22 18:10

JeremiahClark