Run this Query:

SELECT name, physical_name AS current_file_location

FROM sys.master_files

Gives you all the databases and their database file location and log file location.  (the actual filesystem paths)

Helpful for when you take over a setup and someone has decided to put stuff all over the place!

Leave a Reply