AspBucket offers ASP.NET, C#, VB, Jquery, CSS, Ajax, SQL tutorials. It is the best place for programmers to learn

Thursday, 15 October 2015

Get list of .ldf and .mdf files in Sql Server

.ldf and .mdf files
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
.ldf and .mdf files

0 comments :

Post a Comment

  • Popular Posts
  • Comments