Wednesday, February 29, 2012

Available methods to repair Corrupt or Damaged SQL Server data files

Sometime while opening SQL Server database files (MDF & NDF), Microsoft SQL server shows an error message that is “unable to open desired file because file is corrupt or damaged”. If you have maintained an updated backup for file then this problem will not have enough severity. But in case backup is not available anywhere of corrupt file, then you are left with only one option that is repairing of mdf or ndf files.

This post is all about how to repair corrupt SQL Server data files.
Repair Methods for corrupt MDF & NDF files: There are two methods to repair corrupt or damaged SQL server data file (MDF & NDF). Methods that I will describe in this post will be suitable for most of the SQL server version.
  • Repair with DBCC CheckDB Utility
  • Repair with Stellar SQL Recovery utility

Repair with DBCC CheckDB Utility: Microsoft SQL server offers an utility to repair corrupt SQL server that is DBCC CHECKDB. It has two options to repair corrupt file, repair-rebuild & repair-allow-data-loss.

  • Repair-Rebuild: If level of corruption is less then DBCC CHECKDB will try to repair and rebuild your corrupt file with no data loss.
  • Repair-allow-data-loss: In case level of corruption is very high then DBCC CHECKDB will try to repair your corrupt database file with minimum data loss. If your database is very critical and you can't afford any single data loss then go with second method.

Note: Your database should be in single user mode before running DBCC CHECKDB on database.

Repair with Stellar SQL Recovery Utility: Stellar SQL recovery utility is an robust tool to repair corrupt SQL server database files (MDF & NDF). It repairs tables, views, indexes, stored procedures, triggers, default constraints, primary keys, unique keys, foreign keys etc. You will have to perform some simple steps to repair your corrupt files by Stellar SQL recovery and the steps are....

Download-->Run-->Open Stellar Phoenix SQL recovery-->Choose your corrupt file-->Start scan-->See preview-->Start Repair-->Save Repaired File-->Done

You can see complete software details & working steps of Stellar Phoenix SQL recovery @

No comments:

Post a Comment