A database in SQL Server becomes corrupted due to virus infection, operating system malfunction, software bugs, server crash, etc. To avoid losing data and restoring the database to a consistent state without downtime, Stellar Repair for MS SQL software can come in handy. The SQL repair tool helps rebuild the corrupt database by repairing MDF & NDF files and retrieving all the recoverable data.

Steps to Repair Corrupt MDF File using Stellar Repair for MS SQL Software

  • Download, install, and run the SQL database repair software.

  • The main interface of the software opens. If you know the location of the corrupt MDF file, click 'Browse' to select the file. If you do not know the exact location of the MDF file, click the 'Find' button.

Note: You can search for the MDF file in any other drive or a particular folder using the ‘Find’ option. If the software finds out multiple MDF files, double-click to choose the right database file.

Alternately, you can use the 'Select Database' option from 'File Menu' to select the MDF file you want to repair.

  • After selecting the corrupt MDF file, click the 'Repair' button. 

  • Run ‘Standard Scan’ or ‘Advanced Scan’ to scan and repair the corrupted file and click ‘OK.’

  • After completing the database repair process, the software displays all the recoverable tables and other components in a tree-view structure. The left pane lists all the database tables. Clicking on a table display its contents in the right pane of the preview window.

Note: You can search for any particular table by entering its name in the search textbox. Also, you can use the 'Match Case' or 'Match Whole Word' option to narrow down the search.

  • Select all or specific database objects you want to restore and click the 'Save' button from the toolbar.

  • A window opens with options to save the repaired SQL database file as ‘New Database,’ ‘Live Database,’ and ‘Other Formats.’ Select one of the file saving options and click ‘Next.’

  • Provide the 'Server/Instance Name' and the destination to save the repaired and restored database. Choose ‘Next.’

Note: If you’ve selected the ‘Live Database’ option to save the repaired file, you will need to choose an existing database instead of a location during the saving process.

  • To quickly restore the database, select the ‘Fast Saving’ mode. This mode is advisable for large databases as it saves the repaired tables first and the indexes later to speed up the file saving process.

If you want to save the repaired data and indexes simultaneously, select the ‘Advanced Saving’ mode.

  • On successful completion of the process, the message ‘File saved successfully’ is displayed.