Solved

MS SQL: Cannot sort a row of size 8096, which is greater than the allowable maximum of 8094

Posted on 2009-07-05
2
1,082 Views
Last Modified: 2012-05-07
SQL 2K:

I changed datatype of ItemDescription nvarchar to varchar (4000). I m using Inner Join Query Where I have to use
"Select t1.Itemdesction , t2.ItemDescription, t3.ItemDescription from ItemMaster....".

 I am getting error

" Cannot sort a row of size 8096, which is greater than the allowable maximum of 8094"

I tried to change datatype back to nvarchar , its giving error while saving :

'ItemMaster' table
- Unable to modify table.  
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot create a row of size 9517 which is greater than the allowable maximum of 8060.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.
0
Comment
Question by:Harsh08
2 Comments
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 24782789
change it to text data type


It looks like you have too much data in the row already.
What is the total size of the other columns?
SQL Server will allow you to define a column of a variable length size, that
could end up leading to errors on insert or update.

For example, you could create a table that has 10 varchar(8000) columns,
with no error.
But if you tried to insert 8000 bytes into 2 of those columns, you would get
an error.

The only way in SQL 2000 to have more than 8060 bytes in a row is to use the
text data type.
0
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 500 total points
ID: 24783008
Check out the solutions given earlier in EE itself:

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_11173651.html

Hope this helps
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to shrink a transaction log file down to a reasonable size.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question