Error 2525

Severity Level 16

Message Text

Table Corrupt: Object id wrong; tables: alloc page %ld extent id=%ld l page#=%ld objid in ext=%ld (name = %.*s) objid in page=%ld (name = %.*s) objid in sysindexes=%ld (name = %.*s)

Explanation

The DBCC CHECKALLOC statement detected one of the following errors:

Note Occasionally DBCC CHECKALLOC reports this error when no real error condition exists. Run DBCC CHECKALLOC in single-user mode if you suspect that the 2525 error message is incorrect.

Action

Compare objid in ext to objid in page, and then carry out one of the following procedures, depending on whether the object IDs matched.

Caution If you drop an object before you correct the 2525 error condition, the drop operation could cause pages belonging to another object to be deallocated, causing error 1108.

Object IDs don't match

If the object IDs don't match, restore the database from a known clean backup.

Object IDs match

If the object IDs match, the pointer to a distribution page for a particular index is probably invalid.

To correct the problem:

  1. Use the following query to determine which index has the problem. The query compares the id column in the output to the objid in sysindexes parameter in the message, and the distribution column in the output to the l page # parameter in the message.
    use database_name
    go
    select indid, name, object_name(id)
    from sysindexes
    where id = objid_in_sysindexes and
    distribution = l_page_#
    go

    If this query does not return any rows, contact your primary support provider.

  2. Drop and re-create the index specified by this query. (For information about using DROP INDEX and CREATE INDEX, see the Microsoft SQL Server Transact-SQL Reference.)
  3. Run DBCC CHECKALLOC to be sure that the problem is corrected. If the problem still exists, contact your primary support provider. Have output from DBCC CHECKALLOC available for review.