The DBCC CHECKDB command in SQL Server databases is used to check and repair any inconsistency in the databases. There are many extensions for this command that you can apply in various kinds of situations. However, at times when you this command finds any error on the system tables then it ends abruptly. Such cases can arise due to corruption in the database tables. In such situations, you should employ certain in-built workarounds to get the database repaired. If you are not able to recover the database using these methods, then you should use a third-party SQL database recovery
software to recover SQL database.
Consider a scenario wherein you encounter the following error message while working on an SQL Server 2008 database:
"System table pre-checks: Object ID O_ID. Page P_ID has unexpected page type PAGETYPE. Check statement terminated because of an irreparable error."
This error occurs during the first phase of the DBCC CHECDB command on the database table. In this phase, a page is found having a different type than the DATA_PAGE type. In the first page, this command does basic checks on the data pages of the system tables.
You can try out different methods to repair the database. They are:
Check for hardware issues
: You should check the hardware components and run the hardware diagnostics to ascertain whether the error has occurred because of any hardware malfunctioning. If the problem is quite persisten, then you should swap the hardware components to narrow down on the actual problem. As a last resort, you should try to reformat the hard disk and reinstall the operating system. However, before doing this you should take a complete backup of all your valuable data.
Restore from backup
: If the problem is not hardware related, then you should check the backup of the database. If the backup is clean and updated, then you should replace the corrupted database with its backup.
The aforementioned methods will be able to repair the corrupted database and it will able to function as desired. However, if you are still facing the similar symptoms then you should use a third-party SQL Server recovery software. Such read-only tools are able to recover SQL database from all instances of corruption using safe scanning algorithms.
Stellar Phoenix SQL Database Recovery is an MS SQL recovery software that is able to recover SQL databases created in SQL Server 2000, 2005, and 2008. It repairs various database objects such as tables, queries, stored procedures, defaults, triggers, etc. In addition, this ms sql repair
software preserves the relationships between database tables. It is compatible with Windows 7, Vista, Server 2003, XP, and 2000.