适用于新安装RAC,尚未创建数据库

一、准备软件包
 下载合适的OPatch以及最新的PSU补丁集,并上传到Oracle RAC各个节点服务器(节点1和节点2分别做下面的操作)
[root@rac1 psu]# pwd
 /u01/psu
 [root@rac1 psu]# ll
 -rw-r--r--  1 root root 753393263 Oct 26 16:21 p23615403_112040_Linux-x86-64.zip
 -rw-r--r--  1 root root  52733900 Oct 26 16:20 p6880880_112000_Linux-x86-64.zip

二、升级grid以及Oracle用户的OPatch(节点1和节点2分别做下面的操作)
1、查看当前OPatch版本
[grid@rac1 ~]$ /u01/app/11.2.0/grid/OPatch/opatch version
 OPatch Version: 11.2.0.3.4
 OPatch succeeded.

[oracle@rac1 ~]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch version
 OPatch Version: 11.2.0.3.4
 OPatch succeeded.

2、升级Opatch
 [root@rac1 psu]# unzip p6880880_112000_Linux-x86-64.zip
 [root@rac1 psu]# mv /u01/app/11.2.0/grid/OPatch /u01/app/11.2.0/grid/OPatch_bak
 [root@rac1 psu]# cp -rp /u01/psu/OPatch /u01/app/11.2.0/grid/
 [root@rac1 psu]# chown -R grid:oinstall /u01/app/11.2.0/grid/OPatch
 [root@rac1 psu]# mv /u01/app/oracle/product/11.2.0/db_1/OPatch /u01/app/oracle/product/11.2.0/db_1/OPatch_bak
 [root@rac1 psu]# cp -rp /u01/psu/OPatch /u01/app/oracle/product/11.2.0/db_1/
 [root@rac1 psu]# chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/db_1/OPatch

3、验证升级
[grid@rac1 ~]$ /u01/app/11.2.0/grid/OPatch/opatch version
 OPatch Version: 11.2.0.3.12
 OPatch succeeded.

[oracle@rac1 ~]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch version
 OPatch Version: 11.2.0.3.12
 OPatch succeeded.

三、生成ocm文件(节点1和2分别做下面的操作)
[grid@rac1 ~]$ cd /tmp/
 [grid@rac1 tmp]$ /u01/app/11.2.0/grid/OPatch/ocm/bin/emocmrsp
 OCM Installation Response Generator 10.3.7.0.0 - Production
 Copyright (c) 2005, 2012, Oracle and/or its affiliates.  All rights reserved.

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 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 (ocm.rsp) was successfully created.
 [grid@rac1 tmp]$ chmod 777 ocm.rsp
 [grid@rac1 tmp]$ ll ocm.rsp
 -rwxrwxrwx 1 grid oinstall 621 Oct 26 17:20 ocm.rsp

四、升级database和grid软件(节点1和2分别做下面的操作)
1、解压PSU升级包
[root@rac1 psu]# mkdir 23615403
 [root@rac1 psu]# unzip p23615403_112040_Linux-x86-64.zip -d 23615403
 [root@rac1 psu]# chmod -R 777 23615403

2、升级grid软件

[root@rac1 ~]# /u01/app/11.2.0/grid/OPatch/opatch auto /u01/psu/23615403/ -ocmrf /tmp/ocm.rsp
 Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /u01/psu -patchn 23615403 -ocmrf /tmp/ocm.rsp -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2016-10-26_21-39-17.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
 /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2016-10-26_21-39-17.report.log

2016-10-26 21:39:17: Starting Clusterware Patch Setup
 Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Stopping CRS...
 Stopped CRS successfully

patch /u01/psu/23615403/23054359  apply successful for home  /u01/app/11.2.0/grid
 patch /u01/psu/23615403/23054319  apply successful for home  /u01/app/11.2.0/grid
 patch /u01/psu/23615403/22502505  apply successful for home  /u01/app/11.2.0/grid

Starting CRS...
 Installing Trace File Analyzer
 CRS-4123: Oracle High Availability Services has been started.

opatch auto succeeded.

验证grid升级情况:
[grid@rac1 ~]$ /u01/app/11.2.0/grid/OPatch/opatch lspatches
 22502505;ACFS Patch Set Update : 11.2.0.4.160419 (22502505)
 23054319;OCW Patch Set Update : 11.2.0.4.160719 (23054319)
 23054359;Database Patch Set Update : 11.2.0.4.160719 (23054359)

OPatch succeeded.


 3、升级Oracle database软件
[root@rac1 ~]# /u01/app/11.2.0/grid/OPatch/opatch auto /u01/psu/23615403/ -ocmrf /tmp/ocm.rsp -oh /u01/app/oracle/product/11.2.0/db_1/
 Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /u01/psu -patchn 23615403 -ocmrf /tmp/ocm.rsp -oh /u01/app/oracle/product/11.2.0/db_1/ -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2016-10-26_21-53-22.log

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/767384a4b1743a98d0e72de30fb9121c.html