12.20.3 Check pending status

If data integrity can no longer be guaranteed due to execution of a utility or some other operation, HiRDB restricts data manipulation in the check constraint table. The status in which data manipulation is restricted due to loss of guaranteed data integrity is called check pending status. To place a check constraint table in check pending status for the purpose of restricting data manipulation, you must either specify USE in the pd_check_pending operand or do not specify (omit) the operand. You can use the integrity check utility (pdconstck) to clear the check pending status of a table. You can also use the integrity check utility to forcibly place a table into check pending status.

If you have specified NOUSE in the pd_check_pending operand, data manipulation is not restricted even when data integrity between tables cannot be guaranteed. In this case, if you execute an SQL statement or a utility that nullifies the guarantee of data integrity, you can use the integrity check facility to forcibly place the table into check pending status, and then check data integrity.

For details about operations that cause loss of guaranteed data integrity, see 12.20.4 Data manipulation and integrity. For details of how to check data integrity, see 12.20.5 Procedure for checking table integrity.

Organization of this subsection
(1) Managing check pending status
(2) Operations that are restricted for tables in check pending status
(3) When a partitioned table is used
(4) Notes on using check pending status

(1) Managing check pending status

Check pending status is managed based on dictionary tables and on the table information of the RDAREAs in which the tables are stored. In dictionary tables, check pending status is managed for each table and constraint. In table information, check pending status is managed for each RDAREA if the table is a partitioned table and for each table if the table is not a partitioned table.

The following table lists and describes the storage locations of check pending status information.

Table 12-24 Storage locations of check pending status information and their contents (check constraint)

Storage locationStored information
Dictionary tableSQL_TABLES tableCHECK_PEND2 columnCheck pending status of check constraint for each table
SQL_CHECKS tableCHECK_PEND2 columnCheck pending status of check constraint for each constraint
RDAREA table informationFor unpartitioned tableCheck pending status of check constraint or check constraint for each table
For partitioned tableCheck pending status of referential constraint or check constraint for each RDAREA

(2) Operations that are restricted for tables in check pending status

These restrictions are the same as those for the referential constraint. See 12.19.3(3) Operations that are restricted for tables in check pending status.

(3) When a partitioned table is used

These restrictions are the same as those for the referential constraint. See 12.19.3(5) When a partitioned table is used. However, replace the term referencing table with check constraint table.

(4) Notes on using check pending status