1      升级过程
1.1升级AIX上的db2
1.运行如下命令确定系统中的实例以及管理实例(root)

      /usr/opt/db2_08_01/instance/db2ilist

      /usr/opt/db2_08_01/instance/daslist

2.根据上面命令的结果,停止每个实例和管理实例:

      su - <instance_name>

      db2 force application all

      db2 terminate

      db2stop

      db2licd -end

      exit

3.停止管理实例

      su - <dasname>

      db2admin stop

4.从内存中卸装未使用的共享库(只对AIX系统有效)

      /usr/sbin/slibclean

5.禁用故障监视器协调程序(root)

      /usr/opt/db2_08_01/bin/db2fmcu -d

      停止故障代理程序:

      /usr/opt/db2_08_01/bin/db2fm -i <instance_name> -D

      对于client类型的实例,还需要停止运行在机器上的Websphere。

      至此,所有db2进程应该都停止了

      运行ps -ef|grep db2命令看看有没有db2进程,有的话想办法停止掉。

      db2fmp进程是存储过程或用户自定义函数运行的进程,直接kill -9 <pid>即可。

      

6.对每一个实例,清除所有DB2进程间通信(IPC):

      su - <instance_name>

      $HOME/sqllib/bin/ipclean

      exit

      

      使用ipcs命令察看有没有db2用户的ipc,如果还存在db2用户的ipc,使用下面的命令清除(root):

      清除消息队列:ipcrm -q <msqid>

      清除共享内存:ipcrm -m <shmid>

      清除信号量: ipcrm -s <semid>

      

7.升级实例位数

      /usr/opt/db2_08_01/instance/db2iupdt -w 64 <instance_name>

 

8.更新系统目录

      su - <instance_name>

      db2updv8 -d <dbname>

9.启动所有实例和管理实例

      su - <instance_name>

      db2start

      exit

      su - <das_name>

      db2admin start

      exit

10.绑定bind文件

      su - <instance_name>

      db2 terminate

      db2 CONNECT TO <dbname>

      db2 BIND $HOME/sqllib/bnd/@db2ubind.lst BLOCKING ALL GRANT PUBLIC ACTION ADD

      db2 BIND $HOME/sqllib/bnd/@db2cli.lst BLOCKING ALL GRANT PUBLIC ACTION ADD

      db2 BIND $HOME/sqllib/bnd/db2schema.bnd BLOCKING ALL GRANT PUBLIC sqlerror continue

      db2 terminate

注:

      如果在绑定的时候出现如下错误:

      SQL0101 The statement is too long or too complex

      是因为stmtheap参数太小,使用如下命令修改:

      db2 update db cfg using stmtheap 20480

      然后再重新运行bind命令。

 

11.绑定其他应用bind文件

      db2rbind <dbname> -all /tmp/rbind.log