Data inconsistency symptoms and actions

There are common symptoms of each type of data inconsistency problem, and general recommendations to resolve these conditions.

Table 1. Types of data inconsistency
Problem Symptoms Indicated By Possible Causes Suggested Actions
Unavailable data Table or index space is marked STOP or LPL

RESOURCE UNAVAILABLE condition indicated

Messages DSNT500I or DSNT501I

Type codes 300 (page), 301 (index subpage), 302 (table space page), or 303 (index page)

Abend reason code 00C9009F

SQL return code -904

DM is unable to open a required VSAM data set during restart processing.

Attempt to insert or update record with foreign key when index that enforces the primary key of the parent table is dropped.

Start database that contains the table or index space to apply all log records that were deferred at Db2 restart.

Run RECOVER TABLESPACE on the table space, or RECOVER INDEX or REBUILD INDEX on the index.

Resolve problem manually if it is a data inconsistency problem.

Create an index that enforces the primary key, or drop the relationship.

Internal inconsistency Table or index space is marked STOP

Many error messages or abends identifying the same set of pages

Messages DSNI013I or DSNI014I

Abend reason codes 00C90101, 00C90107, 00C90108, or 00C90109

Damaged recovery log is used during Db2 restart processing (00C90101 issued).

Unavailable data in pages (usually not an inconsistency problem).

Refer to Type-of-failure keywords.

Start the database that contains the table or index space to apply all log records that were deferred at Db2 restart.

Run RECOVER TABLESPACE on the table space, or RECOVER INDEX or REBUILD INDEX on the index.

Resolve problem manually if it is a data inconsistency problem.

Inconsistent page Table or index space is marked STOPPED

INCONSISTENT DATA or INDEX condition indicated

Messages DSNI011I or DSNI012I

Abend reason codes 00C90105 or 00C90102

DM tries to recover a page that contains inconsistent data by using the recovery log, but is unsuccessful. Run DSN1COPY with CHECK option to obtain more information.

Run RECOVER TABLESPACE on the table space, or RECOVER INDEX or REBUILD INDEX on the index.

Resolve manually.

Activate global trace to obtain more information. (See Special considerations for suspected page inconsistencies.)

Inconsistent page set Table or index space is marked STOPPED.

SQL statement is processing more rows or fewer rows than specified in the statement.

Messages DSNT500I or DSNT501I.

Type codes 200 (table space) or 201 (index space).

Abend reason codes 00C902xx or 00C9011x (DBDs).

Link or hash chain is damaged.

Extra or missing index entry.

Inconsistencies between two or more items of data.

Inconsistencies in DBD.

Issue -DISPLAY DATABASE(*) RESTRICT to display STOPPED table or index spaces.

Run CHECK utility on index space to verify validity of indexes.

Run RECOVER TABLESPACE on the table space, or RECOVER INDEX or REBUILD INDEX on the index.

Inconsistent page set In a segmented table space, results differ between index scan and table scan or total number of rows is less than expected. For segmented table space inconsistencies, abend reason codes 00C90218 or 00C90219. A non-empty segment in a segmented table space is not on any segment chain; a deallocated segment is on a segment chain; an allocated segment is on the wrong segment chain. For segmented table space errors, analyze SDUMP and run DSN1PRNT or REPAIR with DUMP option to print pages that are covered by inconsistent segment; run REPAIR or reorganize table space by way of REORG.
Inconsistent page set CHECK PENDING state indicated. CHECK PENDING indicated by DISPLAY DATABASE command with table space or RESTRICT specified. CHECK PENDING set by CHECK, LOAD or RECOVER utilities, or ALTER statement. Indicates that associated page set can contain records that violate referential or check constraints.

For indexes, indicates one of the following cases:

  • The index and its table space were recovered to a previous point in time that is not a quiesce point.
  • The index and its table space were recovered with the TOCOPY option, but not in the same RECOVER statement.
  • The index and its table space were recovered with the TOCOPY option and in the same RECOVER statement, but the image copies were not taken with the same COPY statement.
Does not apply to databases.
To reset CHECK PENDING on a table, rectify the violations and place deleted records into “exception” tables, run CHECK DATA utility with the DELETE YES option, DROP TABLE to alleviate the problem and LOAD REPLACE to replace the data that adheres to referential or check constraints or recover all members of table space that is set to 'quiesce' point. To reset CHECK PENDING on an index, run CHECK INDEX.
Inconsistent page set RECOVER PENDING state indicated.

LOAD or REORG does not complete normally.

RECOVER PENDING indicated by DISPLAY DATABASE command with table space, index space, or RESTRICT specified. RECOVER PENDING set by utilities when data found to be inconsistent. Abnormal utility termination leaves the table space in RECOVER PENDING. Indicates that associated page set can contain inconsistent data, apart from referential constraint violations.

Use REPAIR utility to manually turn off CHECK PENDING, and -START ACCESS (FORCE) to restart table space. This approach is not recommended.

To reset RECOVER PENDING, run RECOVER, the LOAD REPLACE, or REPAIR utilities.
Inconsistent page set INCONSISTENT DATA or INDEX condition that is indicated by messages. SQL return code -904. Internal Db2 problems, I/O errors, system problems. Resolve manually.
Inconsistent page set Table space or index space is not at the latest level. SQL return code -904. Reason code 00C2010D or 00C20110. Message DSNB232I. Data set is restored to a level that is inconsistent with other data sets or with the Db2 log.

VSAM high-used RBA value is corrupted.

Restore pageset or partition to correct level; or restore down-level pageset or partition to currency, run RECOVER, or RECOVER LOGONLY; or accept down-level, run REPAIR LEVELID; or replace contents, run LOAD REPLACE; or restore to prior point in time, run RECOVER.