ok..<br />I thought, I work will be easier in this way, if I get a solution.<br /><br />Anyway, never mind.. we should do some manual work, otherwise we will forget to do our work <img src='/community/emoticons/emotion-5.gif' alt='' /><br /><br />-Johnson

If you create a table to retain the information, you can alter that command to select only the details you want from the sysfiles table, and then you could say "Insert into Table (field, field, fied) exec ....." to have the data pumped into that table from a job on a nightly basis.

Hope it helps,
Dalton

Blessings aren't so much a matter of recieving them as they are a matter of recognizing what you have received.

The following command will create a table that will contain the information :

create table DatabaseSizes (dbname varchar(255), fileid int, filename varchar(255), name varchar(255), size_mb int, reporting_date datetime)
The following is the code that you can use in a job to gather the data each day and have it populate the table, then you can issue selects against the table afterwards:
insert into DatabaseSizes(dbname, fileid, filename, name, size_mb, reporting_date)
exec master.dbo.sp_MSforeachdb 'use ? select db_name() as dbname, fileid, filename, name, size/128, getdate() from sysfiles'

Hope it helps,
Dalton

Blessings aren't so much a matter of recieving them as they are a matter of recognizing what you have received.

Dan, Glad it helped you. The permanent table is just in case you wanted to run the command daily and retain the data on an ongoing basis so that you could track the size as things grow. I generally update management quarterly with the rates at which the database is growing and with the table it makes that easy.

Hope it helps,
Dalton

Blessings aren't so much a matter of recieving them as they are a matter of recognizing what you have received.