Previous Topic: -248 - accessor-id HAS NO AUTHORITY TO USE "GRANTED BY" FORM OF REVOKENext Topic: -250 - EXCEPTION TABLE authid.tblname NOT FOUND


-249 - REFERENCED TABLE aaa.ttt PLUS n OTHERS IN CHECK STATUS

Explanation

An attempt to access a table in CHECK-RELATED state with a foreign key reference to table aaa.ttt (authid.tblname) has been rejected because the table aaa.ttt is in a check state. There are n additional referenced tables in a check state. Access is denied to the referencing table because foreign key values may have been deleted from the referenced tables in a check state.

The SQLSTATE that equates to this SQL return code is 55S01.

User Response

Use one of the following methods to take the table out of CHECK-RELATED state:

  1. Execute the DBUTLTY CONFIRM,EXCEPT=tblname function.
  2. Query this table to determine the foreign key values.
  3. Insert rows with these values into the referenced table(s).
  4. Execute the DBUTLTY CONFIRM function. If DBUTLTY does
    not find constraint violations, it takes the table out of
    CHECK-RELATED status. To avoid constraint validation,
    specify the FORCE=YES option.

    If the table being confirmed references a table in a check state, the confirm process is aborted because subsequent confirmation of the referenced tables may delete foreign key references. Therefore, confirm a chain of related tables in "top down" sequence.