Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Error 2591 [Table of Contents] Insert Errors

Troubleshooting and Error Messages Guide

[-] Chapter 3 Error Message Writeups
[-] dbcc Errors
[-] Error 2596

Error 2596

Severity

16

Error message text

%S_PAGE has an incorrect pgfreeoff value of %d. The offset should be %d.

Explanation

The free byte offset on a page indicates the offset of the first unused byte on that page. Error 2596 occurs when dbcc checktable detects that the free byte offset on a page is incorrect.

This is a serious error as it indicates possible corruption on the affected page. This error can occur in conjunction with other errors, particularly Error 2506.

Action

If Error 2596 occurs on a system table being processed by dbcc checktable, call Sybase Technical Support.

Case 1

If the number of the free byte offset shown in the error message is lower than the expected number, some data has been lost. To determine how much data has been lost, find the difference (in bytes) between the actual free byte offset and the expected free byte offset (both numbers are shown in the error message output). The amount of data lost includes 2 bytes overhead per row where there are only fixed-length columns or 4+n bytes overhead per row with variable-length columns where n is the number of variable-length columns. If you need help, call Technical Support.

Decide whether you should restore the database that contains the affected table from backups. In making that decision, consider the number of rows lost and the number of other corruption errors that have occurred on this table and database.

Case 2

If the free byte offset on the page header is higher than the expected value, no data has been lost. However, some extraneous rows may exist.

If you have clean backups of your database, recover from backups. If you do not have clean backups of your database, follow these steps to correct the error:

  1. Use the procedure in "How to Find an Object Name from a Page Number" in the Encyclopedia of Tasks chapter to identify which table and index correspond to the page number from the error message text.

  2. If the object with the error is not a system table (a system table's object ID is less than 100), continue with step 3.

    If the object with the error is a system table and the index ID is not 0, refer to "How to Fix a Corrupted Index on System Tables" in the Encyclopedia of Tasks chapter for instructions on how to repair the system table index.

    If the object with the error is a system table and the index ID is 0, contact Technical Support. They may be able to help you repair the corruption or it may be necessary to restore from clean backups.

  3. For user tables, if the index ID is 0 or 255, continue with step 4.

    If the index ID is not 0 or 255, translate it into an index name:

    1> use database_name 
    2> go

    1> select name from sysindexes 
    2> where id = object_ID and indid = index_ID
    3> go

    To ensure that the information needed to re-create the index is available, run sp_helpindex on the index prior to dropping it.

    Drop the index.

    Re-create the index. This clears the corruption in most cases.

    Run dbcc checktable on the table to verify that the corruption is gone.

  4. If the index ID is 255, delete or update the data row to remove the reference to the bad text page.

    If the index ID is 0, do one of the following:

Before dumping your database, make sure it is working correctly by running the following commands prior to each dump:

  1. dbcc checkdb.

  2. dbcc checkalloc or dbcc checkalloc with the fix option. (Refer to "How to Fix and Prevent Allocation Errors" in the Encyclopedia of Tasks chapter for information about running these commands in multi-user mode and how to prevent spurious allocation errors from dbcc commands.)

Versions in which this error is raised

All versions


Error 2591 [Table of Contents] Insert Errors