DB2 sqlstate 57016 cause code 7 Error details

Source: Internet
Author: User

No Operation is allowed on the table. The error "SQLSTATE = 57016 SQLCODE =-668" is returned. The error 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-name.

Explanation: access to 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 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;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.