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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to query for a list of physical location of all the databases?

Status
Not open for further replies.

hmcheung

Programmer
Oct 13, 2000
66
0
0
HK
What should I do in QA to obtain a list all the physical location of DBs on my SQL Server? I mean the location for all the .mdf and .ldf files. Thanks! Please visit my WebCam!!
 
Hi There

Try...

Use Master
select name, filename from sysdatabases

--(will only give you the physical path for the mdf file)

or

Use <MyDB>
select name, filename from sysfiles

-- (will give you the ldf and mdf physical path for <MyDB>
Hope This Helps
Bernadette
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top