How to Open an MDF Database

By C.D. Crowder

Store and access data from MDF databases with SQL Server.
i Jupiterimages/Photos.com/Getty Images

MDF databases are created using Microsoft SQL Server. These databases must be opened using SQL Server in order to properly display stored data. MDF databases are not necessarily opened. Instead, they are attached to an instance of the SQL Server Database Engine. Without SQL Server to translate the data, you won't be able to correctly view or use any data with the MDF database.

Open Microsoft SQL Server.

Select an instance of the SQL Server Database Engine from the SQL Server Management Studio Object Explorer. Select “Connect” to connect to the instance.

Right-click “Databases.”

Click “Attach” and click “Add.”

Browse to the location of your MDF database.

Double-click the database file to open it inside SQL Server and view stored data.

Tips

If you don't currently have Microsoft SQL Server installed, download the trial version, which can be used free for 180 days. Microsoft also offers SQL Server Express, a free version with fewer features; it can also open MDF databases.

Warnings

If you try to open MDF databases as a text file, you'll see garbled text mixed with your data, making it almost impossible to read.

You cannot open an MDF database in a new instance if it is already attached to an existing instance.

×