问题描述:

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

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. 【AGC030F】Permutation and Minimum(DP)

    题目链接 题解 首先可以想到分组后,去掉两边都填了数的组. 然后就会剩下\((-1,-1)\)和\((-1,x)\)或\((x,-1)\)这两种情况 因为是最小值序列的情况数,我们可以考虑从大到小填数 ...

  2. 【概率论】3-7:多变量分布(Multivariate Distributions Part II)

    title: [概率论]3-7:多变量分布(Multivariate Distributions Part II) categories: Mathematic Probability keyword ...

  3. 初次Java web项目的建立以及与数据库的连接

    题目要求: 1登录账号:要求由6到12位字母.数字.下划线组成,只有字母可以开头:(1分) 2登录密码:要求显示“• ”或“*”表示输入位数,密码要求八位以上字母.数字组成.(1分) 3性别:要求用单 ...

  4. scrapy框架之shell

    scrapy shell scrapy shell是一个交互式shell,您可以在其中快速调试 scrape 代码,而不必运行spider.它本来是用来测试数据提取代码的,但实际上您可以使用它来测试任 ...

  5. mybatis+mysql批量插入和批量更新、存在及更新

    mybatis+mysql批量插入和批量更新 一.批量插入 批量插入数据使用的sql语句是: insert into table (字段一,字段二,字段三) values(xx,xx,xx),(oo, ...

  6. php判断变量类型

    php判断变量类型 一.总结 一句话总结: gettype()函数:gettype(1);返回的是integer is_array():is系列函数 1.PHP empty.isset.isnull的 ...

  7. linux下编辑VI窗口插入与编辑命令

    前言 在嵌入式linux开发中,进行需要修改一下配置文件之类的,必须使用vi,因此,熟悉 vi 的一些基本操作,有助于提高工作效率. 一,模式 vi编辑器有3种模式:命令模式.输入模式.末行模式.掌握 ...

  8. SqlServer2008数据库的备份与还原

    1.先是备份数据 1.1.登录sql server management studio 1.2.选中需要备份数据库,右击鼠标,如下图: 1.3.点击备份之后,如下图; 2.数据还原准备 ps: 在开始 ...

  9. Redis的各项功能解决了哪些问题?(转)

    http://www.cnblogs.com/linianhui/p/what-problem-does-redis-solve.html 先看一下Redis是一个什么东西.官方简介解释到:Redis ...

  10. vim 全局替换

    :%s/foo/bar/g 把全部foo替换为bar,全局替换