T-SQL: Find the location of data and log files of the databases within a SQL Server instance.
T-SQL: Find the location of data and log files of the databases within a SQL Server instance.
Hi Friends,
Hope, you are doing fine!
Today, please find below the T-SQL script tip to find the location of the data & log files available within a SQL Server instance. The script is as below:
T-SQL:
SELECT name AS NameOfFile, physical_name AS FileLocation FROM sys.master_files
Snapshot:
Happy Coding :)
View On WordPress















