Repair a damaged .MDF file online
SQL Server repair in progress
Please wait while the file is repaired.
Restore damaged Microsoft SQL Server databases of
any version in strict read-only mode—without risking your original
corporate files. Download Recovery Toolbox for SQL Server for offline
Windows recovery of terabyte and distributed .mdf +
.ndf databases, or upload a single damaged .mdf file to our
online repair service. Inspect recovered tables, records, and database structures
free inside the DEMO viewer before purchasing a license.
Windows PCs & Laptops • All Microsoft SQL Server Versions • Terabyte .MDF + .NDF Support • Free In-App DEMO Preview • 100% Read-Only
Please wait while the file is repaired.
Enterprise SQL database recovery depends on three practical variables: database size, file architecture, and internal data-security rules. Compare both workflows below to choose the right entry point immediately.
| Selection Criterion | Recovery Toolbox for SQL Server (Windows Desktop) | Online .MDF Repair Service (Browser) |
|---|---|---|
| Database Size | Unlimited — engineered for multi-gigabyte and terabyte databases (16 TB+) | Single standalone .mdf files (No file size limits) |
| File Architecture | Single .mdf files and linked .mdf + .ndf filegroup sets | Standalone .mdf file only |
| Corporate Data Security | 100% offline on Windows — no database files leave your PC or internal network | Encrypted browser upload with automatic server deletion after repair |
| Pre-Purchase Verification | Interactive in-app DEMO viewer showing recovered data and table structures | Online recovery preview prior to downloading repaired output |
| Export & Selectivity | Selective object saving; export as .sql scripts or directly to target databases | Downloadable repaired output for fast single-file turnaround |
| Best Fit | Regulated companies (NDA/HIPAA/GDPR/SOC 2), terabyte or multi-file .mdf + .ndf databases | Quick browser repair of a smaller standalone .mdf without local installation |
Routing rule:
Many SQL database repair tools break down on real enterprise databases because they only process one file at a time or lock you into a slow, all-or-nothing export into a live server. Recovery Toolbox for SQL Server is built around production Microsoft SQL Server storage architecture.
In Microsoft SQL Server, a single data file caps at 16 TB, while a complete database scales up to 524,272 TB by spreading tables and indexes across multiple secondary .ndf files and filegroups. The primary .mdf file holds startup metadata, file pointers, and system tables, while core business tables frequently reside inside linked .ndf files.
Unlike SQL data recovery software that removes script export or forces a live sysadmin connection to SQL Server, Recovery Toolbox for SQL Server gives your team two clean output paths.
| Corporate Scenario | Export as .SQL Scripts | Direct Export to Target Database |
|---|---|---|
| Security & Change-Control Audit | Recommended — DBAs and security teams can review and stage table structure and data scripts before running them | Writes recovered schemas and records straight into the connected destination database |
| No Production Server Credentials | Recommended — run recovery on an isolated Windows workstation without live server login rights | Requires valid connection credentials for the target database server |
| Migration & Cross-Database Use | Recommended — portable .sql scripts run cleanly on staging servers or newer SQL Server editions | Exports recovered data directly into Microsoft SQL Server and other supported target databases |
| Limited Disk Space on Production Host | Recommended — save scripts selectively table-by-table onto a secondary drive | Requires free volume space for both reconstructed data and newly generated transaction logs |
| Fastest Rebuild into a Clean Server | Requires running generated scripts afterward | Recommended — creates tables, keys, and rows automatically in one step |
This Microsoft SQL repair tool automatically detects the source file format across all versions of Microsoft SQL Server (SQL Server 7, 2000, 2005, 2008, 2008 R2, 2012, 2014, 2016, 2019, 2022, 2025, and newer releases) and recovers:
The MDF fix tool helps fix database errors:
When Microsoft SQL Server blocks access to a database, the reported engine state (sys.databases) and error code show whether you are dealing with a stalled startup, blocked file access, or physical page damage.
| Observed State / Error Message | Plain-English Meaning | Can Recovery Toolbox Help? | Safe Next Step |
|---|---|---|---|
| SQL Server Database In Recovery (RECOVERING) | Startup crash recovery is actively running—or stuck indefinitely on corrupted log or data pages | Yes, if stalled or failing (allow normal restarts after huge transactions to finish first) | If the database stays stuck or fails to come online, analyze a physical copy of .mdf/.ndf in DEMO mode |
| RECOVERY_PENDING / Error 945 | SQL Server could not begin startup recovery because database files are inaccessible, damaged, or missing a usable log | Yes — extracts table data directly from .mdf/.ndf even when SQL Server cannot mount them | Copy .mdf + .ndf to a healthy local folder and verify surviving data in DEMO mode |
| SUSPECT Mode | Primary filegroup or critical structures are damaged and startup recovery failed | Yes — core physical file repair scenario | Stop repeated restart attempts; copy .mdf + .ndf to a healthy Windows drive and inspect tables in DEMO mode |
| Error 5172 (Invalid Database File Header) | The .mdf/.ndf file header failed validation and SQL Server refuses to recognize the database | Yes — scans past damaged headers to locate readable data pages | Run read-only recovery in Recovery Toolbox for SQL Server (or upload a standalone .mdf online) |
| Error 823 or 824 (I/O, Checksum, or Torn Page) | Critical hardware read failure (823) or logical page corruption (824: bad checksum, torn page, or missed disk write) | Yes — salvages intact schemas and rows around corrupted pages | Copy files off the suspect drive immediately and run read-only extraction before saving to healthy storage |
| Error 3456 (Redo / Unreported I/O Failure) | A missed write or outdated disk read broke page sequence consistency during recovery | Yes — reconstructs consistent table structures directly from surviving data pages | Analyze a physical copy in DEMO mode instead of forcing repeated destructive server restarts |
Microsoft SQL Server includes built-in consistency checks and emergency repair options, and teams often wonder whether a free built-in option can fix a damaged database first. However, official Microsoft SQL Server documentation explicitly classifies destructive built-in repair as an emergency last resort—and documents three reasons free methods are ineffective or dangerous for corporate databases:
Running a dedicated read-only SQL recovery tool eliminates destructive trial and error: you see exactly what data survived in the free DEMO viewer before modifying any live environment.
You do not need deep database administration experience—or Microsoft SQL Server installed on your PC—to confirm whether your database can be recovered.
Workflow at a glance: Select .mdf (and linked .ndf files) on Windows → Automated read-only analysis & version detection → Free in-app DEMO verification → Selective export to .sql scripts or target database.
Before purchasing a license, spend 60 seconds checking four indicators directly inside the Recovery Toolbox for SQL Server DEMO window:
| Capability | Free DEMO Version | Licensed Version |
|---|---|---|
| Read-only scan of .mdf & linked .ndf files (any size, all SQL versions) | Included | Included |
| Full interactive preview of recovered data, tables, and structures inside the app | Included | Included |
| Selective export to .sql scripts or direct export to target databases | Preview only | Unlocked |
Download Recovery Toolbox for SQL Server — Start Free DEMO Inspection
In enterprise recovery incidents, safe file handling before scanning protects salvageable pages and prevents repeat outages.
Clear technical limits protect response time during an outage. File-level SQL database recovery software cannot recover data in four scenarios:
There are two ways to save data, supported by Recovery Toolbox for SQL Server:
Please note, that SQL scripts can be different, in spite of the fact, that they base on the same files of database. It happens because of syntax particularities both in queries, that are executed for direct server connection by means of ADO and in SQL queries, performed in the Query Analyzer environment that is supplied with MS SQL Server (the use of ":", the Go command, etc.). The first way is more reliable, what about the second way, it is more convenient.
If you've chosen to save data on disk, Recovery Toolbox for SQL Server will create a subdirectory, that includes name of the source MDF file, this subdirectory is created in the user-defined directory and all scripts will be placed there. All scripts are named by rule, names consist of a word and a digit. Word indicates the script's role, digit indicates its number. There are many script types, for example:
Script sequence number does not contain any useful data, it does not point at script execution sequence or any other information. These numbers are used only to split data and save it to a variety of small documents instead of one large file. Users can define the maximum size of file with SQL script. Moreover, users should take notice of the numbering of Data files. It should be noted, that each file of the Data type can contain data for one table only. Files with sequence numbers contain all data for each table.
Note: If numbers are missing for some files, it means that some tables do not contain any data.
In this figure, you can see the recommended order of script execution:
Script execution sequence depends on existing restrictions for existing data and structures of the table. Please pay particular attention to these factors:
Install.bat file is created to ensure automated execution for all scripts. This file executes all scripts, that were previously saved by the tool. Script execution sequence will be the same, as when applying to database. This batch file requires the isqlw utility to be installed, it is a part of MS SQL Server client part. Please specify Server name, Database name, Username and Password parameters for the file install.bat in the command line. For example: install.bat SQLServer SQLDatabase SQLUser SQLUserPassword
Attention:
- Parameters should be separated with a space. If a parameter contains space itself, you should enclose it with double quotation marks.
- Parameter sequence cannot be modified.
- Please import data into NEW EMPTY database. Database must not contain any tables, indexes, stored procedures and so on before data import.
- If install.bat file will be executed without parameters, you can see a brief guide, how to launch this file.
If you want to log in to Microsoft SQL Server via your Windows account, then use InstallTrusted.bat file. InstallTrusted.bat file has two parameters: Server name, Database name.
Example of use: installtrusted.bat SQLServer SQLDatabase For details on logging in via Windows account see here: https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/principals-database-engine?view=sql-server-2017
A database in MS SQL Server format contains one or several files. There are several types of files: main data file (with *.mdf default extension), secondary data file (with *.ndf default extension) and a transaction log file (with *.ldf default extension). If you'd like to repair data with Recovery Toolbox for SQL Server, you should specify the path to all secondary data files and the main data file. It can be made with Open File dialog box.
If corrupted database contains the main data file, a secondary data file(s) and a transaction log file(s), you should select the main data file of *.mdf format and all secondary data files of *.ndf format (see fig. 2).
Recovery Toolbox for SQL Server can partially or fully recover information from .MDF/.NDF files of Microsoft SQL Server database files encrypted by ransomware viruses.
Recovery Toolbox for SQL Server does not decrypt data.
In general, data decryption is not applicable in these cases.
However, Recovery Toolbox for SQL Server can be useful in cases when the MDF file was partially encrypted. Typically, viruses only encrypt the header and/or beginning of files because of their large size. In these cases, if only the header or part of the MDF file was encrypted, Recovery Toolbox for SQL Server can be helpful. The program analyzes all the data blocks and collected data structure in the file. Then, it recreates the original data structure and the data itself, if possible.
Microsoft SQL Server MDF file structure
There is no guarantee that you can recover 100% of the data or some part of it by using the program. To get a definite answer to that question, you need to download the DEMO version of Recovery Toolbox for SQL Server, specify the encrypted MDF file and wait for the analysis of the file to complete.
Upon completion of the analysis of the .mdf file in the DEMO version of the program, a full preview of the data that can be extracted from the file is available.
Note:Recovery Toolbox's customer support department informs that usually ransomware programs only encrypt the header of the database file because of its large size. As a result, it is often possible to recover almost the entire data structure and almost all information from the source file.
If you see the following error after running your scripts:
Server: Msg 242, Level 16, State 3, Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server] The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
The statement has been terminated.
It means that you should change the server language settings by doing the following:
If you see the following error after running your scripts:
Server: Msg 242, Level 16, State 3, Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server] The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
The statement has been terminated.
It means that you should change the server language settings by doing the following:
To fix this problem, you should:
Simply copying or restoring data tables from an MSDB database on a new server does not allow to restore DTS Packages because they have interior connections to the execution context of the server on which they were created and on which they were used on it prior to migration. To copy DTS Packages between servers, VB scripts must be employed. Therefore, the program Recovery Toolbox for SQL Server is not suitable for restoring DTS Packages.
The tool isqlw.exe is a component of the MS SQL Server package. You can always download the latest version of MS SQL Server from the Microsoft site and install the necessary components on the computer. The demo version of MS SQL Server downloaded from the Microsoft site allows you to use the components within the period specified in the EULA.
If you can find the appropriate tools on Microsoft.com then you can download and install Query Analyzer from our website. The link for download is: https://recoverytoolbox.com/download/isqlwInstall.exe
A lot of RAM is required to recover large MS SQL Server databases. The developers of the program recommend that you recover large databases on computers with enough free physical memory. The physical memory used by the program must not be less than the size of the file you are recovering divided by 500 plus 20-100 MB more for the program to run. That is, if you try to recover an .mdf file with the size of 100 GB, the computer must have at least (100 GB / 500) + 120 MB = 320 MB of free physical memory.
It is possible that something additionally happens with your MDF between tryout and registration (recovered by other software or something else). You can check it by running the demo version against this file on another computer.
Recovery Toolbox for SQL Server automatically detects the server version the database was used on. Therefore, if the database was used on MS SQL Server 2000, the program writes the isqlw tool to the saved scripts for importing into the new database. If the database was used on MS SQL Server 2005 or higher, the sqlcmd tool is used in the scripts. If you want to import data to a database on a server with a version different from the original one, you should use the tool for the corresponding server:
Recovery Toolbox for SQL Server has no limits on the size of recoverable MDF/NDF files. The utility has no limits on the number of recoverable files.
Yes. On a separate page before saving data in Recovery Toolbox for SQL Server, you can select any table, table data, procedure, function, index, or trigger for recovery.
Recovery Toolbox for SQL Server recovers damaged databases after logical damage, which may have been caused by physical damage.
No. The database compatibility level does not affect the ability to recover a SQL Server database.
Recovery Toolbox for SQL Server does not use database log files (LDF) to recover the damaged Microsoft SQL Server database itself.
It is possible to partially recover data from MDF files of encrypted databases if these database fragments have not been encrypted. Viruses usually do not encrypt large files completely. For large files, usually only the beginning and end of the file are encrypted. Recovery Toolbox for SQL Server can extract data from the unencrypted part of the database file.
The version of SQL Server does not affect the quality and success of recovery.
On the form before saving, you need to select only the creation and saving of scripts for creating objects.
Yes. Save all recovered data as SQL Scripts and then sequentially import the data into the new version of SQL Server.
Indexes, triggers, and procedures are always saved. It is important to note that when applying scripts to create indexes, failures may occur if the data is partially or incorrectly recovered.
Recovery Toolbox for SQL Server runs locally on clients' computers and does not exchange data with third-party servers.
Yes, you can. You need to purchase a Business License or Local License.
No. There is no console version or API.
No.
No.
Yes, the program can be used on virtual machines, clouds, remote desktops, etc.
No.
Yes. You don't need to be connected to SQL Server to view data from an MDF file. You also don't need to have SQL Server installed.
No. You can export data to SQL scripts or directly to a new SQL Server database.
No. There is no search or filter function for data in damaged MDF files.
There are no limits for MDF Viewer. In addition, the function of viewing data in an MDF file is free and does not require the purchase of a license.
Recovery Toolbox is not responsible for third-party software. However, you can download, install, and test the ability to recover data after other software for free. The demo version of Recovery Toolbox for SQL Server is free and always available on the website.
Yes, links between tables are supported. However, the data from each table must remain completely intact and correct. If some of the data from the table is lost, executing the SQL script to create a foreign key will result in an error.
The recovery speed depends on the performance of the computer on which the damaged SQL Server database is being recovered and saved. In tests on a real damaged SQL Server database of 300 GB, the total recovery time was 5 days. The test was conducted on a high-performance computer with a very fast disk system based on NVMe disks.
Recovery speed is affected by the processor clock speed and the data exchange speed with the file subsystem disk.
The program logs are available on the last page of the program and in the err.log file.
Recovery Toolbox for SQL Server does not change or modify the original MDF file. Therefore, there is nothing to cancel or 'roll back.'
You can contact technical support in any language. The technical support response will be in English. The technical support response can be translated into any language using the free Google Translate or DeepL services.
The technical support contact form is available here: https://recoverytoolbox.com/support.html. Technical support responses take up to 24 hours.
Every week, we receive requests from users who are unable to recover damaged SQL Server databases using standard Microsoft tools (DBCC CHECKDB, DBCC REPAIR). Recovery Toolbox for SQL Server uses a very complex algorithm to analyze the structure of the file, blocks, and connections within the data. This is a special artificial intelligence for recovering damaged Microsoft SQL Server databases. Therefore, the quality and percentage of recovery using Recovery Toolbox for SQL Server is significantly higher than using standard Microsoft tools.
No.
We recommend:
Yes. Recovery Toolbox for SQL Server reads schemas, tables, and committed records directly from .mdf and linked .ndf data files without requiring an intact .ldf transaction log file. Uncommitted in-flight transactions that existed only in a lost .ldf and were never flushed to data pages cannot be reconstructed, which is why verifying recent rows in DEMO mode is recommended.
Native SQL Server refuses to attach a database when any linked .ndf file is missing. Recovery Toolbox for SQL Server can still scan the surviving .mdf and remaining .ndf files to extract every schema, table, and record physically stored inside those surviving files. Data residing exclusively inside a permanently missing .ndf file cannot be recovered unless that file is located.
No. You can install and run Recovery Toolbox for SQL Server on any standard Windows PC or laptop without Microsoft SQL Server or SQL Server Management Studio installed. Scanning, reviewing recovered structures and rows in DEMO mode, and generating .sql scripts work completely standalone. A target database connection is only needed when you choose direct database export.
Yes. Because Recovery Toolbox for SQL Server supports legacy through modern Microsoft SQL Server formats and exports portable .sql scripts, you can load recovered schemas and data directly into a newer SQL Server instance. If severe file damage produced duplicate rows that violate a UNIQUE or FOREIGN KEY constraint during import, exporting as .sql scripts lets your team inspect and clean the conflicting rows cleanly before applying constraints.
Recovery Toolbox for SQL Server is built for Windows desktops, laptops, and Windows Server environments, running 100% offline inside your corporate network. Licensing scales by deployment scope—Personal (noncommercial use), Business (enterprise, commercial, and government use), and Site (multi-workstation corporate deployment across up to 100 devices in one or more company locations). Check the order page for current license pricing.
Ready to verify what can be recovered from your damaged SQL Server database?
Preview your recovered data in the free DEMO before purchasing a Windows license. Choose the license that matches your use.
For personal use for noncommercial purposes.
For legal use in enterprise, commercial and governmental environments.
For up to 100 electronic devices in one building or distributed between several buildings.
Repair a standalone .MDF file in your browser, without installing desktop software.
The purchased registration key is valid for all 2.x versions of Recovery Toolbox for SQL Server.
Choose a one-year renewal for your existing license type.
1-year renewal · For personal use for noncommercial purposes.
1-year renewal · For legal use in enterprise, commercial and governmental environments.
1-year renewal · For up to 100 electronic devices in one building or distributed between several buildings.
PayPro Global (PayPro Global, Inc., 250 The East Mall street, Etobicoke, ON Canada, M9B 0A9) is the fastest growing eCommerce company that develops customized solutions to help software producers to easily and effectively sell software online. PayPro Global supports more than one hundred currencies, all major credit cards, and a wide variety of payment options. PayPro Global offers efficient customer support 24/7 and provides personal attention to customers having special requirements.
Noventiq online store for licensed software opened in 2004. Noventiq offers customers over 15,000 programs from 3,000 developers, provides fast delivery (electronic and physical), accepts 20 payment methods, and includes a cumulative discount system. Noventiq specialists provide customers with all the necessary advice for purchasing licensed software. Selling software is our profession!
good
Good website for fulfilling its purpose
He saved my life
its a good product it does everything it says it could do
Impresionante, no imaginé tal eficiencia, muchas gracias.
80 años. Retirado. RECOVERY,TOOLBOX, facilísimo de usar. Fabuloso.
nice
Everything is beautiful
Great Software
Excellent Experience – Highly Recommend!
I had a wonderful experience! The service provided was fast, efficient, and very professional. Everything went perfectly from start to finish, and the quality of the product/service exceeded expectations. I highly recommend it! Definitely deserves 5 stars!
I use a NAS drive to sync between my desktop and laptop. The NAS stores 30 versions and then deletes the oldest. While working on the laptop, the last good version was overwritten by more than 30 incomplete files. Because of this, I could no longer access my administration, as the MDF (administration) file was corrupted.
Thanks to Recovery Toolbox I was able to read the data, use the last good backup copy and, using my own software, re-enter it into the management system.
Lesson learned?
Use your NAS for critical files as little as possible. If you do, pause syncing and wait until your computer is turned off until the files are safely synced to the NAS.
Great program, thank you!
Отличная программа
Excellent !
Very good and easy ti use
Thanks! You've saved my life!!! You're the greatest!!! Thanks!
Very nice program, thanks.
The database is used for a piece of medical imaging equipment for patient data and images. The PC was hard booted (shutdown) and upon reboot the database had a mismatch between a couple of the files.
I had my database encrypted by RamsomWare.
Using the recoverytoolbox application I was able to access the table structure, but the most important tables are corrupt.
Some tables were complete.
The indexes are not restored because some of the data was lost.
But you can know exactly what records are missing: you can see the data gaps in the indexes.
Thank you so much
GREAT EXPERINCE
I do not want to be ungrateful, so I will leave a review.
The support teams helped to repair the file by fully investigating my problem.
It's very good that you went to meet me.
I could not do such a job myself 100%.
Thank you for your help and your patience.
When my .mdf file broke, I decided to time the repair of my MS-SQL file. For the database 5.6GB it took 1 hour 23 minutes
Exporting the repaired .mdf file by running the script directly from the program crashed because there was a problem with the time format. I had to save the .mdf file and manually change all the values of the column with the DateTime property.
Write a statement "How to export a database to MS SQL Server 2000 with DateTime". The program pulls 4 stars
With more than 10 years of experience, I am convinced that this program is really useful. You can, of course, manually try to fix the database, but how long it will take and whether there will be problems in the future is not clear. So I preferred this program to auto-fix the SQL Server database because of the time and frustration it saves.
Excellent. Restored databases after a ransomware virus.
I could repair my damaged .mdf file, but when I open file in MS SQL 2003, I saw that some foreign keys was not recovered in scheme
If you didn’t recover part of the data while restoring the .MDF file, try to restore it in parts, choosing .MDF and .NDF files. So I was able to completely repair my damaged SQL Server 2005 database. Of course, not a quick way to fix a corruption file, but it works.
In order to restore the .LDF file of SQL Server 2005, you first had to restore the .MDF databases. The recovering process took a long time because the database was very large.
I can recover my data from a .MDF file, but when I tried to import SQL recovered data into Microsoft SQL 2005 by "Execute script on database" option. My data doesn't restore. There has been an error converting into datetime format while importing scripts into SQL SERVER 2005. I choose first option "Save script to disk" and run it in MS SQL and its way help me.
My encryption virus encrypted the header of an important mdf file. Using Recovery ToolBox for SQL Server completely recovered information. Thanks to those who wrote this program! The program is worth the money!
I repaired suspend database on good server. But it require 1 weeks of work Win2016 + SQL Server 2016. Size of *.mdf file was very huge...
SQl Server 2000 was repaired in 17 hours.
But saved sql scripts placed 15gb on disk.
Best tool of the year I used!!!!
SQL databases were crashed by unknown reason, Recovery Toolbox for SQL Server saved the situation.
Sometimes, recovery process interrupts, but fortunately after, continues.