查看完整版本: 使用 db2move 可能遇到的一些问题总结

侧面 2008-8-18 13:54

使用 db2move 可能遇到的一些问题总结

使用 db2move 可能遇到的一些问题总结

实际的使用过程中遇到过几次问题,现在做一下总结,以后大家遇到也有解决办法了。


1、load 的时候可能会由于 log 满的问题,造成记录数过大的时候无法导入,这时这张表的访问可能如下:

D:Work>db2 select * from sales
SQL0668N Operation not allowed for reason [url=http://whatis.ctocio.com.cn/searchwhatis/275/5947275.shtml]code[/url] "3" on [url=http://whatis.ctocio.com.cn/searchwhatis/456/6028456.shtml]table[/url] "YASIR.SALES".
SQLSTATE=57016

可使用类似
下面的命令把日志文件的大小和日志文件的数量扩充,如下:
db2 update db cfg for DATABASE using LOGFILSIZ 7900
db2 update db cfg for DATABASE using LOGPRIMARY 30
db2 update db cfg for DATABASE using LOGSECOND 20

然后再用类似
[url=http://whatis.ctocio.com.cn/searchwhatis/144/5947644.shtml]DB2[/url] "LOAD FROM EXPORTED_DATA.IXF OF IXF SAVECOUNT 20000 RESTART INTO YASIR.SALES"
重新导入该表


2、如果 db2move dbname load 需要执行第二次的时候,可以使用 db2move dbname load -lo REPLACE 来replace 上次导入的记录,否则有些没有主键的表可能会出现重复记录


3、如果在导出的时候出现类似下面的提示
SQL3132W The [url=http://whatis.ctocio.com.cn/searchwhatis/151/5947151.shtml]character[/url] data in column "PRIORITY" will be truncated to size "64".
是因为 codepage 的问题,通过 db2set 设置 db2codepage 和[url=http://database.ctocio.com.cn/]数据库[/url]一致,然后重启 [url=http://whatis.ctocio.com.cn/searchwhatis/60/6025560.shtml]instance[/url] 就可以了导出了
页: [1]
查看完整版本: 使用 db2move 可能遇到的一些问题总结