1. 创建升级软件所需目录
[root@rac1 ~]# . /home/oracle/.bash_profile
[root@rac1 ~]# echo $GRID_HOME
/oracle/app/11.2.0/grid
[root@rac1 ~]# echo $ORACLE_HOME
/oracle/app/oracle/product/11.2.0/db_1
[root@rac1 ~]# mkdir -p /oracle/app/11.2.0.4/grid
[root@rac1 ~]# cd /oracle/app && chown -R grid:o×××tall ./11.2.0.4
[root@rac1 ~]# mkdir -p /oracle/app/oracle/product/11.2.0.4/db_1
[root@rac1 ~]# cd /oracle/app/oracle/product/ && chown -R oracle:o×××tall ./11.2.0.4
2. 升级grid软件
2.1 执行升级前检测
$ ./runcluvfy.sh stage -pre crs×××t -upgrade -n rac1,rac2 -rolling -src_crshome /oracle/app/11.2.0/grid -dest_crshome /oracle/app/11.2.0.4/grid -dest_version 11.2.0.4.0 -fixup -fixupdir /tmp -verbose
Result: Check for Oracle patch "9413827 or 9706490" in home "/oracle/app/11.2.0/grid" failed
由11.2.0.1升级到11.2.0.4时,需要安装补丁"9413827 or 9706490"
Things to Consider Before Upgrading to 11.2.0.3/11.2.0.4 Grid Infrastructure/ASM (文档 ID 1363369.1)
########################################################################################################################
--停数据库实例
[oracle@rac1 ~]$ srvctl stop home -o $ORACLE_HOME -s /home/oracle/rac1.status -n rac1
[oracle@rac2 ~]$ srvctl stop home -o $ORACLE_HOME -s /home/oracle/rac2.status -n rac2
--解锁集群
[root@rac1 oracle]# . /home/grid/.bash_profile
[root@rac1 oracle]# $ORACLE_HOME/crs/×××tall/rootcrs.pl -unlock
[root@rac1 oracle]# cd $ORACLE_HOME/..
[root@rac1 11.2.0]# chmod 775 ./grid/
--保存DB配置
[oracle@rac1 ~]$ cd ${PATCH_DIR}
[oracle@rac1 software]$ ./custom/server/9413827/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME
--应用GI补丁
[grid@rac1 ~]$ cd ${PATCH_DIR}
[grid@rac1 software]$ opatch napply -local -oh $ORACLE_HOME -id 9413827
--应用DB补丁
[oracle@rac1 ~]$ cd ${PATCH_DIR}
[oracle@rac1 software]$ opatch napply custom/server/ -local -oh $ORACLE_HOME -id 9413827
--配置GI目录
[grid@rac1 software]$ chmod +w $ORACLE_HOME/log/rac1/agent
[grid@rac1 software]$ chmod +w $ORACLE_HOME/log/rac1/agent/crsd
[grid@rac2 software]$ chmod +w $ORACLE_HOME/log/rac2/agent
[grid@rac2 software]$ chmod +w $ORACLE_HOME/log/rac2/agent/crsd
--配置DB目录
[oracle@rac1 ~]$ cd ${PATCH_DIR}
[oracle@rac1 software]$ ./custom/server/9413827/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME
--完成GI补丁配置
[root@rac1 oracle]# . /home/grid/.bash_profile
[root@rac1 oracle]# $ORACLE_HOME/crs/×××tall/rootcrs.pl -patch
--启动数据库
[oracle@rac1 ~]$ srvctl start home -o $ORACLE_HOME -s /home/oracle/rac1.status -n rac1
[oracle@rac2 ~]$ srvctl start home -o $ORACLE_HOME -s /home/oracle/rac2.status -n rac2
########################################################################################################################
2.2 检查集群所有节点处于运行状态
[grid@rac1 ~]$ crsctl stat res -t
2.3 选择升级模式进行安装
2.4 修改ASM实例参数
SQL> alter system set memory_max_target=2g scope=spfile;
SQL> alter system set memory_target=2g scope=spfile;