Databases size

  • Hi,

    I want to know database sizes for all in my environment, and i am executing this query in 2008R2 it is working but when i am using this in 2000 it is not working...

    select name,physical_name as current_file_location,size from sys.master_files order by current_file_location

    can u any body please tell what is the query in 2000 to find all databases sizes at a time...

    Thanks in advance

  • mohan.bndr (6/6/2012)


    Hi,

    I want to know database sizes for all in my environment, and i am executing this query in 2008R2 it is working but when i am using this in 2000 it is not working...

    select name,physical_name as current_file_location,size from sys.master_files order by current_file_location

    can u any body please tell what is the query in 2000 to find all databases sizes at a time...

    Thanks in advance

    Hi,

    See if EXEC sp_helpdb helps

  • Yes I executed sp_helpdb <database name> but it is showing for one database, i need all the databases in server and datafiles size.

  • you want sysaltfiles which is the 2000 equiv of sys.master_files

    SELECT *

    FROM master.dbo.sysaltfiles

  • mohan.bndr (6/6/2012)


    Yes I executed sp_helpdb <database name> but it is showing for one database, i need all the databases in server and datafiles size.

    Forget the arguments, just simply do

    EXEC sp_helpdb

    Edit:

    Database size or data file size? Not the same things at all.

  • Great...

    Thanks anthony....

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply