詳解DB2 sqlstate 57016 原因碼 "7"錯(cuò)誤
此文章主要向大家講述的是DB2 sqlstate 57016 原因碼 "7"錯(cuò)誤的詳細(xì)解析,以下就是對(duì)DB2 sqlstate 57016 原因碼 "7"錯(cuò)誤的主要內(nèi)容的詳細(xì)描述,望大家在瀏覽之后會(huì)對(duì)其有更深的了解。
DB2, DB2調(diào)優(yōu)sqlstate, 詳解, quot
對(duì)表進(jìn)行任何操作都不被允許,提示SQLSTATE=57016 SQLCODE=-668 ,原因碼 "7"的錯(cuò)誤:
- SQL0668N Operation not allowed for reason code "7" on table XXX.
首先查一下:
- db2 ? 57016
SQLSTATE 57016: 因?yàn)楸聿换顒?dòng),所以不能對(duì)其進(jìn)行訪問(wèn)。
解決方法為:執(zhí)行命令: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 [table]通過(guò)重構(gòu)行來(lái)消除“碎片”數(shù)據(jù)并壓縮信息,對(duì)表進(jìn)行重組。
runstats on table . 收集表 的統(tǒng)計(jì)信息。
reorgchk on table all 確定是否需要對(duì)表進(jìn)行重組,對(duì)于對(duì)所有表自動(dòng)執(zhí)行 runstats 很有用。
>>> reorg 和runstats 都是單個(gè)表優(yōu)化,初始化的命令:
- runstats on table administrator.test;
- reorg table administrator.test;
以上的相關(guān)內(nèi)容就是對(duì)DB2 sqlstate 57016 原因碼 "7"錯(cuò)誤詳解的介紹,望你能有所收獲。
上述的相關(guān)內(nèi)容就是對(duì)DB2 sqlstate 57016 原因碼 "7"錯(cuò)誤詳解的描述,希望會(huì)給你帶來(lái)一些幫助在此方面。
【編輯推薦】
- DB2備份歷史文件損壞不用怕!
- 使DB2數(shù)據(jù)庫(kù)備份和恢復(fù)的效率大大增加的秘訣
- DB2重定向恢復(fù)失敗“水到渠成”
- 對(duì)DB2還原經(jīng)常遇到的問(wèn)題描述
- DB2 Online備份的操作方案“盛宴”