Error 2525



Message text

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


This error occurs when dbcc checkalloc detects one of the following problems:


Compare the “objid in ext” to “objid in page” from the error message. If they do not match, go to “Object IDs do not match”. If they are equal, go to “Object IDs match”.

WARNING! If you drop an object before you correct error 2525, the drop operation could cause pages belonging to another object to be deallocated. This can cause 1108 errors. See “Error 1108” for additional information.

Object IDs do not match

There are two possible situations in this scenario. Either the object exists and may be corrupted or it no longer exists. To determine which scenario you have, do the following:

1> use <database_name>
2> go

1> select object_name(<objid_in_extent>)
2> go

Where <database_name> is the database where the corruption is reported and <objid_in_extent> is from the error message.

If the result of the query is a table that currently exists or if either object (object ID on the page or the object ID of the allocation structure associated with that page) is a system table (object ID is less than 100), call Sybase Technical Support.

If the query does not return any rows, the object that is marked as owning the extent no longer exists.

If the table is a user table, you may be able to correct this error. Back up the data in the table either use bcp to copy out the table whose object ID appears in “objid in page” or by selecting the data into a new table. Refer to “Rescuing data from a corrupted table” in the chapter “Other Useful Tasks” in the most recent version of Troubleshooting and Disaster Recovery for instructions.

Once a copy of the table has been made, do one of the following:

Object IDs match

There are two possible scenarios:

Use the following commands to determine which index has the problem. This query compares the “id” column in the output to the “objid in sysindexes” from the error message, and compares the “distribution” column in the output to the “l page #” from the error message.

1> use <database_name>
2> go
1> select indid, name, object_name(id)
2> from sysindexes
3> where id = <objid_in_sysindexes> and
4> distribution = <l_page_#> 
5> go

If this query does not return any rows, contact Sybase Technical Support.

If the query does return a row, drop and re-create the index specified by this query to correct the problem. (Refer to the Reference Manual: Commands for more information about drop index and create index.)

Execute dbcc tablealloc to make sure that the problem is corrected. If the problem still exists, contact Sybase Technical Support.

Additional information

If the object IDs match, dbcc extentdump and dbcc page can also be used to investigate the problem.

WARNING! 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.

Versions in which this error is raised

All versions