dbTalk Databases Forums  

Cannot write a small row! Please help...

microsoft.public.sqlserver.server microsoft.public.sqlserver.server


Discuss Cannot write a small row! Please help... in the microsoft.public.sqlserver.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
almurph@altavista.com
 
Posts: n/a

Default Cannot write a small row! Please help... - 12-23-2005 , 04:46 AM






Hi everyone,

This is weird. Please help!

I have a long row in the form:

WordA WordB WordC WordD etc...


The above row is 5,294 bytes in size.


I got the soundex equivalent of this row. It now became:


SoundexA SoundexB SoundexC SoundexD etc...


It's size is now 2,898 bytes. AS you would expect as soundex returns a
4 letter code.

I attempt to write the soundex field to its place in the database. I
get the followign error message:

Cannot create a row of size 9602 which is greater than the allowable
maximum of 8060.
The statement has been terminated.



Now, I am totally confused - Does anyone know why this is happening?
Any ideas/suggestions/comments/diagnostics that I could run would be
great. Please help me!

Confused,
Al.


Reply With Quote
  #2  
Old   
Jens
 
Posts: n/a

Default Re: Cannot write a small row! Please help... - 12-23-2005 , 05:15 AM






Could it be that your possible row size is exceeded ? Not the actual
used one, but the highest possible. Therefore you should have gotten an
error while creating or altering the table once upon a time.



SELECT Sum(ISNULL(CHARACTER_MAXIMUM_LENGTH,length)) from
INFORMATION_SCHEMA.Columns col
INNER join systypes
on systypes.name = col.Data_type
Where table_name = 'YourTable'


HTH, jens Suessmeyer.


Reply With Quote
  #3  
Old   
almurph@altavista.com
 
Posts: n/a

Default Re: Cannot write a small row! Please help... - 12-23-2005 , 05:27 AM



Thanks jens,

I ran this cool command on my table and get the answer: 8392

Unfortunately I don't know where it is! Can you help me locate it or
suggest possible solutions? Can you recommend what I should do please?
Any assistance much appreciated.

Thank you,
Al.


Reply With Quote
  #4  
Old   
Jens
 
Posts: n/a

Default Re: Cannot write a small row! Please help... - 12-25-2005 , 03:46 PM



Sure, you should narrow down your datatypes that these fit on a
datapage of 8060 bytes. In some cases some columns use wasted datatypes
as somebody just assumes how many bytes are to go in that column. If
there is in some cases reengineering,l the people narrow down the
datatypes because they know the actual data size of the columns later.
Or you can split out the table to some "Soundex table" qwhich
references 1by1 the original table and just point with the same PK on
this.

HTH, jens Suessmeyer.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.