Please review the site disclaimer before downloading or using content found on this site
Written by: Steve Gray 6/3/2010 4:06 PM
This nifty little script will tell you how big your SQL tables are…
1: SELECT [total size KB], B.rows, O.name
2: FROM (select sum(convert(decimal(10,0),dpages)*8129/1024)
3: [total size KB], id
4: FROM sysindexes group by id)
5: A INNER JOIN sysindexes B ON A.id = B.id and B.indid in (0,1)
6: INNER JOIN sysobjects O ON B.id = O.id WHERE B.rows <> 0
7: ORDER BY [total size KB] desc
0 comment(s) so far...