News We Recently Launched AD Migrator and AD Reporter.

How to Recover SQL Server Database

Simple process to know how to recover SQL MDF components like Tables, Triggers, Functions, Stored Procedures, Views & Rules as well as user defined data types via SysTools SQL Recovery Tool.

Quick SQL RECOVERY

STEP 1

Go to Start Menu » Programs » SysTools® SQL Recovery Software. The following screen will appear after that:

tool

STEP 2

Open MDF File

From the software menu, click on “Open” to browse and open the desired MDF file from its location:

search file

Browse MDF Files

Now, select the damaged MDF file and click on “Open”.

search file

STEP 3

Select Quick Scan for normal corruption of database files. This option can be opted for scanning MDF files faster. Check the Auto detect option, if you want to detect the SQL Server version of your MDF file automatically.

Quick scan mode

If the software is unable to auto detect SQL Server version then you can also select the SQL Server Version of your MDF File manually.

Detect Server Version manually

Select NDF Options which is the second tab. select the first radio button to detect NDF file automatically:

Important Note: The NDF file must be associated with the Primary database, i.e., the selected MDF file.

Add NDF files

Choose the second radio button to add NDF files manually, Then Click on Add Files / Add Folder option to add the NDF files to be recovered. After that click OK.

Manually add NDF files

STEP 4

The SQL Recovery Software will display the scanning report after performing Quick Scan operation on MDF file.

change

STEP 5

Software will prompt a note for Quick Scan results and recommend to use Advance scan if the expected results not found by Quick Scan. Click OK to preview SQL database items.

scan completed note

The software will preview the database objects such as tables, views , stored procedure, rules, triggers, Functions etc.

preview SQL database objects

This software supports the unicode character. The user will not be able to properly view the data, but the data will be exported properly.

preview SQL database objects

After previewing all the tables, triggers, and all the other elements. Click on Export to begin exporting recovered database.

Export Recovered database

STEP 6

Export As SQL Server Database

Software will allow you to fetch the available SQL Server Names by clicking on drop-down arrow

extract

You can enter the SQL Server Name manually, if the software doesn't shows the desired Server Name and then Select the Windows Authentication , if you are using this Authentication Mode to access your database.

extract

If you are using SQL Server Authentication then enter the SQL Server Name and Login Creadentials for SQL Server

extract

STEP 7

Select Create New Database to export recovered data on it or Choose Export to Existing Database to Overwrite the recovered database on an Existing database.

extract

STEP 8

Create New Database

Software provides the option to export the recovered data by creating a new database. Just type the Database Name, which has not been already created in your SQL Server databases.

provide database name

STEP 9

Software will display default Collation type for your database.

Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case-sensitivity, accent marks, kana character types, and character width.

Check Collation Setting

Click on drop-down arrow to choose desired Collation type for your database. Know How to Choose Collation Type According to Your Database Click Here

Select Collation type

Now, Click on check box to export the desired components of database

select desired components

STEP 10

Choose either of the options: export the MDF file With Only Schema or With Schema & Data.

export schema options

If you save the database components (tables/views/Procedures) with only schema then the software will export the schema/structure of selected database components.

export only schema

Next, the software will confirms the data to be exported with only schema option

export with schema confirmation

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed

The software will show the status of exported records. Click on Close.

export status

Software ask you to export the detail to a .csv file. Click on Yes.

export to csv

Browse the folder to save the .csv file or you can also make a folder to export the .csv file detail.

save csv file

You can check the .csv file detail by opening it.

check csv detail

You can also view the recovered database by expanding the databases in SQL Server.

view recovered database

STEP 11

If you want to save the database components with both schema and data then select With Schema & Data. Then Click on Export, the software will export the schema with data of selected components

export schema with data

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed records

The software will show the status of exported records. Click on Close.

export status records

Software ask you to export the detail to a .csv file. Click on Yes.

export to csv

Browse the folder to save the .csv file or you can also make a folder to export the .csv file detail.

save csv file

You can check the .csv file detail by opening it.

check csv file detail

To check recovered database on SQL Server just expand the databases.

view recovered components

STEP 8

Export to Existing Database

This option will allow you to export the database to an existing database. Once the Server Name and Authentication fullfilled successfully, you just need to fetch the database on which you want to overwrite the recovered database.

export to existing database

STEP 9

Once the Database fetched successfully, then just select the database components by checking or unchecking them.

select sql components

STEP 10

