Home › Forums › How to Open MDF File?
This topic contains 8 replies, has 4 voices, and was last updated by Barry Alllen 3 months, 3 weeks ago.
In SQL Server 2012, I have MDF files and I tried to view it in SQL Server Management studio. Unfortunately, I am unable to access MDF database file. Please, help me to open my MDF files.
Thanks in Advance!
Can you please explain what error are you getting while opening .mdf files.
It helps me to solve your problem.
Have a great day!
Thanks for showing your interest in my thread, I attached a screenshot of the error.
It will help you to understand the query.
Understood your query, it will be resolved by attaching the MDF file via SQL Server Management Studio. I will mention step by step guide please follow:
1. Open SQL Server Management Studio
2. Connect SQL Server instance of Database Engine
3. Under Object Explorer, choose the Databases and right-click on it. click on Attach option
4. In Attach Window, click on Add button to locate the .mdf database file
5. Go to the directory where you saved the required .mdf file and select the .mdf database and click on OK
6. Again click on OK button to attach .mdf file from Attach database window within the SQL Server
These steps definitely solve your query.
You can start to load the database in the read-only state, this is not a proper solution but you can give a try:
The next step is to right-click on the MDF files, choose the properties, and after this uncheck the Read-only check box.
Once try the steps if not work then ping to me.
Thanks, Kerry and Lincoln for your valuable suggestion I will try it then revert you back.
I tried the steps but it does not work, I think my MDF file gets corrupted is there any way to open damaged .mdf file?
I have already faced the issue then I was found a tool named as MDF viewer which help me to open MDF file even orphan and damaged.
Try the tool and ping for any further assistance.
Thanks Henry, It works great!
You must be logged in to reply to this topic.