July 26, 2004 at 1:58 pm
Hello,
Is there a way to find out how much space the longest row in a table is taking up? I had to exceed the 8060 byte max, but there are a lot of partially populated varchar fields in the table. I tried several things similar to the following, but they return the Max size if all fields were fully populated:
SELECT SUM(COL_LENGTH(Table_Name, Column_Name))
FROM Information_Schema.Columns
WHERE Table_Name = tblName
I'd like to run something that qould tell me that the longest row in the table is using xxxx number of bytes, so I could tell how close I am to busting through 8060.
TIA...
Chris
July 26, 2004 at 2:26 pm
dbcc showcontig( TableName  with TABLERESULTS
and look at MaximumRecordSize
* Noel
July 26, 2004 at 2:32 pm
beautiful. That works perfectly. I shoulda though of that...
Chris
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply