DB2數據庫表操作錯誤SQL0668N Operation not allowed for reason code "1" on table "XXXX". SQLSTATE=57016的解決方法
The table is in Check Pending 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 a check pending state may also receive this error if a dependent table is in a check pending state.
Execute the SET INTEGRITY statement with the IMMEDIATE CHECKED option on table table-name to bring the table out of the Check Pending state.
www.2cto.com
For a user maintained materialized query table, execute the statement with the IMMEDIATE UNCHECKED option instead of the IMMEDIATE CHECKED option.:
ERROR [57016] [IBM][DB2/AIX64] SQL0668N Operation not allowed for reason code "1" on table "XXXX". SQLSTATE=57016
可能有一行或多行違反了對數據定義的約
束。此表不能用於操作。若從屬表處於檢查暫掛狀態,則對不處於檢查暫掛
狀態的父表的操作也可能接收到此錯誤。
用戶響應: 執行帶有 IMMEDIATE CHECKED 選項的 SET INTEGRITY
語句,並確保數據符合對該表或從屬於它的表定義的所有約束。
set integrity for 表名immediate checked