https://blog.csdn.net/fly43108622/article/details/49868859
Oracle_RAC数据库GI的PSU升级(11.2.0.4.0到11.2.0.4.8)
微信公众号:云库管 www.yunDBA.com
北京云库管科技有限公司 (内部培训资料)
返回上级
本次演示为升级oracle rac数据库,用GI的psu升级,从11.2.0.4.0升级到11.2.0.4.8。
演示环境:
两个节点:rac1、rac2
GI的PSU升级包(11.2.0.4.8):p21352635_112040_Linux-x86-64.zip
解压缩后的目录:/setup/oracleUp/21523375
grid 的$GRID_HOME:/u01/app/11.2.0/grid
oracle 的$ORACLE_HOME:/u01/app/oracle/product/11.2.0/db_1
一:升级OPatch
二:生成ocm文件
三:给GRID_HOME安装补丁
四:给DB HOME安装补丁集
五:更新dba_registry_history视图信息
六:检查GI及oracle版本
下载最新的opatch程序并替换GI_HOME和ORACLE_HOME下的OPatch目录
注意:rac1和rac2两个节点的grid和oracle都要升级OPatch版本
到OPatch目录下:
1.
[oracle@rac1 db_1] $ pwd
2.
3.
/u01/app/oracle/product/11.2.0/db_1
备份之前的OPatch目录:
[oracle@rac1 db_1] $ mv OPatch/
OPatch_20151116/
解压缩下载的最新的OPatch版本:
[oracle@rac1 db_1]$ unzip p6880880_112000_Linux-x86-64.zip
查看opatch版本,已升级到最新的11.2.0.3.12版本
1.
[oracle@rac1 db_1] $ cd OPatch/
2.
3.
[oracle@rac1 OPatch] $ ./opatch version
4.
OPatch Version: 11.2.0.3.12OPatch succeeded.
在rac1和rac2分别生成ocm.rsp文件。
1.
[oracle@rac1 psu]$ pwd
2.
/u01/app/oracle/psu
3.
4.
[oracle@rac1 psu]$
/u01/app/oracle/product/11.2.0/db_1/OPatch/ocm/bin/emocmrsp
5.
6.
[oracle@rac1 psu]$ ls
7.
ocm.rsp
root用户执行
1.
[root@rac1 ~]# /u01/app/11.2.0/grid/OPatch/opatch auto /setup/oracleUp/21523375 -oh /u01/app/11.2.0/grid/ -ocmrf
/u01/app/oracle/psu/ocm.rsp
2.
3.
4.
5.
Executing /u01/app/11.2.0/grid/perl/bin/perl/u01/app/11.2.0/grid/OPatch/crs/patch11203.pl
-patchdir /setup/oracleUp
-patchn21523375 -oh /u01/app/11.2.0/grid/ -ocmrf /u01/app/oracle/psu/ocm.rsp-paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
6.
7.
This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2015-11-16_15-39-09.log
8.
9.
This file will show your
detected configuration and all the stepsthat
opatchauto attempted to do on your system:
10./u01/app/11.2.0/grid/cfgtoollogs/opatchauto2015-11-16_15-39-09.report.log
11.
12.2015-11-16 15:39:09: Starting Clusterware Patch Setup
13.Using configuration
parameter file:/u01/app/11.2.0/grid/crs/install/crsconfig_params
14.
15.Stopping CRS...
16.Stopped CRS
successfully
17.
18.patch /setup/oracleUp/21523375/21352635 apply successful for home /u01/app/11.2.0/grid
19.patch /setup/oracleUp/21523375/21352649 apply successful for home /u01/app/11.2.0/grid
20.patch /setup/oracleUp/21523375/21352642 apply successful for home /u01/app/11.2.0/grid
21.
22.Starting CRS...
23.Installing Trace File Analyzer
24.CRS-4123: Oracle High
Availability Services has been started.
25.
26.opatch auto succeeded.
root用户执行
[root@rac2 ~]# /u01/app/11.2.0/grid/OPatch/opatch auto /setup/oracleUp/21523375 -oh /u01/app/11.2.0/grid/ -ocmrf /u01/app/oracle/psu/ocm.rsp
root用户执行
1.
[root@rac1 ~]#/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch auto /setup/oracleUp/21523375 -oh
/u01/app/oracle/product/11.2.0/db_1 -ocmrf
/u01/app/oracle/psu/ocm.rsp
2.
3.
4.
Executing /u01/app/11.2.0/grid/perl/bin/perl/u01/app/oracle/product/11.2.0/db_1/OPatch/crs/patch11203.pl
-patchdir/setup/oracleUp -patchn 21523375 -oh /u01/app/oracle/product/11.2.0/db_1 -ocmrf/u01/app/oracle/psu/ocm.rsp -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
5.
6.
This is the main log
file:/u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2015-11-16_16-31-45.log
7.
8.
This file will show your detected configuration and all the stepsthat opatchauto attempted to do on your system:
9.
/u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2015-11-16_16-31-45.report.log
10.
11.2015-11-16 16:31:45: Starting Clusterware Patch Setup
12.Using configuration
parameter file:/u01/app/11.2.0/grid/crs/install/crsconfig_params
13.
14.Stopping RAC
/u01/app/oracle/product/11.2.0/db_1 ...
15.Stopped RAC
/u01/app/oracle/product/11.2.0/db_1 successfully
16.
17.patch /setup/oracleUp/21523375/21352635 apply successful for home /u01/app/oracle/product/11.2.0/db_1
18.patch /setup/oracleUp/21523375/21352649/custom/server/21352649 apply successful for home /u01/app/oracle/product/11.2.0/db_1
19.
20.Starting RAC
/u01/app/oracle/product/11.2.0/db_1 ...
21.Started RAC
/u01/app/oracle/product/11.2.0/db_1 successfully
22.
23.opatch auto succeeded.
root用户执行
[root@rac2 ~]#/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch auto /setup/oracleUp/21523375 -oh /u01/app/oracle/product/11.2.0/db_1 -ocmrf /u01/app/oracle/psu/ocm.rsp
1.
[oracle@rac1 ~]$ sqlplus / as sysdba
2.
3.
SQL>@?/rdbms/admin/catbundle.sqlpsu apply
确认升级后的dba_registry_history视图:
1.
SQL>select action,comments from registry$history;
2.
3.
ACTION COMMENTS
4.
---------- ----------
5.
APPLY Patchset 11.2.0.2.0
6.
APPLY PSU
11.2.0.4.8
7.
8.
2 rows selected
查看rac1和rac2两个节点的GI和oracle版本,下面以rac1为例
查看GI版本,已升级到11.2.0.4.8
查看oracle版本,已升级到11.2.0.4.8