Physical file location for all the databases in SQL Server

Introduction

Very often DBAs need to find the location of the physical file (MDF, LDF & NDF) of a database. Simply we can obtain the output by executing the below query. Run the script to get the SQL Server database file location for all the databases for a particular instance.

Script to find the physical file location

Result

Physical File Location

Facebook Comments Box
Please like or share this post if you found it helpful, thank you.
Share on Facebook
Facebook
0Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Email this to someone
email
Print this page
Print

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *