Data file locations

Thursday 3 June 2010

Here's a query which displays the .mdf and .ldf location of all the databases in the server.



SELECT physical_name
FROM master.sys.master_files