| 導購 | 订阅 | 在线投稿
分享
 
 
 

DB2 sqlstate 57016 原因碼 "7"錯誤詳解

2008-08-08 06:10:04  編輯來源:互聯網  简体版  手機版  移動版  評論  字體: ||

對表進行任何操作都不被允許,提示SQLSTATE=57016 SQLCODE=-668 ,原因碼 "7"的錯誤:SQL0668N Operation not allowed for reason code "7" on table XXX.

首先查一下:

db2 ? 57016

SQLSTATE 57016: 因爲表不活動,所以不能對其進行訪問。

解決方法爲:執行命令:reorg table XXX;即可。

參考原文爲:

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 通過重構行來消除「碎片」數據並壓縮信息,對表進行重組。

runstats on table . 收集表 的統計信息。

reorgchk on table all 確定是否需要對表進行重組,對于對所有表自動執行 runstats 很有用。

>>> reorg 和runstats 都是單個表優化,初始化的命令:

runstats on table administrator.test;

reorg table administrator.test;

對表進行任何操作都不被允許,提示SQLSTATE=57016 SQLCODE=-668 ,原因碼 "7"的錯誤:SQL0668N Operation not allowed for reason code "7" on table XXX. 首先查一下: db2 ? 57016 SQLSTATE 57016: 因爲表不活動,所以不能對其進行訪問。 解決方法爲:執行命令:reorg table XXX;即可。 參考原文爲: 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 通過重構行來消除「碎片」數據並壓縮信息,對表進行重組。 runstats on table . 收集表 的統計信息。 reorgchk on table all 確定是否需要對表進行重組,對于對所有表自動執行 runstats 很有用。 >>> reorg 和runstats 都是單個表優化,初始化的命令: runstats on table administrator.test; reorg table administrator.test;
󰈣󰈤
王朝萬家燈火計劃
期待原創作者加盟
 
 
 
>>返回首頁<<
 
 
 
 
 熱帖排行
 
王朝網路微信公眾號
微信掃碼關註本站公眾號 wangchaonetcn
 
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有