DB2常见错误及解决办法

创建数据库的时候,报42704错误。如:
=>create database test
=>SQL0204N  "SYSTEM_1386_US" is an undefined name.  SQLSTATE=42704

解决办法:  
=>create database test using codeset gbk territory cn

在连接数据的时候,报57017错误。如:

 

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

解决办法:

 

=>db2set db2codepage=1386

在对数据库进行操作的时候,报55039错误。如:

   

=>db2 drop table t_base_acc_manageacc
=>SQL0290N  Table space access is not allowed.  SQLSTATE=55039

=>db2 list tablespaces show detail
Tablespace ID                        = 2
Name                                 = USERSPACE1
Type                                 = System managed space
Contents                             = Any data
State                                = 0x0020
Detailed explanation:
   Backup pending 

原因:在归档的数据库做过load或者改了参数重新启动了db

解决办法:

 

备份数据库
=>db2 backup db

在对数据库进行备份的时候,报57019错误。如:

 

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

解决办法:

 

=>db2stop force
=>db2start

在对创建表空间的时候,报54047错误。如:

 

=>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了。

你可能感兴趣的:(db2,Access)