SQL0668N Operation not allowed for reason code “3” on table
by Frederick Tybalt on Jul.24, 2017, under Error and Issues
Error:
SQLExecute reported: SQLSTATE = 57016: Native Error Code = -668: Msg = [IBM][CLI Driver][DB2/LINUXX8664] SQL0668N Operation not allowed for reason code “3” on table “XXX.XXXX”. SQLSTATE=57016
Resolution:
After doing several research the issue was the table was marked in check pending state due to bad bulk load without terminate in load statement.
Loading a null file to the table with the terminate command will clear the issue.
load from /dev/null of del terminate into XXX.XXXX
Sample :
db2 => LOAD FROM /DEV/NULL OF DEL TERMINATE INTO XXX.XXXX
SQL3110N The utility has completed processing. "0" rows were read from the
input file.
Number of rows read = 0
Number of rows skipped = 0
Number of rows loaded = 0
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 0
Platform :
Datastage 11.5 on Linux &
DB2 10.5 on Linux