db2 执行报错收集

1.对于执行中的报错,可以在db2命令行下运行命令 : db2=>? SQLxxx 查看对应的报错原因及解决方法。

2.错误SQL0206N SQLSTATE=42703  检测到一个未定义的列、属性或参数名。
  SQL0206N  "SQL_COU_ALL" is not valid in the context where it is used.  SQLSTATE=42703
      db2 => ? "42703"    
      db2 => ? SQL0206N
   
3.错误SQL0668N code "7" SQLSTATE=57016   表处于pending state,需要重组该表。
  SQL0668N  Operation not allowed for reason code "7" on table "xxx.Z_BP_TMPBATCH_TB_HIS".  SQLSTATE=57016
     db2 => ? SQL0668N code 7  
     SQL0668N  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.
     User response:用户响应  
       7   Reorganize the table using the REORG TABLE command.
    For a table in the reorg pending state, note that the following clauses are not allowed when reorganizing the table:
    *  The INPLACE REORG TABLE clause
    *  The ON DATA PARTITION clause for a partitioned table when table has nonpartitioned indexes defined on the table

4.错误SQL20054N code="23" SQLSTATE=55019 对表的修改次数达到3次,必须重组表
  ALTER TABLE xxx.FM_BORRO ALTER COLUMN DOCUMENT_TYPE_1 SET NOT NULL
  报错:SQL20054N  The table "xxx.FM_BORROW" is in an invalid state for the operation. Reason code="23".  SQLSTATE=55019
  db2 => ? SQL20054N
    SQL20054N  The table "<table-name>" is in an invalid state for the operation. Reason code="<reason-code>".
  Explanation:
    The table is in a state that does not allow the operation. The "<reason-code>" indicates the state of the table that prevents the operation.
    23   The maximum number of REORG-recommended alters have been
         performed. Up to three REORG-recommended operations are allowed
         on a table before a reorg must be performed, to update the
         tables rows to match the current schema.
  User response:
    23        Reorg the table using the reorg table command.
    说明:当对表结构进行更改时,也可能导致表状态异常。比如,以下操作可能会导致表处于reorg-pending状态。
 (1)        alter table <tablename> alter <colname> set data type <new data type>
 (2)        alter table <tablename> alter <colname> set not null
 (3)        alter table <tablename> drop column <colname>
 (4)        ……   
 出现reorg pending的根源是当表结构变化后影响了数据行中的数据格式,这时需要对表做reorg。可能的错误号是:
 01.SQL0668N  Operation not allowed for reason code "7" on table "SDD.ST_INCRE008".  SQLSTATE=57016
 03.SQL20054N  The table "<table-name>" is in an invalid state for the operation. Reason code="7".
 复制代码每一个表在不进行重组(Reorg)的前提下,只允许进行3次结构上的修改。三次更改后必须对表进行重组。
 REORG TABLE "xx"."FM_BORROW" ALLOW NO ACCESS KEEPDICTIONARY;

5.报错 SQL0670N  SQLSTATE=54010 该表所有字段长度之和大于当前数据库页大小(8K)
  ALTER TABLE xxx.FAQ ALTER COLUMN FAQ_UNIT_NAME SET DATA TYPE VARCHAR(800)
  报错 SQL0670N  The row length of the table exceeded a limit of "8101" bytes. (Table space "SHJD_DATA".)  SQLSTATE=54010
  db2 => ? SQL0670N
    SQL0670N  The row length of the table exceeded a limit of "<length>" bytes. (Table space "<tablespace-name>".)
  Explanation:
    The row length of a table in the database manager cannot exceed:
 *  4005 bytes in a table space with a 4K page size
 *  8101 bytes in a table space with an 8K page size
 *  16293 bytes in a table space with an 16K page size
 *  32677 bytes in a table space with an 32K page size
    The length is calculated by adding the internal lengths of the columns.Details of internal column lengths can be found under CREATE TABLE in the SQL Reference.
  User response:
    指定页大小更大的表空间;消除表中的一列或多列

6.报错 SQL0190N  SQLSTATE=42837 不能改变该列,因为它的属性与当前的列属性不兼容
  ALTER TABLE xxx.BP_TMPDATA_1_TB_1903 ALTER COLUMN RATE SET DATA TYPE DECIMAL(6,4) 
  报错 SQL0190N  ALTER TABLE "BP_TMPDATA_1_TB_1903" specified attributes for column "RATE" that are not compatible with the existing column.  SQLSTATE=42837
  说明: BP_TMPDATA_1_TB_1903 现有数据的精度超过了 DECIMAL(6,4)  ,比如100.00

