Chinaunix首页 | 论坛 | 博客
  • 博客访问: 218718
  • 博文数量: 119
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 1261
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-23 17:50
文章分类

全部博文(119)

文章存档

2016年(8)

2015年(78)

2014年(33)

我的朋友

分类: DB2/Informix

2014-09-14 12:49:50

问题描述  :
db2level : DB2 v9.7.0.9
OS : aix 7.1
目的是要测试 cross-platform migration ( from AIX to Linux), 然后在使用 db2move export 导出全库表时,
虽没有报错,但是出现很多警告(EXPORT.out) 。 全库大约 700 多张表 ,表数据似乎都是成功导出了,但在db2move.lst文件上却只有几条记录。


db2inst1@hostname:/home/db2inst1# db2 "select count(*) from syscat.tables"

1          
-----------
        789

  1 record(s) selected.

db2inst1@hostname:/home/db2inst1#

### 导出全库的表
nohup db2move dbname export &

db2inst1@hostname:/db/db2inst1/db2backup/migration# cat db2move.lst  ###该文件显示只成功导出这几张表
!"REQ     "."ACCESS_REQ_XML_CLOB"!tab3.ixf!tab3.msg!
!"SYSTOOLS"."AM_BASE_TASK_RPTS"!tab23.ixf!tab23.msg!
!"WBULLOCK"."ASSIGN_ID"!tab36.ixf!tab36.msg!
!"FIW     "."DDD"!tab45.ixf!tab45.msg!
!"APPLWEB "."FIELD_FORMAT"!tab223.ixf!tab223.msg!
!"PROV    "."REQ_EMAIL_TRANSACTIONS_XML_CLOB"!tab281.ixf!tab281.msg!
!"SYSTOOLS"."STMG_DBSIZE_INFO"!tab308.ixf!tab308.msg!
!"REQ     "."UPDATE_ACCESS_REQ_XML_CLOB"!tab343.ixf!tab343.msg!
!"WBULLOCK"."VERSION"!tab354.ixf!tab354.msg!
db2inst1@hostname:/db/db2inst1/db2backup/migration#




### 原来db2move export 出现错误/警告的时候,都不会写入db2move.lst文件
### 报的警告错误基本都是如下内容
***  Table "APPLWEB "."ACC_REQ_EXT_FLD_VALS":  ERROR 3107.  Check message file tab1.msg!
***  SQL Warning!  SQLCODE is  3107
***  SQL3107W  There is at least one warning message in the message file.

### 最终发现是 DB2CODEPAGE 的问题
db2inst1@hostname:/db/db2inst1/db2backup# db2 get db cfg |grep code
 Database code page                                      = 819
 Database code set                                       = ISO8859-1
 Database country/region code                            = 1
db2inst1@hostname:/db/db2inst1/db2backup# db2set
DB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ON
DB2_DISABLE_FLUSH_LOG=ON
DB2BIDI=YES
DB2COMM=tcpip
DB2CODEPAGE=1208
DB2_PARALLEL_IO=*
DB2AUTOSTART=YES
db2inst1@hostname:/db/db2inst1/db2backup#


### db2move export 操作之前,设置下DB2CODEPAGE 变量即可
db2set DB2CODEPAGE=819  ### aix 下不需要重启实例,不知到其他平台下是否一样


阅读(13668) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~