REBUILD-pending status

A REBUILD-pending restrictive status indicates that the affected index or index partition is broken and must be rebuilt from the data.

The following REBUILD-pending states can be set:

REBUILD-pending (RBDP) status
Indicates that the physical or logical index partition is inaccessible and must be rebuilt.

For example, RBDP status is set on a data-partitioned secondary index if you create the index after performing the following actions:

  • Create a partitioned table space.
  • Create a partitioning index.
  • Insert a row into a table.
In this situation, the last partition of the table space is set to REORG-pending (REORP) restrictive status.
Start of changeREBUILD-pending star (RBDP*) statusEnd of change
Start of changeIndicates that a logical partition of a nonpartitioned secondary index is unavailable for read-write access and the entire index is unavailable for read access. The related table is unavailable for insert or update operation if the index is unique and one or more logical partitions in the index is in REBUILD-pending star status.End of change
Page set REBUILD-pending (PSRBD) status
Indicates that an entire nonpartitioned secondary index or index on the auxiliary table is unavailable for read-write access.
Start of changeAdvisory REBUILD-pending (ARBDP) statusEnd of change
Start of changeIndicates that the index should be rebuilt. For example, ARBDP status is set when indexes with varying length columns are changed from VARYING NO to VARYING YES.End of change
Start of changeREBUILD-pending empty (RBDPM) statusEnd of change
Start of changeFL 506 Indicates that the logical partition of the nonpartitioned secondary index (NPSI) is to be treated as empty, even if the keys exist within the NPSI structure on disk or in the buffer pool. The logical partition can be rebuilt at a later time. Meanwhile, application queries can continue to run against the affected table with the following conditions:
  • Update and delete operations can successfully run on all data partitions, even if the data partition’s logical NPSI partition is in RBDPM status.
  • Cross-partition updates or inserts into a data partition whose logical NPSI partition is in RBDPM status are rejected with return code 8, SQLCODE –904, and reason code 00C900F6.
  • Inserts into a data partition are successful if the underlying index is defined with EXCLUDE NULL KEYS and every key column contains the NULL value.

When a logical partition of a NSPI is in RBDPM status, some utilities will fail. Specifically, CHECK DATA, CHECK INDEX, COPY INDEX, and RUNSTATS INDEX will fail if the utility needs to use a logical partition that is in RBDPM status. All other utilities behave as if the object is in RBDP status.

End of change

To reset REBUILD-pending status, take the actions that are described in the following table.

Table 1. Resetting REBUILD-pending status
Status Abbreviation Object affected Corrective action Notes
REBUILD- pending RBDP Physical or logical index partition Run the REBUILD INDEX utility on the affected index partitions. 1, 3, 4
REBUILD- pending star RBDP* Logical partition of nonpartitioned secondary indexes Run REBUILD INDEX PART or the RECOVER utility on the affected logical partitions. 1, 2, 3, 4
Page set REBUILD- pending PSRBD Nonpartitioned secondary index (NPSI) or index on the auxiliary table Run RECOVER or REBUILD INDEX on the entire affected index. (You cannot run REBUILD INDEX PART to rebuild one logical partition of an NPI in PSRBD.) 1, 2, 3, 4
Start of changeAdvisory REBUILD-pendingEnd of change ARBDP Index

Run REBUILD INDEX. Alternatively, if the ARBDP was set as a result of an ALTER statement, run the REORG INDEX utility.

1, 3
FL 506REBUILD-pending empty RBDPM Logical partition of the NPSI Run one of the following utilities and ensure that the specified partition or space includes the logical partition in RBDPM:
  • REORG INDEX of the entire NPSI
  • REBUILD INDEX or REBUILD INDEX PART (for the logical partition)
  • LOAD REPLACE or LOAD PART REPLACE (This method assumes that replacing the data is acceptable for your situation.)
  • REORG TABLESPACE or REORG TABLESPACE PART
Recommendation: For best availability, use REORG INDEX SHRLEVEL CHANGE to reset RBDPM status.
4
Notes:
  1. Rebuilding an index and thereby resetting the REBUILD-pending status invalidates the dynamic statement cache for the related table.
  2. If you alter the data type of a column to a numeric data type, RECOVER INDEX cannot complete. You must rebuild the index.
  3. Start of changeYou can also reset ARBDP, RBDP, RBDP*, RBDPM, or PSRBD status by running REORG TABLESPACE on the associated table space or LOAD REPLACE on the table space or partition. (The LOAD REPLACE method assumes that replacing the data is acceptable for your situation.)End of change
  4. Start of changeIf you need to remove the RBDP, RBDP*, RBDPM,or PSRBD status only, without correcting the underlying problem that caused the object to be placed in a restrictive state, you can take one of the following actions:
    • Start of changeRun the REPAIR utility SET INDEX or SET INDEXSPACE statement with NORBDPEND (for RBDP, RBDP*, or PSRBD) or NORBDPM (for RBDPM) on the index partition. Use the CHECK INDEX utility to identify inconsistencies between the index and table space and the CHECK DATA utility to check referential integrity constraints.End of change
    • Start the database that contains the index space with ACCESS FORCE.
    Be aware that these actions do not correct the data inconsistency in the index or index partition.
    Attention: Use the START DATABASE command with ACCESS FORCE only as a means of last resort.
    End of change