偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

DB2數(shù)據(jù)庫的常見錯誤與破解方案

數(shù)據(jù)庫
如果你想更好的了解DB2數(shù)據(jù)庫的常見錯誤以及正確的解決辦法,以下就是對DB2數(shù)據(jù)庫的常見錯誤以及正確的解決辦法具體介紹。

以下的文章主要是闡述DB2數(shù)據(jù)庫的常見錯誤以及正確的解決辦法,如果你DB2數(shù)據(jù)庫的常見錯誤以及正確的解決辦法心存好奇的話,以下的文章將會揭開它的神秘面紗。希望你在瀏覽完之后會有所收獲。

文章分類:數(shù)據(jù)庫

 

1、創(chuàng)建DB2數(shù)據(jù)庫的時候,報42704錯誤。如:

 

Sql代碼

 

 

  1. =>create database test   
  2. =>SQL0204N "SYSTEM_1386_US" is an undefined name. SQLSTATE=42704 
  3. =>create database test 
  4. =>SQL0204N "SYSTEM_1386_US" is an undefined name. SQLSTATE=42704 

解決辦法:Sql代碼

 

 

  1. =>create database test using codeset gbk territory cn 
  2. =>create database test using codeset gbk territory cn  

 

2、在連接數(shù)據(jù)的時候,報57017錯誤。如:

 

Sql代碼

 

 

  1. =>connect to test user test using test   
  2. =>SQL0332N Character conversion from the source code page "1386" to the target code page "819" is not supported. SQLSTATE=57017 
  3. =>connect to test user test using test 
  4. =>SQL0332N Character conversion from the source code page "1386" to the target code page "819" is not supported. SQLSTATE=57017 

解決辦法:

 

Sql代碼

 

 

  1. =>db2set db2codepage=1386 
  2. =>db2set db2codepage=1386 

 

3、在對DB2數(shù)據(jù)庫進行操作的時候,報55039錯誤。如:

 

Sql代碼

 

 

  1. =>db2 drop table t_base_acc_manageacc   
  2. =>SQL0290N Table space access is not allowed. SQLSTATE=55039   
  3. =>db2 list tablespaces show detail   
  4. Tablespace ID = 2   
  5. Name = USERSPACE1   
  6. Type = System managed space   
  7. Contents = Any data   
  8. State = 0x0020   
  9. Detailed explanation:   
  10. Backup pending 
  11. =>db2 drop table t_base_acc_manageacc 
  12. =>SQL0290N Table space access is not allowed. SQLSTATE=55039 
  13. =>db2 list tablespaces show detail  
  14. Tablespace ID = 2 
  15. Name = USERSPACE1 
  16. Type = System managed space  
  17. Contents = Any data  
  18. State = 0x0020 
  19. Detailed explanation: 

 

 

Backup pending 原因:在歸檔的數(shù)據(jù)庫做過load或者改了參數(shù)重新啟動了db

 

解決辦法:

 

Sql代碼

 

備份DB2數(shù)據(jù)庫

 

=>db2 backup db

 

備份數(shù)據(jù)庫

=>db2 backup db

 

4、在對數(shù)據(jù)庫進行備份的時候,報57019錯誤。如:

 

Sql代碼

 

 

  1. =>db2 backup database dbname to /xx/xx compress   
  2. =>SQL1035N The database is currently in use. SQLSTATE=57019 
  3. =>db2 backup database dbname to /xx/xx compress  

 

=>SQL1035N The database is currently in use. SQLSTATE=57019解決辦法:

 

Sql代碼

 

 

  1. =>db2stop force   
  2. =>db2start 
  3. =>db2stop force 
  4. =>db2start 

 

 

5、在對創(chuàng)建表空間的時候,報54047錯誤。如:

 

Sql代碼

 

 

  1. =>create regular tablespace space1 pagesize 4 k managed by database using (device '/dev/dd' 25000000) prefetchsize automatic bufferpool bp1   
  2. =>SQL1139N The total size of the table space is too big. SQLSTATE=54047 
  3. =>create regular tablespace space1 pagesize 4 k managed by database using (device '/dev/dd' 25000000) prefetchsize automatic bufferpool bp1  

 

