How to I determine the maximum row size for a table? I\'m looking for a tool or script that does this so I don\'t have to add up each column\'s size by hand.
My goal
Here is another query I got, but like Tomalak's it is broken because it doesn't take into account things like the overhead for variable length columns.
SELECT OBJECT_NAME (id) tablename
, COUNT (1) nr_columns
, SUM (length) maxrowlength
FROM syscolumns
GROUP BY OBJECT_NAME (id)
ORDER BY OBJECT_NAME (id)