1.补丁提前准备,完成上传和授权的过程
创建目录
/tmp/psu
如果未授权进行会报错,因为是grid用户安装没有权限
在每个节点都运行
chown -R grid:oinstall /tmp/psu 进行授权
[root@rac1 psu]# ll
total 683348
-rw-r--r-- 1 grid oinstall 666719126 Jul 17 18:26 p20996923_112040_Linux-x86-64.zip
-rw-r--r-- 1 grid oinstall 33020933 Aug 1 2014 p6880880_112000_Linux-x86-64.zip
--------------------------------------------------------------------------------
2.升级OPatch工具在所有节点进行
首先查看当前的版本号
(在所有节点运行)
[grid@rac1 ~]$ /u01/app/11.2.0/grid/OPatch/opatch version
OPatch Version: 11.2.0.3.4
OPatch succeeded.
[grid@rac2 ~]$ unzip /tmp/psu/p6880880_112000_Linux-x86-64.zip -d /u01/app/11.2.0/grid/
解压完毕再次检测[grid@rac2 ~]$ /u01/app/11.2.0/grid/OPatch/opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
Oracle
(同样在两个节点运行,检测查看安装)
[oracle@rac1 11.2.0]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch version
OPatch Version: 11.2.0.3.4
OPatch succeeded.
[oracle@rac1 dbhome_1]$ unzip /tmp/psu/p6880880_112000_Linux-x86-64.zip -d /u01/app/oracle/product/11.2.0/dbhome_1
再次检查[oracle@rac1 dbhome_1]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch version
OPatch Version: 11.2.0.3.6
------------------------------------------------------------------
OPatch succeeded.
先检测当前的版本
[grid@rac2 ~]$ /u01/app/11.2.0/grid/OPatch/opatch lsinventory -detail -oh /u01/app/11.2.0/grid/
[oracle@rac2 ~]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/product/11.2.0/dbhome_1
--------------------------------------------------------------
3.创建OCM文件
[grid@rac1 ~]$ cd /u01/app/11.2.0/grid/OPatch/ocm/bin/
[grid@rac1 bin]$ ./emocmrsp
OCM Installation Response Generator 10.3.4.0.0 - Production
Copyright (c) 2005, 2010, 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 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 (ocm.rsp) was successfully created.
[grid@rac1 bin]$ ls -l ocm.rsp
-rw-r--r-- 1 grid oinstall 621 Aug 20 21:38 ocm.rsp
---------------------------------------------------------------------------------
查看是否可以打补丁包
[grid@rac2 bin]$ /u01/app/11.2.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/psu/20996923/
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2015-08-22_04-31-36AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
-------------------------------------------------------------------------------------
OPatch apply (所有节点需执行)(无需关闭组件)
[root@rac1 pus]# /u01/app/11.2.0/grid/OPatch/opatch auto /tmp/pus/20996923/ -ocmrf /u01/app/11.2.0/grid/OPatch/ocm/bin/ocm.rsp
Stopping CRS...
Stopped CRS successfully
patch /tmp/psu/20996923/20760982 apply successful for home /u01/app/11.2.0/grid
patch /tmp/psu/20996923/20831122 apply successful for home /u01/app/11.2.0/grid
patch /tmp/psu/20996923/20299019 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.
Starting RAC /u01/app/oracle/product/11.2.0/dbhome_1 ...
Started RAC /u01/app/oracle/product/11.2.0/dbhome_1 successfully
opatch auto succeeded.
就可以看到
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 product(s) installed in this Oracle Home.
Interim patches (2) :
Patch 20831122 : applied on Fri Aug 21 20:46:18 CST 2015
Unique Patch ID: 18923533
Patch description: "OCW Patch Set Update : 11.2.0.4.7 (20831122)"
Created on 1 Jul 2015, 06:26:39 hrs PST8PDT
Bugs fixed:
19270660, 18328800, 18691572, 20365005, 17750548, 17387214, 17617807
14497275, 17733927, 18180541, 18962892, 17292250, 17378618, 16759171
20110156, 17065496, 13991403, 17273020, 17155238, 18261183, 18053580
我们再次查看下当前版本
备注:由于官方没有要求打补丁的时候需要关闭DB或CRS,这里可以清晰看出它的执行步骤,
关闭RAC-->补丁RAC -->关闭CRS -->补丁CRS -->启动CRS-->启动RAC、
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30347819/viewspace-1779012/
,如需转载,请注明出处,否则将追究法律责任。