Error 2521

Severity Level 16

Message Text

Table Corrupt: Page is linked but not allocated; check the following pages and table: alloc page#=%ld extent id=%ld logical page#=%ld object id in extent=%ld (object name = %.*s) index id in extent=%d

Explanation

This error means that a page is currently in use by a table or index but it has not been marked as allocated. The same page could be allocated again, resulting in a loss of whatever data resides on the page.

Important This error is serious, especially if it occurs on a table's data pages.

Pages encountering error 2521 will not be included in a database dump, because database dumps are performed by reading allocation pages and not by traversing page chains. Correct this error before dumping the database.

Action

If the object id in extent is less than 100, the error is on a system table, which cannot easily be corrected. Restore the database from a known clean backup.

If the object id in extent is 100 or greater, use the DBCC PAGE statement described in "Associating a Page with an Object" in Chapter 24, "Additional Problem-solving Techniques," to display information about the logical page from the error message. The value that DBCC PAGE displays for indid should match the index id in extent printed at the end of the message.

If these values do not match, restore the database from a known clean backup. If they do match, check what type of index is involved. For additional information, see the table of index IDs contained in "Associating a Page with an Object" in Chapter 24, "Additional Problem-solving Techniques."

For tables (index id in extent = 0)

Restore the database from a known clean backup.

For indexes (0 < index id in extent < 255)

The problem can be resolved by dropping and re-creating the index in question. After the index is rebuilt, run DBCC CHECKALLOC to verify that the problem no longer exists. If it persists, call your primary support provider.