DBCC CHECKALLOC is a common command that is used by database users to check the consistency of disk space allocation. The command comprehensively examines the use and allocation of all pages in your specified database. However, if examining the pages, the command displays an error message, then it means that your database pages have been corrupted or damaged. Furthermore, the data stored in the database becomes inaccessible after the error message appears. An ideal way to access your data in such situations is by restoring the data from an updated backup. But if in case, your database backup has been corrupted or damaged, then you will need to use advance SQL Repair application to repair your database.
As a practical instance, you encounter the below error message when you run DBCC CHECKALLOC command:
“Table error: Page %S_PGID is allocated to object ID %d, index ID %d, not to object ID %d, index ID %d found in page header.”
After the above error message appears, the data stored in the database becomes inaccessible. Cause
The root cause for the occurrence of the above error message is that DBCC CHECKALLOC statement has detected a mismatch in the Object ID between sysindexes and extents. This primarily occurs due to metadata structure corruption. Resolution
To resolve the above error message, you will need to follow the below mentioned underneath steps:
1. Check the index ID connected with the page number highlighted in the error message to find the error occurred on the index or on table data.
2. Next, restore the database after analyzing the underneath situations:
If the Object ID in the error message contains a value less than or equal to 100, then the system table is corrupted. In such situations, restore the database from a clean backup.
In case, the value is greater than 100, the error is in user table. Restore only the table in such situations.
If the index ID contains a value equal to 1, then you will need to restore the database from an updated backup.
However, if the above steps fail to resolve your issue and the error message still persists, then you will need to use advanced third-party sql repair software to access your database. Such SQL Database Repair applications provide comprehensive database repair by using powerful scanning methods.
SQL Recovery is an impressive sql database repair tool to repair damaged SQL Server 2008, 2005, and 2000 databases after all kinds of logical crash. The read only software provides risk-free recovery of lost components by storing them on a new database file, leaving the original database file untouched.