Solved

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

Posted on 2004-08-24
5
380 Views
Last Modified: 2007-12-19
What does the following warning mean:

"Warning: The table 'tblAlbums' has been created but its maximum row size (14625) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes."


The table structure is as follows:


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tblAlbums]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tblAlbums]
GO

CREATE TABLE [dbo].[tblAlbums] (
      [id] [int] IDENTITY (1, 1) NOT NULL ,
      [publishDate] [smalldatetime] NOT NULL ,
      [releaseDate] [smalldatetime] NOT NULL ,
      [albumType] [int] NOT NULL ,
      [title] [varchar] (75) COLLATE Latin1_General_CI_AS NOT NULL ,
      [shortDescription] [varchar] (500) COLLATE Latin1_General_CI_AS NOT NULL ,
      [description] [varchar] (7000) COLLATE Latin1_General_CI_AS NOT NULL ,
      [session] [varchar] (7000) COLLATE Latin1_General_CI_AS NOT NULL ,
      [price] [smallmoney] NOT NULL
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tblAlbums] WITH NOCHECK ADD
      CONSTRAINT [PK_tblAlbums] PRIMARY KEY  CLUSTERED
      (
            [id]
      )  ON [PRIMARY]
GO

ALTER TABLE [dbo].[tblAlbums] ADD
      CONSTRAINT [DF_tblAlbums_publishDate] DEFAULT (getdate()) FOR [publishDate],
      CONSTRAINT [DF_tblAlbums_releaseDate] DEFAULT (getdate() + 1) FOR [releaseDate]
GO

0
Comment
Question by:smacca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 6

Accepted Solution

by:
acampoma earned 125 total points
ID: 11889022
The sum of the size of all your columns is too large,
ou should probably use the text data type
0
 
LVL 34

Expert Comment

by:arbert
ID: 11889094
Like acampoma said above, your total row size is too large.  However, I wouldn't recommend anyone use the text type unless they have too.  It just gets too difficult later if you need to search/replace items in the column, do sort, group bys, etc....


Are you sure you need to varchar(7000) columns in the row?  What's the session column for?
0
 
LVL 6

Expert Comment

by:robertjbarker
ID: 11889513
One solution to keeping the varchar type and both description and session columns would be to create another table:

CREATE TABLE [dbo].[tblAlbumsSession] (
     [id] [int]  NOT NULL ,
     [session] [varchar] (7000) COLLATE Latin1_General_CI_AS NOT NULL ,
  )

and take [session] out of [tblAlbums].

The [tblAlbumsSession].[id] value would have to match the one for the corresponding row in [tblAlbums]
0
 
LVL 18

Expert Comment

by:ShogunWade
ID: 11890360
Agree with arbert.   Review your table definition.
0
 

Author Comment

by:smacca
ID: 11898611
Thanks all for you participation!
RoberJBarker: The solution looks good but I only wanted to know reason - thanks heaps regardless!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
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.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

696 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