How to export a detailed list of sql 2005 database information

I am trying to get a exported list of sql databases from my sql 2005 server.  I believe you used to be able to do this in 2000.  I am looking for db name, db sizes and db/logs locations.

Thanks,
Tom
wnc123Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wnc123Author Commented:
I dont understand what "select name from sys.databases"  is?  Can you provide more information?
0
Acronis Data Cloud 7.8 Enhances Cyber Protection

A closer look at five essential enhancements that benefit end-users and help MSPs take their cloud data protection business further.

wnc123Author Commented:
Much better but I would also like db size and location.  Do you know of any way to get this also without it being manual process.

Thanks,
Tom
0
hyphenpipeCommented:
select * from sys.database_files will get you the current DB's info that you are looking for.
0
hyphenpipeCommented:
select * from sys.master_files gets you every database on the instance.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hyphenpipeCommented:
Just as an FYI, the name stored in this table is the logical name of the database which may or may not reflect the name you might see in physical name.  Chances are it does but if it doesn't and you require the physical name you would need to join the sys.databases table to return that value.  Something like:

select d.name, mf.physical_name, size from sys.master_files mf
 inner join sys.databases d on d.database_id = mf.database_id
0
Anthony PerkinsCommented:
>>I dont understand what "select name from sys.databases"  is? <<
Are you familiar with SQL Server BOL?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.