|
Posted by Hugo Kornelis on 06/06/06 21:04
On 6 Jun 2006 10:46:41 -0700, RamaKrishna Narla wrote:
>Hi,
>
>In MS SQL Server, while creating the table, I am getting a warning
>message saying like "maximum row size can exceed allowed maximum size
>of 8060 bytes".
>
>Is there any way in SQL Server, to increase this allowed maximum row
>size?
Hi Ramakrishna,
Helmut's suggestion of upgrading to SQL Server 2005 is spot on. Not only
because of the new VARCHAR(max) datatype, but also because SQL Server
2005 will automatically store part of the data on overflow pages if your
row size exceeds the 8060 byte limit.
If you're stuck on SQL Server 2000, you'll have to work around the
limitation. For instance by creating a second table that holds some of
the data. E.g.
CREATE TABLE Reports
(ReportID int NOT NULL,
FirstBigColumn varchar(4000) NOT NULL,
SecondBigColumn varchar(4000) NOT NULL,
PRIMARY KEY (ReportID)
)
CREATE TABLE ReportExtensions
(ReportID int NOT NULL,
ThirdBigColumn varchar(4000) NOT NULL,
FourthBigColumn varchar(4000) NOT NULL,
PRIMARY KEY (ReportID),
FOREIGN KEY (ReportID) REFERENCES Reports(ReportID)
)
--
Hugo Kornelis, SQL Server MVP
[Back to original message]
|