Error 2510

Severity

16

Message text

Versions earlier than 15.0:

Key mismatch between index page %ld, at offset %d and data page %ld (row ID %d) in database ’%.*s’. Drop and re-create index id %d of table ’%.*s’.

Version 15.0 and later:

Key mismatch between index page %d, partition ID %d; at offset %d; and data page %d (row ID %d), partition ID %d. Drop and re-create index ID %d of table '%.*s' in database '%.*s'.

NoteThis error can be caused by a hardware problem.

Explanation

This message indicates that an index is inconsistent with the table data that it represents.

Action

Use the this procedure to recover from the error:

  1. Record the index page number and the data page number from the error text. Refer to “Finding an object name from a page number” in the chapter “Other Useful Tasks” in the most recent version of the Troubleshooting and Disaster Recovery guide to identify the table and index that correspond to the data and index page number. Record the object ID and index ID.

    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.

  2. Depending on the type of object, select the most appropriate procedure:

    • If the object with the error is not a system table (its object ID is 100 or greater), go to step 3.

    • If the object with the error is a system table, see “Fixing a system table corrupted index” in the chapter “Other Useful Tasks” in the most recent version of the guide Troubleshooting and Disaster Recovery for instructions on how to repair the system table index.

  3. If the object with the error is a user table, find the name of the index involved by executing this query:

    1> select name from sysindexes
    2> where indid = <index_id> 
    3> and id = <object_id> 
    4> go
    
  4. Drop and re-create the index. Refer to “drop index” and “create index” in the Reference Manual: Commands for more information.

  5. Run dbcc checktable and dbcc tablealloc on the affected table to verify that all problems have been corrected at the table level.

If problems persist, contact Sybase Technical Support. Have the output from the appropriate dbcc commands available when you call.

Versions in which this error is raised

All versions