Error 7901

Severity

16

Message text

Versions earlier than 15.0:

Page %ld was expected to be the first page of a TEXT/IMAGE value.

Version 15.0 and later:

Page %d, partition ID %d, is expected to be the first page of a text/image/unitext value.

Explanation

Adaptive Server stores text and image data in a linked list of pages separate from the rest of the table. Error 7901 is raised when a dbcc utility is processing a text or image page chain, but finds that the first page in the chain is not a text or image page. The error is due to a corrupt page header in the first page, or a bad text pointer in a table row.

Error 7901 is raised with these states:

State

Meaning

1

dbcc checktable detected the first page error while checking a table’s text or image chains.

2

dbcc fix_text detected the first page error while recalculating the statistics for a table’s text pages.

3

dbcc rebuild_text detected the first page error while rebuilding the internal data structures for text or image data. (This state is raised in version 12.0 and later).

Action

Take these esteps to resolve the error.

  1. Identify the rows with the bad data using the following command:

    1> select <unique_col> from <table_name>
    2> where convert (int, textptr(<text_colname>))
    3> = <text_page>
    4> go
    

    Where <unique_col> is any column or columns in the table that will uniquely identify the rows, <table_name> is the name of the table, <text_colname> is the text column, and <text_page> is the page ID in the message text.

  2. Drop the rows in question.

  3. Run dbcc checktable on the table to confirm that the problem has been corrected.

Alternately, you can create a new table using select into, specifying all rows from the original table except the affected rows identified in step 1. “Rescuing data from a corrupted table” in the chapter “Other Useful Tasks” in the most recent version of Troubleshooting and Disaster Recovery for details.

Versions in which this error is raised

All versions