Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View List of database/log files and their sizes

Status
Not open for further replies.

alistairpaul

Programmer
Apr 11, 2001
100
US
I'm trying to setup a script or utility to automate the retrieval of all databases on a server, and for each database, get all it's data files, log files, and their allocated sizes as well as their data-used-sizes so I can better keep an eye on space usage.

I've looked into SQL-DMO and have found some good stuff, but am lacking on the space-used for log files. Using T-SQL, and sysdatabases/sysfiles/sysaltfiles, I've found the same thing pretty much.

Does anyone know what I'll need to get this information on a 7.0 box?

Thanks!
 
Check out the procedure sp_spaceused. It might give you the information you are looking for.

-SQLBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top