How it works – Recoveryfix SQL Database Recovery

Home > SQL Database Recovery > How it works

Recoveryfix for SQL Database Recovery Tool

Step 1: Open the SQL database recovery tool. Select SQL Database window will open automatically. If not, click the Select Database button.

Open the SQL database recovery

Step 2: In the Select SQL Database window, click Browse (next to the Select Database option), findand select the MDF file, and add the file. After that:

  • Set a temporary file path by clicking the second Browse button, next to Select Temp File Path.
  • To add secondary database files, tick the Add Secondary NDF files option and add them.
  • Choose Standard Scan or Advanced Scan for database recovery.
  • For the Select SQL database version and Collation Option, Auto detect is selected by default. This option automatically selects the version and collation of the database based on the header file. If you want to choose both options manually, select the manualoption.
  • Select Include deleted records in recovery to retrieve deleted records from the tables.

Finally, click Recover.

Select SQL Database window

Step 3: The tool will list all the recoverable database objects. If required, select and view them. After that, select the objects that you want to save and click the Save button.

Save database items

Step 4: The SQL recovery tool gives three options to save the data.

A. SQL Server: If you want to restore the recovered database directly to a live SQL Server database, choose this option. Remember, the SQL Server must be running to save the database. After starting the server, follow these steps:

  • Provide the name or address of the SQL Server where you want to restore the data.
  • Choose a method to authenticate and connect to the live SQL Server:
    • Windows Authentication: Uses Windows credentials.
    • Server Authentication: Uses the SQL Server username and password.
  • Then, select one of the following options:
    • Create New Database: Create and save data to a new database.
    • Existing Database: Save the data to an existing database.

Finally, select a Collation Name and click OK to start saving the recovered data.

Note: When saving data to an existing database, ensure it has no tables with the same names as the recovered tables. Otherwise, create a new database to save the recovered data.

Save with SQL Server

B. SQL as SQL Script: If you want to save the selected database objects into SQL Scripts, choose this option and provide the location where to save the scripts. You can use these scripts to insert the recovered data into any database on any SQL Server whenever required.

If you choose this option, then after saving the scripts, follow these steps to insert the data into SQL Server.

Note: Run the below steps after completing all the recovery steps, i.e., after Step 6.

  • Open SQL Server Management Studio (SSMS) and create a new database.
  • Go to the location on your system where the SQL scripts are saved.
  • Find and double-click the commit.bat file.
  • Command Prompt will open.Run the following command:
    • commit.bat <server-name><new-database-name><sql-server-username><sql-server-password>

Note: Using SQL scripts, saving data to an existing database is possible. But, if the existingdatabase already contains tables that you want to insert through scripts, the data may merge and lead to duplicate records. To avoid duplicating data, save the data to a new database.

SQL as SQL Script

C. CSV File Format: Select this option to save the recovered tables in CSV format.Click Browse and provide a location to save the CSV file. Then, click OK. This option only saves tables to CSV.

CSV File Format

Step 5: After choosing the destination of your choice, click OK. The tool will start saving the data. Once finished, you will receive a confirmation message.

Database saved succesfully