官方参考地址:
http://www-01.ibm.com/support/knowledgecenter/#!/SSEPGG_10.1.0/com.ibm.db2.luw.qb.upgrade.doc/doc/c0007192.html
废话少说,直接说步骤:
1、升级前环境检查和前置任务
-
1> 操作系统支持检查
http://www-01.ibm.com/support/knowledgecenter/api/content/nl/zh-cn/SSEPGG_10.1.0/com.ibm.db2.luw.qb.server.doc/doc/r0025127.html
db2 list db directory
db2 list application all
db2 force application all
db2 backup database testdb
db2 get db cfg for testdb
db2 get dbm cfg
db2 connect to testdb
db2 list tablespaces
db2 list tablespace containers for 0 show detail (SYSCATSPACE及tmp)
db2 update db cfg for testdb using LOGPRIMARY 26
db2 update db cfg for testdb using LOGSECOND 8
db2 list indoubt transactions
db2 terminate
cd server/db2/linuxamd64/bin
./db2prereqcheck -p -v 10.1.0.0
cd /server/db2/linuxamd64/utilities/db2ckupgrade/bin
./db2ckupgrade sample -l db2ckupgrade.log -u db2inst1 -p passwor
su - root
cd /home/ibm/db2/V10.1/instance
./db2iupgrade -u db2fenc1 db2inst1
su - root
cd $DB2DIR/instance/
./dasmigr
cd /home/db2inst1/sqllib/db2dump
mv db2diag.log db2diag.bak
..
su - db2inst1
db2 CATALOG DB testdb as testdb10
su - db2inst1
db2 UPGRADE DATABASE testdb10 user db2inst1 using 123456
su - db2inst1
db2 reorgchk update statistics on table system
db2 connect to testdb
db2 "CALL SYSPROC.ADMIN_REVALIDATE_DB_OBJECTS(NULL, NULL, NULL)"
db2rbind database-name -l logfile all
db2 connect to testdb
db2 "SELECT TABNAME FROM SYSCAT.TABLES WHERE TABNAME LIKE '%EXPLAIN%'"
db2exmig -d testdb -e pub