SQL Server Corruption: Will It Get Better

SQL Server Corruption: Will It Get Better
Download PDF

Will a corrupt SQL Server database ever just get better?

No, a corrupt SQL Server database will not just “get better.” Once a database is corrupt, it requires intervention to repair the damage and restore it to a usable state. The extent of the corruption and the methods used to repair it will determine whether all data can be recovered, and how much data may be lost.

In some cases, simple repairs, such as running database consistency checks or repairing specific tables or indexes, can resolve the corruption. In more severe cases, however, data may need to be restored from a backup or recovered through other means, such as data extraction from transaction log files.

It’s important to address database corruption as soon as it is discovered, as the longer you wait, the more data may be lost, and the more difficult it may become to repair the damage.

For every rule there is always an exception. Lets say you have a data warehousing database with a process that drops a table and recreates it or truncates a tables as part of an import process. That is an example where if there is a corruption in a table that is dropped or truncated that the corruption may go away. Without understanding the root cause of the corruption it may be just as likely to come back again.

EDIT: Thanks to the comment below from Wilfred van Dijk, he is correct, I did miss one scenario.  Availability groups:  If you have AlwaysOn AG’s, there’s an automatic self-healing mechanism for specific corruption errors (repairing a corrupt page on primary by replacing this with the same page from a secondary). So technically (medically) your database will get better.

Want to learn more about how to prepare for corruption on SQL Server? Take a look at my class that will teach how to to be prepared if corruption strikes.

Corruption Class by Steve Stedman.

 

More from Stedman Solutions:

SteveStedman5
Steve and the team at Stedman Solutions are here for all your SQL Server needs.
Contact us today for your free 30 minute consultation..
We are ready to help!

1 Comment on “SQL Server Corruption: Will It Get Better

  1. Actually, if you have AlwaysOn, there’s an automatic self-healing mechanism for specific corruption errors (repairing a corrupt page on primary by replacing this with the same page from a seconday). So technically (medically) your database will get better

Leave a Reply

Your email address will not be published. Required fields are marked *

*