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 2005 Forums
 SQL Server Administration (2005)
 Need a script to find space taken by...

Author  Topic 

JaybeeSQL
Posting Yak Master

112 Posts

Posted - 2012-05-04 : 07:36:26
1) All db files (data+log_
2) All tables (per server)
3) All indexes

Cheers,


Jaybee

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-05-04 : 09:21:28
Don't have one handy at the moment, but you can build 1) from sys.master_files and 2) & 3) from sys.partitions and sys.allocation_units. You might be able to cheat a bit by running a trace on your server while you pull up the Disk Usage and Disk Usage by Tables reports in Management Studio.
Go to Top of Page
   

- Advertisement -