16
Versions earlier than 15.0:
Table Corrupt: keys in left child do not precede the parent key; check left child page %ld.
Version 15.0 and later:
Table Corrupt: Keys in the left child page do not precede the parent key; check page %d, partition ID %d.
This serious error is returned by dbcc checktable or dbcc checkdb (that calls dbcc checktable). dbcc checktable checks a table and its indexes to determine whether:
Pages are linked correctly
Indexes are properly sorted
Pointers are consistent
Page offsets are consistent
sysindexes pages are correct
The data row count is equal to the leaf row count for nonclustered indexes
During index-level checking, for each key in the parent page, dbcc checktable checks whether the last key in the left child page is less than the parent key, and whether the first key in the right child page is greater than or equal to the parent key. If the last key in the left child is not less than the parent key, error 7930 occurs.
Use the procedure in “Finding an object name from a page number” in the chapter “Other Useful Tasks” in the most recent version of Troubleshooting and Disaster Recovery to identify which table and index correspond to the page number from the error message text.
WARNING! The procedure referenced in step 1 uses the dbcc page command. Use the dbcc page command only as directed. This command is undocumented, nonstandard, and is provided “as is” without any warranty. Sybase Technical Support does not support this command for general use. Although the command syntax is provided for reference, use this command only in the specific diagnostic situations described, and with the specific syntax shown. Failure to do so could cause performance problems and database corruption.
If the object encountering the error is not a system table (a system table’s object ID is less than 100), go to step 3.
If the object with the error is a system table and the index ID is not 0 (zero), refer to “Fixing a corrupted system table index” in the chapter “Other Useful Tasks” in the most recent version of Troubleshooting and Disaster Recovery for instructions on how to repair the system table index. then go to step 5.
If the object with the error is a system table and the index ID is 0 (zero), contact Sybase Technical Support. They may be able to help you repair the corruption but it may be necessary to restore from clean backups.
If the object with the error is a user table and the index ID is not 0, determine whether there is a clustered index on the table:
1> sp_helpindex <table_name> 2> go
Where <table_name> is the name you determined in step 1.
If there is a clustered index on the table, rebuild it, then go to step 5.
If there is a nonclustered index on the table, rebuild the index using these steps.
Translate the index ID into an index name:
1> use <database_name> 2> go
1> select name from sysindexes 2> where id = <object_ID> and indid = <index_ID> 3> go
Drop the index.
To ensure that the information needed to re-create the index is available, run sp_helpindex on the index prior to dropping it.
Re-create the index. This clears the corruption in most cases.
Run dbcc checktable on the table to verify that the corruption is gone. If the corruption still exists, call Sybase Technical Support.
Refer to “drop index” and “create index” in the Reference Manual: Commands for information about dropping and re-creating indexes.
All versions