Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Maximum row size

Author  Topic 

hasanali00
Posting Yak Master

207 Posts

Posted - 2005-04-07 : 06:44:44
I developed a database on my local machine, then uploaded to my live server. But I get the following message on SQL Query Analyser:

"Warning: The table 'Products' has been created but its maximum row size (9205) exceeds the maximum number of bytes per row (8060)."

What does this message mean?? and what should I do to remedy the problem??
thanks

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2005-04-07 : 07:52:21
Sounds Like you have an oversized char field.

spirit1 already suggested a solution did he not?

Jim
Users <> Logic
Go to Top of Page

hasanali00
Posting Yak Master

207 Posts

Posted - 2005-04-07 : 08:05:39
I am not entirely sure what u mean. Can u explain further.

The total column-lengths of my table comes up to 4606. And the maximum length of one of my column is 4000.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-04-07 : 08:06:44
Nchar/nvarchar stores data as two bytes per character, if you're using either of them that would explain it.
Go to Top of Page

hasanali00
Posting Yak Master

207 Posts

Posted - 2005-04-07 : 09:30:53
Would be grateful, if someone can answer following:

So does it mean: if i have a column of type nvarchar, with length 4000, I can only store upto 2000 characters??

And should all of my columns in a table be upto 8060 in size?

Is there same restriction on varchar??

Is the 'maximum row size (8060)' limit ONLY put by my SQL Hosting provider, or is this common for every SQL server table??
thanks
Go to Top of Page

rfrancisco
Yak Posting Veteran

95 Posts

Posted - 2005-04-07 : 10:37:54
If you have a column of type nvarchar with length 4000, it means that it can store up to 4000 characters but internally it uses 8000 bytes because each character in an nvarchar column is 2 bytes.

The restriction for varchar is 8000 characters.

The 'maximum row size (8060)' limit is the limit set by SQL Server and not by your SQL Hosting provider.

Hope this answers your questions.
Go to Top of Page
   

- Advertisement -