Problem at hand
The database went into recovery when the SQL Server service was stopped and then restarted. But the recovery process failed to complete and the database was stuck in ‘Recovery Pending’ state. After trying to find answers on what could have possibly gone wrong, it seems that the database recovery process failed due to missing or corrupted transaction log file (LDF). The best option to fix the issue required restoring the database from an updated backup copy. But the available database backup is months old and could result in potential data loss.
As a last resort, I tried rebuilding the LDF file by setting the database in EMERGENCY mode and executing the DBCC CHECKDB command using ‘REPAIR_ALLOW_DATA_LOSS’ option. However, the transaction log file is still corrupted.
It’s been days since the database is down. To avoid further downtime, I decided to use a third-party SQL recovery software to regain access to the database. This is when I came across Stellar Repair for MS SQL software. The software claims to restore SQL database with all its data intact.
Essentially, the software helps repair a corrupt MDF file. Once the MDF file is repaired, you can attach it to SQL Server and the server will recreate a new transaction log file. Also, the demo version of the software is available to help users preview recoverable data and verify its integrity.
Here are the steps that I followed to perform SQL database recovery using Stellar Repair for MS SQL software:
- Installed and launched the *demo version of the SQL recovery tool. The software main interface window opened with a ‘Select Database’ dialog box.
- The Select Database dialog box provided options to browse or search a corrupt SQL database MDF file. Use the browse option to select the file if its location is known. If you are not aware of the database file location, you can find it by using the search option.
- After selecting the corrupt database file, click Repair to initiate the recovery process. The software displays a dialog box with Standard Scan and Advanced Scan options. Run the recommended ‘Standard Scan’ option to repair the database file quickly. For thoroughly scanning the file for corruption errors, you may use the ‘Advanced Scan’ option. After choosing the appropriate scan mode, click OK.
Note: The repair process can exceed hours and days based on the size of your database file.
- A ‘Repair Complete’ message box pops-up on completion of the database file repair process.
- Click OK to display a preview of all the recoverable database objects on the left-pane. Clicking on an individual object displays its content in the right-pane.
The *demo version of Stellar Repair for MS SQL software only allows previewing all the recoverable database objects. You will need to activate the software’s licensed edition to save the recovered data. Once you have activated the software, proceed with the steps below to save the data.
- Click the Save icon from the File menu.
- When a ‘Save Database’ dialog box opens, select the file format in which you want to save the recovered database file. Next, choose to save the file to a new database or a live (existing) database. Fill in the details to connect to your SQL Server, and then choose the default or new location to save the file.
- Click OK to begin the saving process. Once the process is complete, a ‘Save Complete’ message box will appear. Hit OK.
You can access the recovered MDF file at the specified location.
Stellar Repair for MS SQL is an easy to use and efficient SQL recovery tool. The intuitive user interface makes the process of database recovery a smooth process. All you need to do is select a corrupt database file, run Repair, and wait for the software to do its thing. Once the database is recovered, you can preview the data before saving it. Other reasons why you should use Stellar Repair for MS SQL are as follows:
- Repairs both Master Database File (MDF) and Secondary Database File (NDF)
- Allows repairing corrupt database files on Windows and Linux systems
- Recovers tables, deleted records, stored procedures, triggers, and other objects
- Supports database recovery in SQL Server 2019, 2017, 2016, 2014, 2012, and earlier versions