DB2 sqlstate 57016 reason code "7" Detailed error
Any operation on the table are not allowed, suggesting SQLSTATE = 57016 SQLCODE =- 668, reason code "7" error: SQL0668N Operation not allowed for reason code "7" on table XXX.
SQLSTATE 57016: table is not active because it can not be accessed.
Solution is: Execute the command: reorg table XXX; can.
Reference to read:
Operation not allowed for reason code reason-code on table table-name.
Explanation: access to table table-name is restricted. The cause is based on the following reason codes reason-code: 7
The table is in the reorg pending state. This can occur after an ALTER TABLE statement containing a REORG-recommended operation.7
Reorganize the table using the REORG TABLE command (note that INPLACE REORG TABLE is not allowed for a table that is in the reorg pending state).
reorg table through the reconstruction of the line to eliminate the "fragmentation" of data and compression information, the table reorganization.
runstats on table. collection of table statistics.
reorgchk on table all to determine the need to restructure the table for all tables automatically runstats useful.
>>> Reorg runstats are single table and optimize initialization commands:
runstats on table administrator.test;
reorg table administrator.test;
Data reference: http://www.knowsky.com/400313.html