Next, Choose either of the options: export the MDF file With Only Schema or With Schema & Data.

export schema options

If you save the database components (tables/views/Procedures) with only schema then the software will export the schema/structure of selected database components.

export with schema

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed records

The software will show the status of exported records. Click on Close.

export status records

Software ask you to export the detail to a .csv file. Click on Yes.

export to csv

Browse the folder to save the .csv file or you can also make a folder to export the .csv file detail.

save csv file

You can check the .csv file detail by opening it.

check csv file detail

To check recovered database on SQL Server just expand the databases.

query recovered structure of objects

STEP 11

If you want to save the database components with both schema and data then select With Schema & Data. Then Click on Export, the software will export the schema with data of selected components.

export schema with data

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed records

The software will show the status of exported records. Click on Close.

export status records

Software ask you to export the detail to a .csv file. Click on Yes.

export to csv

Browse the folder to save the .csv file or you can also make a folder to export the .csv file detail.

save csv file

You can check the .csv file detail by opening it.

check csv file detail

To check recovered database on SQL Server just expand the databases.

view recovered components

STEP 6

Export as SQL Server Compatible Script

A .sql file will get created if you choose to export & save the file as SQL Server Compatible SQL Script.

export to compatible script

STEP 7

Now check the desired components to be exported from the recovered database.

select database components

STEP 8

Next, Choose either of the options: export the MDF file With Only Schema or With Schema & Data.

export schema options

If you save the database components (tables/views/Procedures) with only schema then the software will export the schema/structure of selected database components.

export with schema

Next, the software will confirms the data to be exported with only schema option

export with schema confirmation

Browse the location to save .sql file

Browse location for .sql file

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed records

After the completion of the recovery process, the software will let you know about the completion process. Click on Close:

close detail

Navigate from location where you saved recovered SQL database.

explore .sql files

STEP 9

If you want to save the database components with both schema and data then select With Schema & Data Option. Then Click on Save, the software will save the schema with data of selected components

export schema with data

Browse the location to save .sql file

Browse location for .sql file

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed records

After the completion of the recovery process, the software will let you know about the completion process. Click on Close:

close detail of export

Navigate from location where you saved recovered SQL database.

view exported scripts

STEP 6

Export as CSV

Choose "CSV" option to export recovered table records into CSV format

export to csv file

STEP 7

Now check the desired tables to be exported from the recovered database.

choose database components

STEP 8

Next, Choose either of the options: export database tables With Only Schema or With Schema & Data.

export table schema options

If you save the database tables with only schema then the software will export the schema/structure of selected tables.

export with schema

Next, the software will confirms the data to be exported with only schema option

export with schema confirmation screen

Browse the location to save CSV file

Browse location for .csv file

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed records screen

After the completion of the export process, the software will let you know about the completion process. Click on Close:

close detail screen

Navigate from location where you saved CSV file.

explore .csv files

STEP 9

If you want to save tables with both schema and data then select With Schema & Data Option. Then Click on Save, the software will save the schema with data of selected tables

export table schema with data

Browse the location to save CSV file

Browse location for .csv file

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export process completed

After the completion of the process, the software will let you know about the completion process. Click on Close:

close detail of export

Navigate from location where you saved the CSV file.

view exported csv file

STEP 10

Now check the desired tables to be exported from the recovered database.

choose database components

ADVANCE (CUSTOMIZED) RECOVERY

STEP 1

Go to Start Menu » Programs » SysTools® SQL Recovery Software The following screen will appear after that:

sql recovery

STEP 2

Open MDF File

From the software menu, click on “Open” to browse and open the desired MDF file from its location:

open

STEP 3

Browse MDF Files

Now, select the damaged MDF file and click on “Open”.

open mdf file

STEP 4

Select Advance Scan for Highly corrupted database files (MDF/NDF).
Check the Auto detect option, if you want to detect the SQL Server version of your MDF file automatically.
Also Check Recover Deleted Objects option, if you want to recover deleted tables, stored procedures, functions, views, triggers, indexes, etc.

scan mode

STEP 5

You can also select the SQL Server Version of your MDF File manually. The user can check preview deleted records option in case if the user wants to preview permanently deleted records in red color.

sql version

STEP 6

Select NDF Options which is the second tab. select the first radio button to detect NDF file automatically:

Important Note: The NDF file must be associated with the Primary database, i.e., the selected MDF file.

sql version

