16
Versions earlier than 15.0:
Data page (%S_PAGE) has been marked as an overflow page; however, the previous page (%S_PAGE) does not indicate that there is an overflow page linked to it.
Version 15.0 and later:
Data page %S_PAGE, partition ID %d, has been marked as an overflow page; however, the previous page (page %S_PAGE, partition ID %d) does not indicate that an overflow page is linked to it.
When using a clustered index, Adaptive Server maintains data so that the, physical order of rows is the same as their logical, indexed order. The bottom, or leaf level, of a clustered index contains the table’s actual data pages. When an index key has a large number of duplicates, all of the data rows may not fit on the same data page. Due to the structure of a clustered index, it is not possible to simply insert these overflow rows to the beginning of the next data page. Instead, Adaptive Server allocates and inserts a new data page between the original data page and the next data page, marking this an overflow page to store the additional values (and marking the original page as having an overflow page). The original page, and the overflow page linked to it, now both contain at least one row with that key value. The overflow page contains only rows with an overflow index value.
On tables without a clustered index, the second page through the last page of the table are marked as overflow pages; the first page through the next-to-last page are marked as having an overflow page.
When dbcc checktable examines a page marked as an overflow page, it checks the previous (original) page for consistency. Error 2582 is raised when the original page is not marked as having an overflow page.
Take the following steps to correct the problem:
Use the procedure described in “Finding an object name from a page number” in the chapter “Other Useful Tasks” in the most recent version of Troubleshooting and Disaster Recovery to translate the second page number displayed in the error message into an object 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.
If there is a clustered index on the table, run dbcc tablealloc to correct the problem:
1> dbcc tablealloc (<table_name>, full, fix) 2> go
The tablealloc command corrects the error only when you run it in full or optimized mode.
If there is no clustered index on the table, use one of these options to recover from the problem:
Select the table data into a new table, drop the old table, and rename the new table to the old table name. Run dbcc checktable to confirm that the problem has been resolved.
or
Bulk copy the affected table out, drop and re-create the table, and bulk copy back in. This is the most efficient solution for a very large table. Run dbcc checktable to confirm that the problem is resolved.
For more information about how to copy a table in a new table or file, refer to “Rescuing data from a corrupted table” in the chapter “Other Useful Tasks” in the most recent version of the Troubleshooting and Disaster Recovery.
All versions