Friday, March 23, 2012

Listing Size of all user Databases in SQL2005

Can anyone please tell me of a way of generating a list of all user databases and their size with one command or view?

Thanks,

Refer to Books Online, Topic: sys.database_files

This will return the size as the number of 8K pages, so do the math in your query.

|||sp_helpdb will generate info about the dbname and size|||

select * from sys.master_files

Will also give you useful information.

No comments:

Post a Comment