How can I repair a corrupted MDF file?

Simon Desouza April 29, 2013

I have a corrupted MDF & LDF file. Due to some reason both of my (MDF & LDF) files are corrupted and damaged and doesn’t open properly. Anyone can suggest me how to open my MDF file?

  1. ramendlonk
    August 19, 2013 at 9:54 am

    Try this one

    1. First Shutdown SQL Server
    2. Then move the current database file/rename(do not touch the .ldf)
    3. After rename/move db, restart SQL Server
    4. Create a new database with same name and log file and location also same
    5. Stop SQL Server

    For more instructions, Click here

  2. JohnF
    May 14, 2013 at 3:52 pm

    I mean no disrespect at all to Paul's comment but I would be careful using an "online" SQL recovery service. You would be uploading a copy of the data to their server and if there is ANY data that might be confidential you've just willingly given them a copy of it. Keep that in mind when using any kind of "online" service like that. If I were a hacker I'd love to make a site where people can send me their data rather than trying to break in and get it. There might be all kinds of interesting information inside a company's database!

  3. dave gee
    May 9, 2013 at 11:06 am

    To recover from these circumstances, you can perform SQL database recovery by making use of RecoveryFix for SQL Database and can gain access os your corrupted MDF again.


  4. Hitesh Nair
    April 30, 2013 at 2:41 pm
  5. Mark mohan
    April 30, 2013 at 10:10 am


    Don't worry about your Corrupt MDF Files,Nowadays there are several software available which can very easily repair corrupt mdf files,and Kernel for SQL Recovery software is such a tool which efficiently recovers entire MDF files including triggers, tables, keys, procedures, indexes. It automatically rebuilds a new database MDF file making it the best tool among many others in the market.You can get other useful information from here

  6. Bruce Epper
    April 30, 2013 at 4:01 am

    What version of SQL server are you using and what is the error message you are getting when attempting to attach the database?

  7. Rajaa Chowdhury
    April 30, 2013 at 2:03 am

    Some useful instructions in the MSDN forum :

    Also some useful tools link : -> there is a price attached to it, so first try the above two. Would suggest the first link for the tools, as the comments are very positive.

    • jackadision
      October 21, 2013 at 6:06 am

      '.mdf ' file of your database gets corrupted due to any internal or external error and if .mdf file gets corrupted then it can corrupt the entire database or make it inaccessible. This file contains the structure of the database and all operations are executed on to a single .mdf file so that it can be easily got corrupted.

      You can recover and restore corrupted .dbf file by using Database Repair Tool, this tool can easily repair and restore your corrupt .mdf file.

      (ed. URL removed due to low WOT rating)

Ads by Google