DB2中SQLSTATE=57016 SQLCODE=

编程入门 行业动态 更新时间:2024-10-07 06:38:12

DB2中<a href=https://www.elefans.com/category/jswz/34/1723822.html style=SQLSTATE=57016 SQLCODE="/>

DB2中SQLSTATE=57016 SQLCODE=

对表进行任何操作都不被允许,提示SQLSTATE=57016 SQLCODE=-668 ,原因码 "7"的错误:SQL0668N  Operation not allowed for reason code "7" on table XXX. 

解决方法为:执行命令: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   <tablename>   通过重构行来消除“碎片”数据并压缩信息,对表进行重组。
   runstats   on   table   <tbschema>.<tbname>   收集表   <tbname>   的统计信息。
   reorgchk   on   table   all   确定是否需要对表进行重组,对于对所有表自动执行   runstats   很有用。
  >>> reorg   和runstats   都是单个表优化,初始化的命令: 
           runstats on table administrator.test;
           reorg table administrator.test; 

更多推荐

DB2中SQLSTATE=57016 SQLCODE=

本文发布于:2024-02-13 16:46:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1760112.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SQLSTATE   SQLCODE

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!