Tag Archives: DB2 Database table operation error

DB2 Database table operation error SQL0668N Operation not allowed for reason code “1” on table “db”. S…

Error SQL

Operation not allowed for reason code “1” on table “MARKET.PURE_ USER”.. SQLC

//run sql
select * from PURE_USER

There may be one or more rows that violate the
constraint on the data definition. This table cannot be used for operations. If the subordinate table is in the check pending state, the operation on the parent table that is not in the check pending
State may also receive this error

user response: execute the set integrity
statement with the immediate checked option, and ensure that the data meets all the constraints defined on the table or its subordinate tables

//solution:
set integrity for dbname immediate checked

Any operation on the table is not allowed, and sqlstate = 57016, sqlcode = – 668 is prompted. Error of reason code “7”: sql0668n operation not allowed for reason code “7” on table XXX

//run 
CALL SYSPROC.ADMIN_CMD('reorg table dbname')