这几天在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 /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和数据库全部没有停,在升级过程中,脚本会自动启停。
3)开始升级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.
4)升级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.
5)执行脚本,该脚本只在一个节点执行即可。
cd $ORACLE_HOME/rdbms/admin sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> STARTUP SQL> @catbundle.sql psu apply SQL> QUIT
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11590946/viewspace-1072914/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11590946/viewspace-1072914/