Table constraint implications for utility operations

If the table being loaded into has referential integrity constraints, the load utility places the table into the set integrity pending state to inform you that the SET INTEGRITY statement is required to be run on the table, in order to verify the referential integrity of the loaded rows. After the load utility has completed, you will need to issue the SET INTEGRITY statement to carry out the referential integrity checking on the loaded rows and to bring the table out of the set integrity pending state.

For example, if the DEPARTMENT and EMPLOYEE tables are the only tables that have been placed in set integrity pending state, you can execute the following statement:
   SET INTEGRITY FOR DEPARTMENT ALLOW WRITE ACCESS, 
      EMPLOYEE ALLOW WRITE ACCESS, 
      IMMEDIATE CHECKED FOR EXCEPTION IN DEPARTMENT, 
      USE DEPARTMENT_EX,         
      IN EMPLOYEE USE EMPLOYEE_EX                                              
The import utility is affected by referential constraints in the following ways:
  • The REPLACE and REPLACE CREATE functions are not allowed if the object table has any dependents other than itself.

    To use these functions, first drop all foreign keys in which the table is a parent. When the import is complete, re-create the foreign keys with the ALTER TABLE statement.

  • The success of importing into a table with self-referencing constraints depends on the order in which the rows are imported.