Scalable Database Server, HiRDB Version 8 Command Reference

[Contents][Index][Back][Next]

13.2.2 Facility for changing check pending status forcibly

Organization of this subsection
(1) Overview of function
(2) Execution unit of the facility for changing check pending status forcibly
(3) Forced setting of check pending status
(4) Forced release of check pending status

(1) Overview of function

The facility for changing check pending status forcibly changes the check pending status; this facility does not check the integrity of referential constraints or check constraints. This facility provides two functions, forced setting of check pending status and forced release of check pending status.

Forced setting of check pending status
This function forces a table into check pending status. You specify -k set to use this function.
Forced setting of check pending status is used in the following cases:
  • The pd_check_pending operand value in the system definition was changed from NOUSE to USE and the integrity of referential constraints or check constraints is not clear.
  • In a system in which the pd_check_pending operand was omitted in the system definition, HiRDB was upgraded to version 07-03 or later and the integrity of referential constraints or check constraints is not clear.
  • Table manipulation by the user must be regulated temporarily.
  • Because a constraint violation was detected during integrity checking, the check pending status was released forcibly, the data resulting in the constraint violation during SQL execution was corrected, and now integrity checking is to be performed again.

Forced release of check pending status
This function forces a table into the non-check pending status (releases the check pending status). You specify -k release to use this function.
Forced release of check pending status is used in the following cases:
  • The check pending status needs to be forcibly released in order to resume operations, such as when there is no need to perform integrity checking because the user has confirmed the integrity of the constraints.
  • A row resulting in a violation of a referential constraint is to be corrected by using SQL statements to update or delete a referencing table's foreign key.
  • A row resulting in a violation of a check constraint is to be corrected using SQL statements.

(2) Execution unit of the facility for changing check pending status forcibly

The facility for changing check pending status forcibly can be executed by table to update all referential constraints and check constraints defined for a table, or by constraint to update only an individual constraint.

When the facility for changing check pending status forcibly is executed, information about the check pending status in data dictionary tables changes. Table 13-15 shows the locations in data dictionary tables where the check pending status changes.

Table 13-15 Locations in data dictionary tables where check pending status changes

Exe unit -c option spec Table constraint Locations in data dictionary table where check pending status changes
Ref const Check const SQL_TABLES table SQL_REFERENTIAL_CONSTRAINS table SQL_CHEKS table
CHECK_PEND column CHECK_PEND2 column CHECK_PEND column CHECK_PEND2 column
By table Not applicable No Yes [Figure] Y [Figure] Y1
Yes No Y [Figure] Y1 [Figure]
Yes Yes Y Y Y1 Y1
By constraint Ref const Yes No Y [Figure] Y2 [Figure]
Yes Yes Y [Figure] Y2 [Figure]
Check constraint No Yes [Figure] Y [Figure] Y2
Yes Yes [Figure] Y [Figure] Y2

Legend:
Exe unit: Execution unit
-c option spec: -c option specification
Ref const: Referential constraint
Check const: Check constraint
Y: Check pending status changes.
[Figure]: Check pending status remains unchanged (the current status is maintained).

1
The check pending status of all referential constraints or check constraints defined for the table is changed.

2
The check pending status of only the constraint specified in the -c option is changed.

Table 13-16 shows the locations of table information in an RDAREA where check pending status changes.

Table 13-16 Locations of table information in an RDAREA where check pending status changes

Execution unit -c option spec Table constraint Locations of table information in an RDAREA where check pending status changes
Referential constraint Check constraint Referential constraint status Check constraint status
By table Not applicable No Yes [Figure] Y
Yes No Y [Figure]
Yes Yes Y Y
By constraint Referential constraint Yes No Y [Figure]
Yes Yes Y [Figure]
Check constraint No Yes [Figure] Y
Yes Yes [Figure] Y

Legend:
-c option spec: -c option specification
Y: Check pending status changes.
[Figure]: Check pending status remains unchanged (the current status is maintained).

(a) By table

When the facility is executed by table, it changes all the defined referential constraints or check constraints. You specify the -t option to execute the facility by table.

You use execution by table in the following case:

(b) By constraint

The facility changes only one referential constraint or check constraint defined for the table. You specify the -c option to execute the facility by constraint.

You use execution by constraint in order to change the check pending status for an individual constraint.

(3) Forced setting of check pending status

This function places a table, constraints, and RDAREAs in check pending status.

(4) Forced release of check pending status

This function releases a table, constraints, and RDAREAs from check pending status. The setting (whether or not the check pending status can be released) depends on the execution unit of pdconstck and the check pending status of the table, constraints, and RDAREAs. The following provides the details for each execution unit.

Forced release of check pending status by table
When pdconstck is executed by table, it unconditionally places the target table, constraints, and RDAREAs in non-check pending status.

Forced release of check pending status by constraint
When pdconstck is executed by constraint, it places the constraint specified in the -c option in non-check pending status. Depending on the check pending status of other constraints, the check pending status of the table or RDAREAs may not change. Table 13-17 shows the changes in the check pending status.

Table 13-17 Changes in the check pending status by constraint (forced release of check pending status)

Condition Check pending status (table and RDAREA)
A constraint that is not specified in the -c option is defined There is a constraint in check pending status No change
All constraints are in non-check pending status Non-check pending status
Only the constraint specified in the -c option is defined for the table Non-check pending status