11g RAC 从11.2.0.3.0升级到11.2.0.3.9

这几天在RHEL5.7上装了一个2节点的11gRAC ,根据客户的要求需要打到最新的patch。下面是操作过程和大家进行一个分享,也是自己的一次在学习。

1)下载最新的OPatch,并更新grid和oracle用户下的OPatch工具

2)生成OCM配置文件。我这里升级GI用的OCM配置文件是使用grid用户生成的,升级RDBMS的OCM配置文件是使用Oracle用户生成的。

生成OCM的命令如下:

$ORACLE_HOME/OPatch/ocm/bin/emocmrsp  -no_banner -output <specify_the_location>/file.rsp

下面是我生成GI升级用OCM的过程

[grid@zhcs-db1 bin]$ ./emocmrsp -no_banner -output /backup/grid_opatch.rsp 
Provide your email address to be informed of security issues, install and 
initiate Oracle Configuration Manager. Easier for you if you use your My 
Oracle Support Email address/User Name. 
Visit http://www.oracle.com/support/policies.html for details. 
Email address/User Name:
You have not provided an email address for notification of security issues. 
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y 
The OCM configuration response file (/backup/grid_opatch.rsp) was successfully created. 
[grid@zhcs-db1 bin]$

下面是生成升级RDBMS用OCM的过程

[oracle@zhcs-db1 bin]$ ./emocmrsp -no_banner -output /home/oracle/oracle_opatch.rsp 
Provide your email address to be informed of security issues, install and 
initiate Oracle Configuration Manager. Easier for you if you use your My 
Oracle Support Email address/User Name. 
Visit http://www.oracle.com/support/policies.html for details. 
Email address/User Name:
You have not provided an email address for notification of security issues. 
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y 
The OCM configuration response file (/home/oracle/oracle_opatch.rsp) was successfully created. 
[oracle@zhcs-db1 bin]$

在下面的升级过程中,CRS和数据库全部没有停,在升级过程中,脚本会自动启停。

GI升级

[root@zhcs-db1 ~]# opatch auto /backup -oh /u01/11.2.0/grid -ocmrf /home/grid/grid_opatch.rsp 
Executing /u01/11.2.0/grid/perl/bin/perl /u01/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir / -patchn backup -oh /u01/11.2.0/grid -ocmrf /home/grid/grid_opatch.rsp -paramfile /u01/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/11.2.0/grid/cfgtoollogs/opatchauto2014-01-17_12-02-53.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system: 
/u01/11.2.0/grid/cfgtoollogs/opatchauto2014-01-17_12-02-53.report.log
2014-01-17 12:02:53: Starting Clusterware Patch Setup 
Using configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_params
Stopping CRS... 
Stopped CRS successfully
patch //backup/17592127  apply successful for home  /u01/11.2.0/grid 
patch //backup/17540582  apply successful for home  /u01/11.2.0/grid
Starting CRS... 
CRS-4123: Oracle High Availability Services has been started.
opatch auto succeeded.
[root@zhcs-db2 ~]# opatch auto /backup -oh /u01/11.2.0/grid -ocmrf /home/grid/grid_opatch.rsp 
Executing /u01/11.2.0/grid/perl/bin/perl /u01/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir / -patchn backup -oh /u01/11.2.0/grid -ocmrf /home/grid/grid_opatch.rsp -paramfile /u01/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/11.2.0/grid/cfgtoollogs/opatchauto2014-01-17_12-25-36.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system: 
/u01/11.2.0/grid/cfgtoollogs/opatchauto2014-01-17_12-25-36.report.log
2014-01-17 12:25:36: Starting Clusterware Patch Setup 
Using configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_params
Stopping CRS... 
Stopped CRS successfully
patch //backup/17592127  apply successful for home  /u01/11.2.0/grid 
patch //backup/17540582  apply successful for home  /u01/11.2.0/grid
Starting CRS... 
CRS-4123: Oracle High Availability Services has been started.
opatch auto succeeded.
RDBMS升级
[root@zhcs-db1 ~]# opatch auto /backup -oh /u01/app/oracle/product/11.2.0/db_1 -ocmrf /home/oracle/oracle_opatch.rsp 
Executing /u01/11.2.0/grid/perl/bin/perl /u01/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir / -patchn backup -oh /u01/app/oracle/product/11.2.0/db_1 -ocmrf /home/oracle/oracle_opatch.rsp -paramfile /u01/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/11.2.0/grid/cfgtoollogs/opatchauto2014-01-17_12-16-42.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system: 
/u01/11.2.0/grid/cfgtoollogs/opatchauto2014-01-17_12-16-42.report.log
2014-01-17 12:16:42: Starting Clusterware Patch Setup 
Using configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_params
Stopping RAC /u01/app/oracle/product/11.2.0/db_1 ... 
Stopped RAC /u01/app/oracle/product/11.2.0/db_1 successfully
patch //backup/17592127/custom/server/17592127  apply successful for home  /u01/app/oracle/product/11.2.0/db_1 
patch //backup/17540582  apply successful for home  /u01/app/oracle/product/11.2.0/db_1
Starting RAC /u01/app/oracle/product/11.2.0/db_1 ... 
Started RAC /u01/app/oracle/product/11.2.0/db_1 successfully
opatch auto succeeded.
 
[root@zhcs-db2 ~]# opatch auto /backup -oh /u01/app/oracle/product/11.2.0/db_1 -ocmrf /home/oracle/oracle_opatch.rsp 
Executing /u01/11.2.0/grid/perl/bin/perl /u01/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir / -patchn backup -oh /u01/app/oracle/product/11.2.0/db_1 -ocmrf /home/oracle/oracle_opatch.rsp -paramfile /u01/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/11.2.0/grid/cfgtoollogs/opatchauto2014-01-17_12-37-41.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system: 
/u01/11.2.0/grid/cfgtoollogs/opatchauto2014-01-17_12-37-41.report.log
2014-01-17 12:37:41: Starting Clusterware Patch Setup 
Using configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_params
Stopping RAC /u01/app/oracle/product/11.2.0/db_1 ... 
Stopped RAC /u01/app/oracle/product/11.2.0/db_1 successfully
patch //backup/17592127/custom/server/17592127  apply successful for home  /u01/app/oracle/product/11.2.0/db_1 
patch //backup/17540582  apply successful for home  /u01/app/oracle/product/11.2.0/db_1
Starting RAC /u01/app/oracle/product/11.2.0/db_1 ... 
Started RAC /u01/app/oracle/product/11.2.0/db_1 successfully
opatch auto succeeded.

执行脚本,该脚本只在一个节点执行即可。

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT

--END--

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值