问题描述:

查询,操作表都报如下错误

SQL0668N  Operation not allowed for reason code "3" on table "TEST".  SQLSTATE=57016

操作步骤:

第一:执行reorg解锁表,出现以下错误。

[test@TEST-DB1 ~]$ db2 "reorg table test"
SQL0668N Operation not allowed for reason code "" on table "test".
SQLSTATE=

第二:Load空文件对表进行terminate,出现以下错误。

[test@TEST-DB1 ~]$ db2 load from / of del terminate into test

Agent Type Node SQL Code Result
______________________________________________________________________________
LOAD + Success.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD + Success.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
LOAD - Init error. Table unchanged.
______________________________________________________________________________
RESULTS: of LOADs completed successfully.
______________________________________________________________________________ Summary of LOAD Agents:
Number of rows read =
Number of rows skipped =
Number of rows loaded =
Number of rows rejected =
Number of rows deleted =
Number of rows committed = SQL27902N LOAD RESTART/TERMINATE is not allowed on a table that is not in
LOAD PENDING state.

一般上面两步基本能解决表无法操作问题,不过也有的跟这次一样无法完成,

分析可能是部分分区没有进行terminate或者load时被强制杀了

第三:查询分区表状态

[test@TEST-DB1 ~]$ db2 -x "SELECT DBPARTITIONNUM FROM TABLE(SYSPROC.ADMIN_GET_TAB_INFO('TEST','TEST')) AS T where load_status='PENDING' "

挨个对上面查询出的分区号进行terminate处理

[test@TEST-DB1 ~]$db2 load from /dev/null of del terminate into TEST.TEST  partitioned db config OUTPUT_DBPARTNUMS('分区号')

执行完成!

SQL0668N Operation not allowed for reason code "3" on table "TEST". SQLSTATE=57016的更多相关文章

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

    错误sql Operation not allowed for reason code "1" on table "MARKET.PURE_USER".. SQ ...

  2. Operation not allowed for reason code "7" on table 原因码 "7"的解决

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

  3. db2报错 Operation not allowed for reason

    1.DB2数据库表操作错误SQL0668N Operation not allowed for reason code "1" on table "XXXX". ...

  4. Operation not allowed after ResultSet closed--操作mysql数据库

    一个stmt多个rs进行操作.那么从stmt得到的rs1,必须马上操作此rs1后,才能去得到另外的rs2,再对rs2操作.不能互相交替使用,会引起rs已经关闭错误——Operation not all ...

  5. SQLExecption:Operation not allowed after ResultSet closed解决办法

    原网址:http://blog.csdn.net/sku0923/article/details/1722370 一个stmt多个rs进行操作引起的ResultSet已经关闭错误 一个stmt多个rs ...

  6. 解决数据库Operation not allowed when innodb_forced_recovery > 0

    解决数据库Operation not allowed when innodb_forced_recovery > 0 请修改my.cnf innodb_force_recovery = 1 修改 ...

  7. Operation not allowed on a unidirectional dataset错误?

    关于网友提出的“ Operation not allowed on a unidirectional dataset错误?”问题疑问,本网通过在网上对“ Operation not allowed o ...

  8. dbexpress连接mysql提示Operation not allowed on a unidirectional dataset

    最近刚接触delphi,在了解到dbExpress连接mysql的时候,出现了一些问题,特记录下 我遇到的问题有两个 1. TDBGrid --DataSet=TDataSource1 TDataSo ...

  9. remote: GitLab: You are not allowed to push code to protected branches on this project.

    "C:\Program Files\Git\bin\git.exe" push --recurse-submodules=check --progress "origin ...

随机推荐

  1. qt 布局管理按钮控件间有空隙?

    定义了几个按钮控件,想要按钮间没有空隙,我使用setspaces(0)来设置它们之间的间隔. 结果控件间还是有空隙,如图 我对控件所在的widget的背景进行设置,(会把style传到子控件)发现结果 ...

  2. 微信小程序之简单记账本开发记录(三)

    昨天已经编辑了主界面,在wxml文件中设置好跳转链接之后,就可以进行下一步的开发了 在pages中建立一个新的页面文件夹作为之后的支出页面 编辑后台,今天先搭建大致界面

  3. Jmeter随机参数各种搭配

    参数配置应该有三种场景,具体其他的我还没想到 一.两个固定值之间随机生成一个值,应用场景没有限制 1.最简单的两个值之间随机产生一个整数作为值,打开函数助手 2.选择函数 __Random 然后我想要 ...

  4. Wondershare Video Converter Ultimate 注册码 License

    这个软件可以直接将DVD iso转换成mp4播放,可以破解,还不错,特地记录 官网下载最新版: https://videoconverter.wondershare.com/gl/video-conv ...

  5. flask 设置配置文件的方式

    from flask import Flask from flask import current_app """ 配置参数设置与读取 """ ...

  6. Linux设备驱动程序 之 延迟执行

    长延迟 有些驱动程序需要延迟比较长的时间,即长于一个时钟滴答: 忙等待 如果想把执行延迟若干个时钟滴答,或者对延迟的精度要求不高,最简单的实现方法就是一个监视jiffies计数器的循环:这种忙等待的实 ...

  7. OpenResty之 lua_shared_dict 指令

    1. lua_shared_dict 指令介绍 原文: lua_shared_dict syntax:lua_shared_dict <name> <size> default ...

  8. legend3---13、vue是真的好用

    legend3---13.vue是真的好用 一.总结 一句话总结: 下次前端所有的交互页面都可以用vue 1.chrome查看post请求携带的参数? 请求的Headers里面的Form Data里面 ...

  9. Understanding the ASP.NET MVC Execution Process

    https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/overview/understanding-the-asp ...

  10. flutter中的异步机制 Future

    饿补一下Flutter中Http请求的异步操作. Dart是一个单线程语言,可以理解成物理线路中的串联,当其遇到有延迟的运算(比如IO操作.延时执行)时,线程中按顺序执行的运算就会阻塞,用户就会感觉到 ...