Error 1129

Severity

10

Message text

The requested update to the OAM for object %ld, dbid %ld, index %d, oam page %ld, would cause a negative page count. allocation page: %ld, oamarray used: %ld, oamarray unused: %ld, deltaused: %ld, deltaunused: %ld, spid: %ld. Contact your System Admin.

Explanation

Most tables and all indexes have at least one object allocation map (OAM) page. One OAM page holds information about up to 250 allocation pages (248 if the object is an identity column). Each allocation page for an object has an entry in the OAM pages for that table or index. The OAM entry for each allocation page stores the number of used and unused data and index pages on that allocation page.

When a new page is needed or a page is deallocated, the OAM entry has to be updated. The number of used and unused pages on the allocation page is not allowed to be less than 0. Error 1129 occurs if the number becomes less than 0.

Action

  1. Look at the error message to determine the object ID and the index ID.

    If the object that encountered the error is not a system table (a system table’s object ID is less than 100), go to step 2.

    If the object is a system table and the index ID is not 0 (zero), refer to “Fixing a corrupted system table index” in the chapter “Other Useful Tasks” in the most recent version of the Troubleshooting and Disaster Recovery guide for instructions on how to repair the system table index

    If the index ID is 0 (zero), contact Sybase Technical Support. They may be able to help you repair the corruption, but it may be necessary to restore the database from clean backups.

  2. For user tables, if the index ID is 0 or 255, go to step 3.

    If the index ID is not 0 or 255:

    1. Translate it into an index name:

      1> use <database_name> 
      2> go
      
    2. 1> select name from sysindexes 
      2> where id = <object_ID> and indid = <index_ID>
      3> go
      
    3. To ensure that the information needed to re-create the index is available, run sp_helpindex on the index prior to dropping it.

    4. Drop the index.

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

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

  3. If the index ID is 0 or 255, do one of the following:

    • Restore the database from clean backups.

    • Refer to “Rescuing data from a corrupted table” in the most recent version of the “Other Useful Tasks” chapter in the Troubleshooting and Disaster Recovery guide.

Additional information

For more information about OAM pages, refer to the section “Understanding Page and Object Allocation Concepts” within the chapter “Checking Database Consistency” in the System Administration Guide: Volume 2.

If you need to call Sybase Technical Support, have the information ready that is listed in “Reporting errors”, including the output from dbcc traceon (for version 15.0.2 and later, use “set switch on 3604” instead of dbcc traceon.), and dbcc listoam. You must have the “sybase_ts_role” granted to you to run dbcc listoam.

For example, enter the following for pre-15.0.2 versions:

1> dbcc traceon(3604)
2) go 

1) dbcc listoam(<database_name>, <object_ID>, <index_ID>)
2) go

WARNING! Use the dbcc listoam 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