• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
31 views
How to open an .MDF file? (Attach a Database in SQL Server)?

I have attempted several time but could not browse to that file, what could be reasons is it security? I don't know can any one suggest?
by (120 points)  
reshown by

1 Answer

0 votes
Try to do it through SQL Server Management Studio (SSMS), follow these steps:

1. Launch SSMS.

2. Connect to your SQL Server Instance.

3. In the Object Explorer right click on the Database.

4. You click Attach now.

In the Attach Databases window, click the Add button.

Browse to the directory containing the .MDF and .LDF files.

Choose the .MDF file, and press OK.

Press OK again to attach the database.

CREATE DATABASE command with the FOR ATTACH argument.
by (1.4k points)  
reshown by
...