STEP 7

Choose the second radio button to add NDF files manually, Then Click on Add Files / Add Folder option to add the NDF files to be recovered.

choose ndf file

STEP 8

After selecting the NDF file, i.e. secondary file of SQL server. Click OK:

open ndf file

STEP 9

The software will show a summarized detail of the selected MDF files and an automatic scanning of the MDF files of SQL Server database will take place.

scanning process completed

STEP 10

You can also save the MDF file scanning in .str file. If you want to save .str file, then click on Yes button given on the prompt screen, otherwise click on No.

yes

STEP 11

Select the location for saving .str file and click on Save:

save str file

STEP 12

Preview Database Items

Preview recovered database of MDF and NDF files: Software will show the entire contents of the repaired MDF and NDF files such as; tables, triggers, stored procedures, views, etc.

Also, the user can preview deleted SQL database objects like stored procedures, tables, indexes, functions, triggers, views, etc.

preview sql data

This software Provides support for Unicode Stored procedures, functions, views, etc. The user will not be able to view the data. But after the export process, the data will be exported properly.

preview unicode data

The user can recover unicode type stored procedure.

recover unicode stored procedure

The user can recover unicode Views.

recover unicode views

The user can recover unicode rules by using this software.

preview unicode rules

STEP 13

Export MDF or NDF File

There will be a display of all the tables, triggers, and all the other elements. Click on Export to begin exporting recovered database.

export mdf data

STEP 14

Export Option

To export the database, select an output format for saving the exported database as:
You can choose among the following options:

(1) SQL Server Database

(2) SQL Server Compatible Scripts

(3) CSV File Format

export-option

STEP 15

Export to SQL Server Database

Software will allow you to fetch the available SQL Server Names by clicking on drop-down arrow

Auto Fetch SQL Server Name

You can enter the SQL Server Name manually, if the software doesn't shows the desired Server Name and then Select the Windows Authentication , if you are using this Authentication Mode to access your database.

Windows Authentication

If you are using SQL Server Authentication then enter the SQL Server Name and Login Creadentials for SQL Server

SQL Server Authentication

STEP 16

Select Create New Database to export recovered data on it or Choose Export to Existing Database to Overwrite the recovered database on an Existing database.

select destination to export

STEP 17

Create New Database

The Software provides the option to export the recovered data by creating a new database. Just type the Database Name, which has not been already created in your SQL Server databases.

provide database name

STEP 18

Software will display default Collation type for your database.

Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case-sensitivity, accent marks, kana character types, and character width.

Check Collation Setting

Click on drop-down arrow to choose desired Collation type for your database. Know How to Choose Collation Type According to Your Database Click Here

Select Collation type

Now, Click on check box to export the desired components of database

select desired components

STEP 19

Choose either of the options: export the MDF file With Only Schema or With Schema & Data.

export schema options

If you save the database components (tables/views/Procedures) with only schema then the software will export the schema/structure of selected database components. You can check the Export Deleted Objects box to export SQL database deleted objects like tables, stored procedures, triggers, views, functions, etc.

export only schema

Next, the software will confirms the data to be exported with only schema option

export with schema confirmation

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed

The software will show the status of exported records. Click on Close.

export status

Software ask you to export the detail to a .csv file. Click on Yes.

export to csv

Browse the folder to save the .csv file or you can also make a folder to export the .csv file detail.

save csv file

You can check the .csv file detail by opening it.

check csv detail

You can also view the recovered database by expanding the databases in SQL Server.

view recovered database

STEP 20

If you want to save the database components with both schema and data then select With Schema & Data.

export schema with data

Next, Check on Export Deleted Records and Export Deleted Objects, If you want to recover deleted records and objects like stored procedures, tables, functions, triggers, views, indexes, etc. Then Click on Export, the software will export the schema with data of selected components.

export deleted records and objects

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed records

The software will show the status of exported records. Click on Close.

export status records

Software ask you to export the detail to a .csv file. Click on Yes.

export to csv

Browse the folder to save the .csv file or you can also make a folder to export the .csv file detail.

save csv file

You can check the .csv file detail by opening it.

check csv file detail

To check recovered database on SQL Server just expand the databases.

view recovered components

STEP 17

Export to Existing Database

This option will allow you to export the database to an existing database. Once the Server Name and Authentication fullfilled successfully, you just need to fetch the database on which you want to overwrite the recovered database.

export to existing database

STEP 18

