Physical file location for all the databases in SQL Server

Spread the love

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


Spread the love
Soyeluddin Biswas, SQL Server DBA. Mostly involved in Data center migration. He has rich experience in SQL server design and database migration.

Leave a Reply

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