Home » Blog » Topic » How to Open MDF File?

How to Open MDF File?

Barry Alllen ~ Modified: May 24th, 2017 ~ ~ 1 Minute Reading

Home Forums How to Open MDF File?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #4357 Score: 0
    Barry Alllen
    Moderator
    25 pts

    Hello All,

    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!

    #4387 Score: 0
    Kerry Morris
    Moderator
    33 pts

    Hi,

    Can you please explain what error are you getting while opening .mdf files.

    It helps me to solve your problem.

    Have a great day!

    #4395 Score: 0
    Barry Alllen
    Moderator
    25 pts

    Hello Kerry,

    Thanks for showing your interest in my thread, I attached a screenshot of the error.

    MDF File Error

    It will help you to understand the query.

    #4397 Score: 0
    Kerry Morris
    Moderator
    33 pts

    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

    Open SSMS

    4. In Attach Window, click on Add button to locate the .mdf database file

    Add MDF File

    5. Go to the directory where you saved the required .mdf file and select the .mdf database and click on OK

    locate .mdf file

    6. Again click on OK button to attach .mdf file from Attach database window within the SQL Server

    attach .mdf file

    These steps definitely solve your query.

    #4399 Score: 0
    Lincoln Burrows
    Moderator
    16 pts

    Hi Barry,

    You can start to load the database in the read-only state, this is not a proper solution but you can give a try:

    Open MDF File

    The next step is to right-click on the MDF files, choose the properties, and after this uncheck the Read-only check box.

    Read MDF File

    Once try the steps if not work then ping to me.

    #4402 Score: 0
    Barry Alllen
    Moderator
    25 pts

    Thanks, Kerry and Lincoln for your valuable suggestion I will try it then revert you back.

    #4409 Score: 0
    Barry Alllen
    Moderator
    25 pts

    Hi,

    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?

    Thanks

    #4412 Score: 0
    Henry Davidson
    Moderator
    31 pts

    Hello Barry,

    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.

    #4414 Score: 0
    Barry Alllen
    Moderator
    25 pts

    Thanks Henry, It works great!

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.