Recover a corrupted database/tables

818 views Asked by At

Our customer faces an issue with a corrupted database caused by a 3rd party software. Unfortunatelly they found out too late and no longer have a valid backup to return to. Fixing views etc. is easy but there are couple tables that are unaccessible and contain important data.

When trying to select data from corrupted tables I receive this error:

SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:7733; actual 114:7667823). It occurred during a read of page (1:7733) in database ID 5 at offset 0x00000003c6a000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\DATA\aspe_bad1.MDF'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

Running DBCC CHECKDB gives this error

Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check previous errors.

Running DBCC CHECKTABLE gives the same error as select does.

When running DBCC PAGE I get Metadata: ObjectId = 0, meaning:

If you see the ObjectId is 0, that means there was no metadata found. This could be because:

  • The table that the page was part of has been deleted since the page corruption was logged
  • The system catalogs are corrupt in some way
  • The page is corrupt and so incorrect values were used to look up the metadata

Checking SQL Server Logs contains only 1 different error and that is:

SQL Server detected a logical consistency-based I/O error: unable to decrypt page due to missing DEK. Itoccurred during a read of page (1:7727) in database ID 5 at offset 0x00000003c5e000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\DATA\aspe_bad1.MDF'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

Honestly I'm at my wits end. Can anyone help me fix this issue? Is it even possible to repair to at least some extent?

Thanks, Z

0

There are 0 answers