Once the Database fetched successfully, then just select the database components including deleted by checking or unchecking them.

select sql components

STEP 19

Next, Choose either of the options: export the MDF file With Only Schema or With Schema & Data.

export schema options

If you save the database components (tables/views/Procedures) with only schema then the software will export the schema/structure of selected database components. Also, check the Export Deleted Objects to export deleted tables, stored procedures, triggers, views, functions, indexes, etc.

export with schema

An 'Export Completed ' window will appear on screen confirming the successful export of the database. Click on OK:

export completed records

The software will show the status of exported records. Click on Close.

export status records

Software ask you to export the detail to a .csv file. Click on Yes.

export to csv

Browse the folder to save the .csv file or you can also make a folder to export the .csv file detail.

save csv file

You can check the .csv file detail by opening it.

check csv file detail

To check recovered database on SQL Server just expand the databases.

query recovered structure of objects

STEP 20

If you want to save the database components with both schema and data then select With Schema & Data.

export schema with data

Next, Check on Export Deleted Records and Export Deleted Objects, If you want to recover deleted records and objects such as stored procedures, functions, views, triggers, indexes, rules, etc. Then Click on Export, the software will export the schema with data of selected components.

export deleted records and objects

An 'Export Completed' Window will appear on screen confirming the successful export of the database. Click on OK:

export completed records

The software will show the status of exported records. Click on Close.

export status records

Software ask you to export the detail to a .csv file. Click on Yes.

export to csv

Browse the folder to save the .csv file or you can also make a folder to export the .csv file detail.

save csv file

You can check the .csv file detail by opening it.

check csv file detail

To check recovered database on SQL Server just expand the databases.

view recovered components

STEP 15

Export as SQL Server Compatible Script

A .sql file will get created if you choose to export & save the file as SQL Server Compatible SQL Script.

export to compatible script
STEP 16

Now check the desired components to be exported from the recovered database.

select database components

STEP 17

Next, Choose either of the options: export the MDF file With Only Schema or With Schema & Data.

export schema options

If you save the database components (tables/views/Procedures) with only schema then the software will export the schema/structure of selected database components. Also, check the Export Deleted Objects to export the deleted database objects.

export with schema

Next, the software will confirms the data to be exported with only schema option

export with schema confirmation

Browse the location to save .sql file

Browse location for .sql file

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed records

After the completion of the recovery process, the software will let you know about the completion process. Click on Close:

close detail

Navigate from location where you saved recovered SQL database.

explore .sql files

STEP 18

If you want to save the database components with both schema and data then select With Schema & Data Option.

export schema with data

Next, Check on Export Deleted Records and Export Deleted Objects boxes, If you want to recover deleted records and deleted objects. Then Click on Save, the software will save the schema with data of selected components.

export deleted records

Browse the location to save .sql file

Browse location for .sql file

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed records

After the completion of the recovery process, the software will let you know about the completion process. Click on Close:

close detail of export

Navigate from location where you saved recovered SQL database.

view exported scripts

STEP 15

Export as CSV

Choose "CSV" option to export recovered table records into CSV format

export to csv file format
STEP 16

Now check the desired tables to be exported from the recovered database.

select desired database components

STEP 17

Next, Choose either of the options: export database tables With Only Schema or With Schema & Data.

export table schema options

If you save the database tables with only schema then the software will export the schema/structure of selected tables. Also, check the Export Deleted Objects to export the deleted database tables. Click on Save:

export only with schema

Next, the software will confirms the data to be exported with only schema option

export with schema confirmation

Browse the location to save CSV file

Browse location for .sql file

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed screen

After the completion of the export process, the software will let you know about the completion process. Click on Close:

close detail

Navigate from location where you saved CSV file.

explore .csv files

STEP 18

If you want to save tables with both schema and data then select With Schema & Data Option. Then Click on Save, the software will save the schema with data of selected tables

export tables schema with data

Check on Export Deleted Records and Export Deleted Objects boxes, If you want to export deleted table records. Then Click on Save, the software will save the schema with data of selected tables.

export deleted tables schema with data

Browse the location to save CSV file

Browse location for .csv file

An 'Export Completed' window will appear on screen confirming the successful export of the database. Click on OK:

export completed records

After the completion of the export process, the software will let you know about the completion process. Click on Close:

close detail of export

Navigate from location where you saved the CSV file.

view exported files

Free Download SQL Recovery Software Download Now