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. (原创)C# 压缩解压那些事儿

    吐槽: 搜狗推广API的报告服务太坑爹了!!! 搜狗推广API的报告服务太坑爹了!!! 搜狗推广API的报告服务太坑爹了!!! 搜狗的太垃圾了,获取下来的压缩包使用正常方式无法解压!!没有专门的API ...

  2. Typescript知识梳理

    概述 TypeScript简称TS,具有类型系统,且是JavaScript的超集. 它可以编译成普通的JavaScript代码.TypeScript支持任意浏览器,任意环境,任意系统并且是开源的.通过 ...

  3. du -h排序

    du -sh * du -s /tmp/*|sort -nr|head -3

  4. Codeforces 781C Underground Lab 构造

    原文链接https://www.cnblogs.com/zhouzhendong/p/CF781C.html 题目传送门 - CF781C 题意 给定一个 n 个点 m 条边的无向连通图,请你用 k ...

  5. 51Nod1634 刚体图 动态规划 容斥原理 排列组合

    原文链接https://www.cnblogs.com/zhouzhendong/p/51Nod1634.html 题目传送门 - 51Nod1634 题意 基准时间限制:1 秒 空间限制:13107 ...

  6. Orleans2.0正式版发布

    2.0版本支持.net core. Orleans是一个微软研究创建的用于大规模分布式计算的框架,使用者不需要学习和应用复杂的并发或其他缩放模式. 根据我几个项目的使用经验来说,Orleans虽然有应 ...

  7. Substrings kmp

    Problem Description You are given a number of case-sensitive strings of alphabetic characters, find ...

  8. 设计模式之单例模式及应用demo

    单例模式是创建型模式之一. 单例模式顾名思义是单例的,也就是只有一个实例化对象,这都来源于它的私有化构造函数. 单例模式特点: 1.单例类只能有一个实例. 2.单例类必须自己创建自己的唯一实例. 3. ...

  9. day29 网络编程

    网络通信原理: http://www.cnblogs.com/linhaifeng/articles/5937962.html 一.操作系统基础 二.网络通信原理 2.1 互联网的本质就是一系列的网络 ...

  10. 无法启动 Maya 集成的 qt designer 的解决方法和原因 以及 中英文切换

    无法启动 Maya 集成的 qt designer 的解决方法和原因 以及 中英文切换 前言: Maya 集成了 PySide,同时集成了qt designer,在 Maya 的安装目录下的 bin ...