Skip to main content

Posts

Showing posts with the label MDF and LDF

Get all databases with MDF and LDF File Location

 /*********************************************************/ /* get all databases with MDF and LDF File Location */ 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 /*******************************************************/