IBM Support

How to identify what columns are related to a constraint for error SQL3603N

Troubleshooting


Problem

After LOAD, you may receive SQL0668N reason code "1" when issuing queries on a table.

Symptom

For example,

$ db2 "select count(*) from S1.T1"

1
-----------
SQL0668N  Operation not allowed for reason code "1" on table
"S1.T1".  SQLSTATE=57016

SQL0668N  Operation not allowed for reason code "1" on table "S1.T1".

Explanation:

Access to table "<table-name>" is restricted. The cause is based on the
following reason codes "<reason-code>":

1

        The table is in the Set Integrity Pending No Access state. The
        integrity of the table is not enforced and the content of the
        table may be invalid. An operation on a parent table or an
        underlying table that is not in the Set Integrity Pending No
        Access state may also receive this error if a dependent table
        is in the Set Integrity Pending No Access state.

$ db2 set integrity for S1.T1  immediate checked


DB21034E  The command was processed as an SQL statement because it was not a
valid Command Line Processor command.  During SQL processing it returned:
SQL3603N  Integrity processing through the SET INTEGRITY statement has found
an integrity violation involving a constraint, a unique index, a generated
column, or an index over an XML column. The associated object is identified by "S1.T1.SQL131001102018230".  SQLSTATE=23514

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Routines (SP \u0026 UDF) - SQL","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.8;9.7;9.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
30 April 2025

UID

swg21648713