Topic last updated -- January 2004
Severity Level 16
Table error: Object ID O_ID, index ID I_ID B-tree level mismatch, page P_ID1. Level LEVEL1 does not match level LEVEL2 from parent P_ID2.
There are two pages linked as parent (P_ID2) and child (P_ID1) in a B-tree. The level (LEVEL1) in the child page (P_ID1) does not comply with the level rules for B-trees, given the level (LEVEL2) in the parent page (P_ID2).
The level rules are such that if a parent page has level X, a child page must have:
- Level X-1, if the index is a non-clustered index.
- Level X-1, if the index is a clustered index and the child page is not at the leaf level.
- Level 0, if the index is a clustered index and the child page is at the leaf level. In this case, the parent page level must also be 0.
To find out which page is incorrect, examine the two pages and also look for any 2531 (b-tree sibling level mismatch) errors.
Run hardware diagnostics and correct any problems. Also examine the Microsoft® Windows NT® system and application logs and the SQL Server™ error log to see if the error occurred as the result of hardware failure. Fix any hardware related problems.
If you have persistent data corruption problems, try to swap out different hardware components to isolate the problem. Check to ensure that your system does not have write caching enabled on the disk controller. If you suspect this to be the problem, contact your hardware vendor.
Finally, you might find it beneficial to switch to a completely new hardware system, including reformatting the disk drives and reinstalling the operating system.
RESTORE FROM BACKUP
If the problem is not hardware related and a known clean backup is available, restore the database from the backup.
If no clean backup is available, execute DBCC CHECKDB without a repair clause to determine the extent of the corruption. DBCC CHECKDB will recommend a repair clause to use. Then, execute DBCC CHECKDB with the appropriate repair clause to repair the corruption.
Caution If you are unsure what effect DBCC CHECKDB with a repair clause has on your data, contact your primary support provider before executing this statement.
Performing a repair will cause the index to be rebuilt.
If running DBCC CHECKDB with one of the repair clauses does not correct the problem, contact your primary support provider.