SQLTeam.com | Weblogs | Forums

Renamed SQL DB to Mdf extension still cannot open it with Express


I downloaded a backup database to associate with my local copy of a website. It had an extension of .Bak and I made it .Mdf but still cannot seem to open it or access it with SQL Express. The file system sees it as a MS SQL database. Am I missing something? Thanks!


The .bak file is a backup file with contains your data files (.mdf) and log transactions (.ldf).

You need to restore the .bak file - see here


Restore .bak file via SQL Server Management Studio

  • Within object explorer right click on the Databases
  • Select Restore database from context menu
  • Specify To Database
  • Specify Source for restoring from the device
  • Select Backup File
  • Click the Add button and browse to the location of the BAK file


RESTORE DATABASE MyDatabase FROM DISK='c:\backups\MyDataBase1.bak'