Repair MDF SQL Database

Published on: Sat, 11 Oct 2014



SQL Database files can get corrupt due to different reasons, like improper shutdown, or hard disk failure, etc.

If we don't have a valid backup, can we repair the MDF SQL database file and recover data from the corrupted SQL database?

The answer is YES we can. We will walk with you through a real world case while we are repairing and recovering a damaged MDF SQL database for Microsoft WSUS server, which use MS Internal database based on Microsoft SQL 2005.

To repair and recover the MDF SQL database, we need to stop the SQL server service or detach the database from the SQL server.

To be in the safe side, we should copy the database files to another computer where we can start the recovery process.

To start the repair and recovery, we need to install Stellar Phoenix SQL Database Repair Software on another computer and copy the database files to the same computer.

After we finish the installation and start the software, we will be prompted to choose our MDF SQL Database file that need repair.

Select MDF SQL Database file

After we select our MDF database file, we simply click Repair and wait the repair to finish.

Scanning Damanged SQL Database

Depend on the database size scanning and repairing will take from few minutes to few hours.

In our case, database size was 1.77GB and the SQL database repair took about 5min.

MDF SQL Database Repaired

To verify, we have opened one of the tables to see the actual data inside it.

SQL Database Table View

After that all you have to do is to save the database.