=>SQL1139N The total size of the table space is too big. SQLSTATE=54047解決辦法:把表空間的大小改小點或者把regular(64G)換成large就ok了。

 

6、DB2數(shù)據(jù)庫備份失敗,報內(nèi)存不足,增大了dbheap也沒有用。SQL2009C,沒有足夠的可用內(nèi)存來運行此實用程序。

 

原因:DB2 UTIL_HEAP_SZ 未設(shè)置得足夠高以用于備份實用程序。

 

解決辦法:db2 update db cfg for dbname using UTIL_HEAP_SZ 具體的數(shù)字(db2備份使用的內(nèi)存是UTIL_HEAP_SZ,請使用以上命令調(diào)整)。

 

7、用JDBC往表批量插入數(shù)據(jù)時。報23502錯誤。如:

 

Sql代碼

 

 

  1. Error for batch element #0: DB2 SQL error: SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2TABLEID=15COLNO=2 

 

Error for batch element #0: DB2 SQL error: SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2, TABLEID=15, COLNO=2 原因:往表中有非空約束的字段,插入空值。

解決辦法:查看表定義,去掉非空約束,或加入非空值。

 

8、用JDBC往表批量插入數(shù)據(jù)時。報22001錯誤。如:

 

Sql代碼

 

 

  1. DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001SQLERRMC=null 
  2. DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001SQLERRMC=null 

原因:表中某字段的長度不夠,發(fā)生字符串截斷。

解決辦法:查看表定義,加大字段長度。

 

9、用JDBC往表批量插入數(shù)據(jù)時。報-4474錯誤。如:

 

Sql代碼

 

非法轉(zhuǎn)換:不能從“java.lang.String”轉(zhuǎn)換到“byte[]” ERRORCODE=-4474, SQLSTATE=null

 

非法轉(zhuǎn)換:不能從“java.lang.String”轉(zhuǎn)換到“byte[]” ERRORCODE=-4474, SQLSTATE=null原因:表中某字段定義為‘ID CHAR(16) FOR BIT DATA NOT NULL’(這個是使用MTK從MS SQL遷移到DB2數(shù)據(jù)庫時,uniqueidentifier轉(zhuǎn)換成的)。

解決辦法:重新創(chuàng)建表,把字段屬性改為VARCHAR類型。

【編輯推薦】

  1. DB2數(shù)據(jù)庫優(yōu)化時哪些策略少不了?
  2. DB2未使用索引的查找方案描述
  3. DB2用戶密碼修改與備份恢復的正確應(yīng)用
  4. DB2數(shù)據(jù)庫開發(fā)與PostgreSQL開發(fā)中的異同點
  5. DB2數(shù)據(jù)庫SQL編碼優(yōu)化與性能描述

 

 

 

責任編輯:佚名 來源: IT實驗室
相關(guān)推薦

2010-08-05 09:59:47

DB2常見錯誤

2010-08-16 17:44:07

DB2數(shù)據(jù)庫錯誤信息

2010-08-04 11:29:59

2010-08-20 11:28:45

DB2 -964問題

2009-07-06 17:34:26

遠程復制DB2

2010-08-16 14:45:15

DB2數(shù)據(jù)庫

2011-03-11 16:02:03

DB2數(shù)據(jù)庫安裝

2010-08-03 14:46:25

2010-08-17 16:24:32

IBM DB2數(shù)據(jù)庫

2010-07-30 13:21:21

2010-11-01 10:27:36

DB2數(shù)據(jù)庫啟動

2010-11-02 10:07:46

DB2數(shù)據(jù)庫備份

2010-09-07 14:44:50

DB2 數(shù)據(jù)庫

2009-01-18 13:21:27

DB2數(shù)據(jù)庫常見問題

2010-11-03 16:32:10

DB2創(chuàng)建數(shù)據(jù)庫

2010-08-03 14:40:05

DB2數(shù)據(jù)庫

2010-08-25 10:50:48

DB2數(shù)據(jù)庫

2010-08-31 17:34:46

DB2

2010-11-01 13:45:16

DB2數(shù)據(jù)庫的優(yōu)勢

2010-08-06 15:21:08

DB2數(shù)據(jù)庫代理
點贊
收藏

51CTO技術(shù)棧公眾號