Database Repairs

Apart from performing consistency checks on a database, DBCC CHECKDB can perform repairs of the majority of corruptions that it finds. I say “majority” and not “all” because there are some corruptions that DBCC CHECKDB cannot repair. This list includes:

  • Corruption in the leaf level of a critical system catalog clustered index

  • Corruption in a PFS page header

  • Data purity errors (error 2570)

  • Errors from system catalog cross-checks (error 8992)

If any of these corruptions are present, DBCC CHECKDB repairs as much as it can and indicates which corruptions cannot be repaired with a 2540 error (“The system cannot self repair this error”).

This book is not the place to discuss when repair should be used, but suffice it to say that restoring ...

Get Microsoft® SQL Server® 2008 Internals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.