Get list of .ldf and .mdf files in Sql Server
If you want to get a list of all .ldf & .mdf of SQL Server Database. Then this query is helpful for getting listed. You don't need to remember the exact location of .ldf & .mdf file every time.
SELECT db.name AS DBName ,
type_desc AS FileType ,
Physical_Name AS Location
FROM sys.master_files mf
INNER JOIN sys.databases db ON db.database_id = mf.database_id
0 comments :
Post a Comment