?SQLxxx查看對應的報錯原因及解決方法。2.錯誤SQL0206NSQLSTATE=42703檢測到一個未定義的列、屬性或參數(shù)名。SQL0206N"SQL_COU_ALL"isnotvalidinthecontextwhereitisused.SQLSTATE=42703db2=>?"42703"db2=>?SQL0206N3.錯誤SQL0668Ncode"7"SQLSTATE=57016表處" />

亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

DB2 sql報錯后查證原因與解決問題的方法

系統(tǒng) 6409 0

1.對于執(zhí)行中的報錯,可以在db2命令行下運行命令 : db2=>? SQLxxx 查看對應的報錯原因及解決方法。

2.錯誤SQL0206N SQLSTATE=42703? 檢測到一個未定義的列、屬性或參數(shù)名。
? 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 對表的修改次數(shù)達到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.
??? 說明:當對表結(jié)構(gòu)進行更改時,也可能導致表狀態(tài)異常。比如,以下操作可能會導致表處于reorg-pending狀態(tài)。
?(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)??????? ……??
?出現(xiàn)reorg pending的根源是當表結(jié)構(gòu)變化后影響了數(shù)據(jù)行中的數(shù)據(jù)格式,這時需要對表做reorg??赡艿腻e誤號是:
?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次結(jié)構(gòu)上的修改。三次更改后必須對表進行重組。
?REORG TABLE "xx"."FM_BORROW" ALLOW NO ACCESS KEEPDICTIONARY;

5.報錯 SQL0670N? SQLSTATE=54010 該表所有字段長度之和大于當前數(shù)據(jù)庫頁大小(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 現(xiàn)有數(shù)據(jù)的精度超過了 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數(shù)據(jù)庫
?db2 list db directory
?db2 list db directory show detail
????? 驗證實例使用的通訊協(xié)議,查看DB2COMM變量
?db2set -all
????? 查看數(shù)據(jù)庫管理器的配置,查看SVCENAME(特指tcpip協(xié)議)
?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工具來檢測一下

?

DB2 sql報錯后查證原因與解決問題的方法


更多文章、技術(shù)交流、商務合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯(lián)系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦?。?!

發(fā)表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 婷婷综合激情网 | 亚洲免费在线视频播放 | 久久综合久久网 | 久久综合综合 | 欧美人与zoxxxx另类9 | 2020国产成人免费视频 | 国产成人啪午夜精品网站 | 日本高清免费不卡在线播放 | 国产a国产 | 久久99久久99精品免观看不卡 | 91香蕉在线 | 午夜国产精品福利在线观看 | 深夜福利影院在线观看 | 精品久久久久久蜜臂a∨ | 四虎国产精品永久在线 | 欧美日韩在线看 | 国产亚洲一欧美一区二区三区 | 日韩一区二区三 | 成人精品亚洲人成在线 | 亚洲视屏在线 | 国内精品久久久久久久亚洲 | 一区二区三区久久 | 国产日本欧美亚洲精品视 | 99视频在线免费看 | 日韩欧美亚洲国产精品字幕久久久 | 97成人精品视频在线播放 | 黄页网址在线免费观看 | 九九久久国产精品大片 | 久久综合草 | 91精品视频免费观看 | 黄色色片| 亚洲韩精品欧美一区二区三区 | 欧美另类久久久精品 | 欧美成人午夜视频免看 | 五月婷婷激情综合 | 日韩中文字幕在线观看视频 | 视频1区 | 一区精品在线 | 中文字幕福利视频 | 激情欧美一区二区三区中文字幕 | 国产成人在线网站 |