Error 2511

Severity Level 16

Message Text

Table Corrupt: Keys in %S_MSG should be in ascending order; check page number %ld

Explanation

This error occurs when an index is not ordered correctly. The %S_MSG variable can be a data page (for clustered indexes), an index page, or a leaf page.

Action

Follow these steps:

  1. Identify which table and index correspond to the page number from the error message text using the instructions in "Associating a Page with an Object" in Chapter 24, "Additional Problem-solving Techniques."
  2. Note the object ID.
  3. If the object with the error is not a system table (its object ID is more than 100), continue with the next step.

    If the object with the error is a system table (its object ID is less than 100), you cannot drop the index. Restore the database from a known clean backup.

  4. Find the name of the index involved, as follows:
    select name from sysindexes
    where indid = index_id
    and id = object_id
  5. Drop and re-create the index.
  6. Run DBCC CHECKTABLE and DBCC CHECKALLOC on the affected table to verify that all problems have been resolved at the table level.

If problems persist, contact your primary support provider. Have the output from the appropriate DBCC statements available for review.