This article mainly describes the detailed analysis of the DB2 sqlstate 57016 cause code "7" error. The following describes the main content of the DB2 sqlstate 57016 cause code "7" error, I hope you will have a better understanding of it after browsing.
DB2 and DB2 tuning sqlstate, detailed explanation, quot
No operation is allowed on the table. The following error occurs: SQLSTATE = 57016 SQLCODE =-668, cause code "7:
- SQL0668N Operation not allowed for reason code "7" on table XXX.
First, check:
- db2 ? 57016
SQLSTATE 57016: the table cannot be accessed because it is not active.
Solution: Execute the command: reorg table XXX.
Reference Original:
- 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).
Where:
Reorg table [table] uses refactored rows to remove "fragment" data and compress information to reorganize the table.
Runstats on table. Collect the statistical information of the table.
Reorgchk on table all determines whether to reorganize the table. It is useful for automatic runstats execution on all tables.
>>> Reorg and runstats are single table optimization and initialization commands:
- runstats on table administrator.test;
- reorg table administrator.test;
The above content is a detailed description of the DB2 sqlstate 57016 cause code "7" error. I hope you will get something.
The above content is a detailed description of the DB2 sqlstate 57016 cause code "7" error. I hope it will help you in this regard.