7.报错 SQL30081N SQLSTATE=08001   检测到通信错误  无法与应用程序服务器或其他服务器建立连接
  SQL30081N  A communication error has been detected. 
    Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS".  
    Location where the error was detected: "10.0.0.200".  Communication function detecting the error: "selectForConnectTimeout".  
    Protocol specific error code(s): "0", "*", "*".  SQLSTATE=08001
    检查服务器的配置情况如下:
      验证存在的DB2数据库
 db2 list db directory
 db2 list db directory show detail
      验证实例使用的通讯协议,查看DB2COMM变量
 db2set -all
      查看数据库管理器的配置,查看SVCENAME(特指tcpip协议)
 db2 get dbm cfg
      查看/etc/services中,有无与上面对应SVCENAME的端口,例如:
 db2cDB2 50000/tcp
      验证远程服务器实例配置
        db2 list node directory
        db2 list node directory show detail
      ping hostname来验证通讯
      使用telnet hostname port来验证是否能连到实例
      用DB2提供的PCT工具来检测一下

时间: 2024-08-06 05:49:19

db2 执行报错收集的相关文章

sql执行报错--This version of MySQL doesn&#39;t yet support &#39;LIMIT &amp; IN/ALL/ANY/SOME subquery&#39;

问题: 不支持使用 LIMIT 子句的 IN/ALL/ANY/SOME 子查询,即是支持非 IN/ALL/ANY/SOME 子查询的 LIMIT 子查询. 解决: 将语句:select * from table where id in (select id from table limit 0,10) 变更为:select * from table where id in (select t.id from (select * from table limit 0,10)as t) sql执行报

Ubuntu下sh *.sh使用==操作符执行报错

----<鸟哥的Linux私房菜--基础篇>学习笔记 ubuntu默认的sh是连接到dash,而我们写shell脚本时使用的时bash.bash和dash在一些方面是不兼容的.因此执行同一个脚本,两者结果不一样,可能用./*sh可以执行,而sh *.sh报错. 为了正确实行使用./*.h 或者  bash *.sh  或者把==换成=(不兼容部分) 也可以直接让系统不使用dash....Ubuntu之所以使用dash是因为其体积小,兼容性高,但是悲催的时,一些bash可执行的脚步在dash下不

salt执行报错一例

执行报错: 查看服务端日志: 认证有问题 重新认证吧!!! minion端: [[email protected] ~]# cd /etc/salt/[[email protected] salt]# lsminion minion.d minion_id pki[[email protected] salt]# rm -rf pki/ [[email protected] salt]# /etc/init.d/salt-minion restart master端: [[email prote

oracle创建包后执行报错:object omgmig.test_package is invalid.

今天学习了一下oracle的包的写法,然后碰到这么个问题.包声明和包主体都正确,但是就是执行报错:object omgmig.test_package is invalid. 这是会报错的sql,看起来都正常对吧..但是就是会报错 --包声明 create package omgmig.test_package as procedure show1; end omgmig.test_package; --包体 create package body omgmig.test_package as

yum 安装服务出现报错收集

yum 安装出现报错收集 问题: [[email protected] ~]$ sudo yum install etckeeper [sudo] password for me: Loaded plugins: refresh-packagekit, security Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package etckeeper.noarch 0:1

报错-收集

No architectures to compile for(ONLY_ACTIVE_ARCH=YES 这种错误    修改building settings下 Build Active Architecture only 为NO即可. dyld: Symbol not found: _objc_setProperty_nonatomic _objc_setProperty_nonatomic是ios6.0的新方法,三方库设置了Deployment Target 为6.0就会调用这2个新增的方

Java代码报错[收集整理]

1. com.ibatis.common.jdbc.exception.NestedSQLException: com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in com/visec/fileIssue/domain/fileIssue.xml. --- The error occurred while applying a parameter map. --- Check the file

python执行报错 configparser.NoSectionError: No section: &#39;section_1&#39;

场景:请求获取验证码模块regVC.py读取配置文件config.ini时,regVC.py模块单独执行正常,但通过run_all.py模块批量执行时报错,找不到section 解决办法:配置文件路径需写绝对路径 config.ini文件如下: regVC.py模块代码如下: 1 import requests 2 import configparser 3 import unittest 4 from Case.readexcel import ExcelData 5 import json

intellj下打的jar包在linux服务器删执行报错

intellj下打的jar包在linux服务器删执行报错:http://blog.csdn.net/qq_25925973/article/details/53370501window下用解压工具打开jar包,删除META-INFO下的.SF .RSA文件,删除后上次到linux服务器上,用java jar xx.jar去执行 原文地址:http://blog.51cto.com/5731674/2087591