Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 qucik task

Author  Topic 

lemondash
Posting Yak Master

159 Posts

Posted - 2005-04-22 : 05:00:59
Guys have a database with loads of tables some that are in use and some are old. I'm going through them one by one. Is there a way that i can extact the list in to excel(i can do that bit) but i also want the table size data as well.

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2005-04-22 : 06:30:07
Not sure what table size info you want, but try something along these lines:



SELECT
so.name,
si.rowcnt
FROM
sysobjects AS so
JOIN sysindexes AS si
ON so.id = si.id
WHERE
so.xtype = 'u'
AND si.indid in (0, 1)
ORDER BY
so.name



Mark
Go to Top of Page

lemondash
Posting Yak Master

159 Posts

Posted - 2005-04-22 : 08:07:56
Thats cool but i need the size as in KB
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2005-04-22 : 09:32:06
Look at sp_spaceused

-------
Moo. :)
Go to Top of Page
   

- Advertisement -