SQL Tip - List all databases file path
Views (2808)
Today, @ work, I needed to find out the physical file location for .mdf and .ldf files of all our databases on SQL
Just fire this query in SSMS Query Editor
SELECT name, physical_name FROM sys.master_files
Output:
It will return you the database names alongwith physical paths
To read more about sys.master_files and the additional columns, read here http://msdn.microsoft.com/en-us/library/ms186782.aspx
Just fire this query in SSMS Query Editor
SELECT name, physical_name FROM sys.master_files
Output:
It will return you the database names alongwith physical paths
To read more about sys.master_files and the additional columns, read here http://msdn.microsoft.com/en-us/library/ms186782.aspx
This was originally posted here.

Like
Report
*This post is locked for comments