1.DB2数据库表操作错误SQL0668N Operation not allowed for reason code "1" on table "XXXX". SQLSTATE=57016的解决方法

The table is in Check Pending state. The integrity of the table is not enforced and the content of the table may be invalid.

An operation on a parent table or an underlying table that is not in a check pending state may also receive this error if a dependent table is in a check pending state.

Execute the SET INTEGRITY statement with the IMMEDIATE CHECKED option on table table-name to bring the table out of the Check Pending state.

  www.2cto.com

For a user maintained materialized query table, execute the statement with the IMMEDIATE UNCHECKED option instead of the IMMEDIATE CHECKED option.:

 ERROR [57016] [IBM][DB2/AIX64] SQL0668N  Operation not allowed for reason code "1" on table "XXXX".  SQLSTATE=57016

可能有一行或多行违反了对数据定义的约

束。此表不能用于操作。若从属表处于检查暂挂状态,则对不处于检查暂挂

状态的父表的操作也可能接收到此错误。

用户响应: 执行带有 IMMEDIATE CHECKED 选项的 SET INTEGRITY

语句,并确保数据符合对该表或从属于它的表定义的所有约束。

set integrity for 表名immediate checked
 
2.对表进行任何操作都不被允许,提示SQLSTATE=57016 SQLCODE=-668 ,原因码 "7"的错误:SQL0668N Operation not allowed for reason code "7" on table XXX. 解决方法为:

执行命令:

  1. 执行 CALL SYSPROC.ADMIN_CMD('reorg table XXXXXXX')
  2. XXXXXXX'为表名

参考原文为:
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;

3.Operation not allowed for reason code "3" on table xxx
问题:
select count(*) from schema_name.table_name with ur;
: ERROR [57016] [IBM][DB2/LINUXX8664] SQL0668N  Operation not allowed for reason code "3" on table "schema_name.table_name".  SQLSTATE=57016

我刚才
Reorg table schema_name.table_name;
DB2 Database Error: ERROR [01H52] [IBM][DB2/LINUXX8664] SQL2216N  SQL error "-668" occurred while reorganizing a database table or its indexes.  SQLSTATE=01H52

1.重组表的时候不能进行任何操作

2.可以删除表重建
3.使用 load 命令,重启或者断开load pending状态,load..terminate,load..replace或load..restart解除暂挂状态

db2报错 Operation not allowed for reason的更多相关文章

  1. db2 报错 sqlcode=-420 自动类型转换的问题

    今天在测试遇到一个问题,前台点击页面查询数据时报错: , SQLSTATE, SQLERRMC=DECFLOAT, DRIVER=4.18.60 根据sqlcode查询错误原因为:-420 22018 ...

  2. db2报错: [DB2/NT] SQL0952N 由于中断,处理被取消 SQLSTATE=57014

    DB2被中断,报错:  [DB2/NT] SQL0952N 由于中断,处理被取消 SQLSTATE=57014 在DB2的开发过程中,今日运行了一个执行时间较为长的sql语句.使用DB2服务端的控制台 ...

  3. 使用npm install报错- operation not permitted解决

    原文:https://blog.csdn.net/weixin_41715295/article/details/79508104 这几天使用npm install时一直报错-4048 operati ...

  4. setfacl报错Operation not supported

    对文件目录setfacl权限设置时报错Operation not supported Google一下,发现是分区acl权限问题 一般情况下(ext4),默认acl支持都是加载的.但如果遇到二般情况, ...

  5. db2报错信息

    sqlcode sqlstate 说明000 00000 SQL语句成功完成01xxx SQL语句成功完成,但是有警告+012 01545 未限定的列名被解释为一个有相互关系的引用+098 01568 ...

  6. Namenode启动报错Operation category JOURNAL is not supported in state standby

    org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category JO ...

  7. Mysql5.7创建存储过程中调用自定义函数报错Not allowed to return a result set from a function

    因为很多存储过程都会共用一段sql语句,所以我把共用的sql封装成一个自定义函数 AddCapital(); 然后通过存储过程调用,创建存储过程会报错1415,Not allowed to retur ...

  8. 解决kettle在两个mysql之间迁移数据时乱码的问题 和 相关报错 及参数调整, 速度优化

    1. 乱码问题 编辑目标数据库的链接: 配置编码参数即可. 2. 报错 No operations allowed after statement closed. 需要调整wait_timeout:  ...

  9. 关于本地使用antd的upload组件上传文件,ngnix报错405的问题

    使用阿里的ui框架antd的upload,会自动请求ngnix上面的一个路径,也就是action所在的位置,一直报错405 not allowed,后来经讨论,统一将action写成一个路径,后端对这 ...

随机推荐

  1. Entity Framework介绍

    1.Entity Framework介绍 下图显示EF整体架构.现在我们来看看架构的各个组件: EDM(Entity Data Model): EDM由三个主要部分组成:概念模型,映射和存储模型.映射 ...

  2. Visual Studio 2015 插件开发入门

    (1)安装 Visual Studio 2015 的时候选择 Visual Studio 扩展性工具(Visual Studio Extensibility Tools).对于已经安装好 Visual ...

  3. 安装 jpegtran-cffi 使用 from jpegtran import JPEGImage

    Requirements CPython >=2.6 or >=3.3 or PyPy cffi >= 1.0 libturbojpeg with headers Install 1 ...

  4. php7安装参数编译

    系统:Centos6.8 软件包:php-7.0.14.tar.gz yum install bzip2 bzip2-devel -y yum install curl curl-devel -y y ...

  5. 【Android】LMK 工作机制

    Android分析之LowMemoryKiller Android Kernel 会定时执行一次检查,杀死一些进程,释放掉内存. 那么,如何来判断,那些进程是需要杀死的呢?答案就是我们的标题:Low ...

  6. zabbix通过shell脚本安装异常问题定位

    htxk-106主机信息现象如下: 通过zabbix_get命令 zabbix_get [7189]: Check access restrictions in Zabbix agent config ...

  7. Docker 启动tomcat

    docker run -d --name jinrong_beijingbank -p 8081:8081 -v /application/docker_hub/java/pypaltform2018 ...

  8. HTML5上传图片预览功能

    HTML5上传图片预览功能 HTML代码如下: <!-- date: 2018-04-27 14:41:35 author: 王召波 descride: HTML5上传图片预览功能 --> ...

  9. Python编程基础[条件语句if 循环语句 for,while](二)

    ython条件语句是通过一条或多条语句的执行结果(True或者False)来决定执行的代码块. 可以通过下图来简单了解条件语句的执行过程: if 判断条件: 执行语句……else: 执行语句…… x= ...

  10. tp5数据库链接

    1在config/database.php中配置 1.1直接 return [ // 数据库类型 'type' => 'mysql', // 服务器地址 'hostname' => '12 ...