Oracle 11.2.0.4 RAC安装最新PSU补丁
环境:两节点RAC(RHEL 6.4 + GI 11.2.0.4 + Oracle 11.2.0.4)
需求:安装最新PSU补丁11.2.0.4.7
- 1.下载补丁和最新OPatch
- 2.检查数据库当前OPatch版本
- 3.更新OPatch
- 4.解压补丁文件
- 5.检查补丁之间有无冲突
- 6.停止数据库和本地crs服务
- 7.更新补丁
- 8.登录数据库执行升级字典操作
- 9.验证补丁更新结果
- Reference
1. 下载补丁和最新OPatch
MOS 补丁程序和更新程序搜索到最新的PSU:截至目前最新是11.2.0.4.7
GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.4.7 (JUL2015) (补丁程序)
p20996923_112040_Linux-x86-64.zip 635.8 MB
OPatch下载地址:
https://updates.oracle.com/download/6880880.html
2. 检查数据库当前OPatch版本
RAC所有节点的GI home和DB home都需要检查。
$ $ORACLE_HOME/OPatch/opatch version
3. 更新OPatch
RAC所有节点的GI home和DB home都需要更新。
$ mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_bak
$ unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME
$ $ORACLE_HOME/OPatch/opatch version
需要注意grid用户$ORACLE_HOME 权限。
$ echo $ORACLE_HOME
$ ls -lh $ORACLE_HOME/../
# chmod 775 /opt/app/11.2.0/grid
4. 解压补丁文件
$ unzip p20996923_112040_Linux-x86-64.zip
5. 检查补丁之间有无冲突
检查需要打的补丁与现有补丁有无冲突.
$ cd 20996923
$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
grid用户执行结果:
$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2015, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /opt/app/11.2.0/grid
Central Inventory : /opt/app/oraInventory
from : /opt/app/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.4.0
Log file location : /opt/app/11.2.0/grid/cfgtoollogs/opatch/opatch2015-10-23_11-53-52AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
oracle执行结果:
$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2015, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /opt/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /opt/app/oraInventory
from : /opt/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.4.0
Log file location : /opt/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-10-23_11-56-06AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
6. 停止数据库和本地crs服务
grid用户登录节点1
su – oracle
$ $ORACLE_HOME/bin/srvctl stop database –d <db-unique-name>
su – root
# $GRID_HOME/crs/install/rootcrs.pl -unlock
7. 更新补丁
## 7.1 root用户,指定不同ORACLE_HOME,自动打补丁(失败) ##
# export ORACLE_HOME=/opt/app/11.2.0/grid
# $ORACLE_HOME/OPatch/opatch auto -oh $ORACLE_HOME/ -ocmrf $ORACLE_HOME/OPatch/ocm/bin/emocmrsp
# export ORACLE_HOME=/opt/app/oracle/product/11.2.0/dbhome_1
# $ORACLE_HOME/OPatch/opatch auto -oh $ORACLE_HOME/ -ocmrf $ORACLE_HOME/OPatch/ocm/bin/emocmrsp
7.2 尝试手工打补丁
7.2.1 节点1 grid home
[grid@jyracdb1 ~]$ $GRID_HOME/OPatch/opatch napply -oh $GRID_HOME -local /opt/app/media/20996923/
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2015, Oracle Corporation. All rights reserved.
Oracle Home : /opt/app/11.2.0/grid
Central Inventory : /opt/app/oraInventory
from : /opt/app/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.4.0
Log file location : /opt/app/11.2.0/grid/cfgtoollogs/opatch/opatch2015-10-23_16-06-35PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 20299019 17478514 18031668 18522509 19121551 19769489 20299013 20760982 20831122
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
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]: yes
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/opt/app/11.2.0/grid')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '20299019' to OH '/opt/app/11.2.0/grid'
Patching component oracle.usm, 11.2.0.4.0...
Applying sub-patch '17478514' to OH '/opt/app/11.2.0/grid'
ApplySession: Optional component(s) [ oracle.sdo, 11.2.0.4.0 ] , [ oracle.sysman.agent, 10.2.0.4.5 ] , [ oracle.xdk, 11.2.0.4.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.sdo.locator, 11.2.0.4.0...
Patching component oracle.nlsrtl.rsf, 11.2.0.4.0...
Patching component oracle.xdk.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
Applying sub-patch '18031668' to OH '/opt/app/11.2.0/grid'
ApplySession: Optional component(s) [ oracle.precomp.common, 11.2.0.4.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.ldap.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.crs, 11.2.0.4.0...
Patching component oracle.ldap.rsf.ic, 11.2.0.4.0...
Patching component oracle.rdbms.deconfig, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
Applying sub-patch '18522509' to OH '/opt/app/11.2.0/grid'
ApplySession: Optional component(s) [ oracle.precomp.common, 11.2.0.4.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.rdbms.deconfig, 11.2.0.4.0...
Applying sub-patch '19121551' to OH '/opt/app/11.2.0/grid'
ApplySession: Optional component(s) [ oracle.precomp.common, 11.2.0.4.0 ] , [ oracle.sysman.console.db, 11.2.0.4.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.ordim.client, 11.2.0.4.0...
Patching component oracle.ordim.jai, 11.2.0.4.0...
Applying sub-patch '19769489' to OH '/opt/app/11.2.0/grid'
ApplySession: Optional component(s) [ oracle.precomp.common, 11.2.0.4.0 ] , [ oracle.ovm, 11.2.0.4.0 ] , [ oracle.xdk, 11.2.0.4.0 ] , [ oracle.oraolap, 11.2.0.4.0 ] , [ oracle.sysman.agent, 11.2.0.4.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.rdbms.util, 11.2.0.4.0...
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.xdk.parser.java, 11.2.0.4.0...
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.xdk.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
Patching component oracle.rdbms.deconfig, 11.2.0.4.0...
Applying sub-patch '20299013' to OH '/opt/app/11.2.0/grid'
ApplySession: Optional component(s) [ oracle.rdbms.dv, 11.2.0.4.0 ] , [ oracle.rdbms.oci, 11.2.0.4.0 ] , [ oracle.precomp.common, 11.2.0.4.0 ] , [ oracle.sysman.agent, 10.2.0.4.5 ] , [ oracle.xdk, 11.2.0.4.0 ] , [ oracle.sysman.console.db, 11.2.0.4.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.sysman.common, 10.2.0.4.5...
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.xdk.parser.java, 11.2.0.4.0...
Patching component oracle.xdk.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.sysman.common.core, 10.2.0.4.5...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
Patching component oracle.rdbms.deconfig, 11.2.0.4.0...
Applying sub-patch '20760982' to OH '/opt/app/11.2.0/grid'
ApplySession: Optional component(s) [ oracle.sysman.console.db, 11.2.0.4.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Applying interim patch '20831122' to OH '/opt/app/11.2.0/grid'
Patching component oracle.crs, 11.2.0.4.0...
Composite patch 20760982 successfully applied.
Patches 20299019,20831122 successfully applied.
Log file location: /opt/app/11.2.0/grid/cfgtoollogs/opatch/opatch2015-10-23_16-06-35PM_1.log
OPatch succeeded.
7.2.2 节点1 oracle home
[oracle@jyracdb1 ~]$ $ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /opt/app/media/20996923/20760982/
输出略..
7.2.3 执行rootcrs.pl -patch
su – root
[root@jyracdb1 20996923]# /opt/app/11.2.0/grid/rdbms/install/rootadd_rdbms.sh
[root@jyracdb1 20996923]# /opt/app/11.2.0/grid/crs/install/rootcrs.pl -patch
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.
7.3 然后在节点2重复以上节点1操作
su – oracle
[oracle@jyracdb2 ~]$ $ORACLE_HOME/bin/srvctl stop database –d <db-unique-name>
或者:
[oracle@jyracdb2 ~]$ $ORACLE_HOME/bin/srvctl stop instance -d racdb -i racdb2
su – root
# $GRID_HOME/crs/install/rootcrs.pl -unlock
节点2补丁文件解压到/tmp下了,当然,如果配置共享的NFS等服务,就不必在节点2再解压补丁文件了。
[grid@jyracdb2 ~]$ $GRID_HOME/OPatch/opatch napply -oh $GRID_HOME -local /tmp/20996923/
[oracle@jyracdb2 ~]$ $ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /tmp/20996923/20760982/
执行rootcrs.pl -patch
su – root
[root@jyracdb2 ~]# /opt/app/11.2.0/grid/rdbms/install/rootadd_rdbms.sh
[root@jyracdb2 ~]# /opt/app/11.2.0/grid/crs/install/rootcrs.pl -patch
8. 登录数据库执行升级字典操作
由于RAC实际只有一个数据库,因此任意节点登录数据库执行1次即可。最后重启数据库。
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
SQL> shutdown immediate;
SQL> startup;
9. 验证补丁更新结果
各节点的GI HOME和ORACLE HOME都执行验证。
$ cd $ORACLE_HOME/OPatch
$ ./opatch lsinventory
数据库的验证。
SQL> select * from dba_registry_history;
Reference
- 20996923/README.html
- RAC Grid Infrastructure安装11.2.0.3.5 14727347 PSU GI-RDBMS补丁
- rac如何打补丁9413827
- Oracle 11.2.0.4 RAC psu补丁升级至11.2.0.4.2
- Patching Oracle Software with OPatch - Oracle Real Application Clusters Patching
Oracle 11.2.0.4 RAC安装最新PSU补丁的更多相关文章
- 完整记录一则Oracle 11.2.0.4单实例打PSU补丁的过程
本文记录了打PSU的全过程,意在体会数据库打PSU补丁的整个过程. 1.OPatch替换为最新版本2.数据库软件应用19121551补丁程序3.数据库应用补丁4.验证PSU补丁是否应用成功 1.OPa ...
- ORACLE 11.2.0.4 RAC安装在rhel6上
. 关闭ipv4防火墙(两个节点): [root@RAC01 ~]# service iptables stop [root@RAC01 ~]# service iptables status ipt ...
- Oracle 11.2.0.4单实例打PSU,OJVM PSU补丁快速参考
写在前面: 1.Oracel打每个补丁的操作有时存在差异,所以不管多熟悉,都应该在打任何补丁之前阅读新补丁中附带的readme. 2.Oracle每季度都会更新一个最新的PSU,本文最新指的是当前最新 ...
- ORACLE LINUX 6.3 + ORACLE 11.2.0.3 RAC + VBOX安装文档
ORACLE LINUX 6.3 + ORACLE 11.2.0.3 RAC + VBOX安装文档 2015-10-21 12:51 525人阅读 评论(0) 收藏 举报 分类: Oracle RA ...
- oracle 11.2.0.4静默安装
oracle 11.2.0.4静默安装 1.安装包 1.1.上传安装包 xshell可用rz命令,选择安装包. mobaxterm可用左侧栏上传功能. 2.安装准备 2.1.关闭防火墙.SELinux ...
- Oracle 11.2.0.4 RAC重建EM案例
环境:Oracle 11.2.0.4 RAC 重建EM 背景:客户之前的EM已经被损坏,需要重建EM 重建EM的方案有很多,其中最简单的方法是:直接使用emca重建,oracle用户下,只需一条命令搞 ...
- Oracle 11.2.0.4 DataGuard 环境打PSU,OJVM PSU补丁快速参考
环境:RHEL6.5 + Oracle 11.2.0.4 DataGuard physical standby 主库和备库都是单节点. 需求:主备库同时应用160719的PSU和OJVM PSU补丁. ...
- oracle 11.2.0.4 rac 打补丁
本次安装pus环境是11.2.0.4 rac,打的patch为11.2.0.4.180717 (Includes Database PSU),gi补丁和数据库补丁一起打 安装最新opatch版本 un ...
- centos6.8 oracle 11.2.0.4 11g安装
配置Linux系统参数 配置阿里云yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup ...
随机推荐
- opencv在图像显示中文
在图像定位和模式识别时,经常需要把结果标注到图片上,标注内容可以是数字字母.矩形框等(opencv支持的)或者是中文汉字(借助freetype). 1.显示数字/矩形框 #include <op ...
- 传播正能量——做一个快乐的程序员
引子 今天在博客园看到施瓦小辛格的文章我们搞开发的为什么会感觉到累,顿时有感而发.自己本来不擅长写文章,更不擅长写这种非技术性的文章,但是在思绪喷薄之际,还是止不住有很多话要说.针对从客观上说&quo ...
- TODO:GitHub创建组织的步骤
TODO:GitHub创建组织的步骤 使用GitHub进行团队合作,写这个步骤主要作用是为了OneTODO作为一个团队组织进行代码的分享,让更多人来参与. 使用帐号.密码登录GitHub 2.右上角加 ...
- ABP文档 - EntityFramework 集成
文档目录 本节内容: Nuget 包 DbContext 仓储 默认仓储 自定义仓储 特定的仓储基类 自定义仓储示例 仓储最佳实践 ABP可使用任何ORM框架,它已经内置了EntityFrame(以下 ...
- css3中perspective
perspective 属性定义 3D 元素距视图的距离,以像素计.该属性允许改变 3D 元素查看 3D 元素的视图.当为元素定义 perspective 属性时,其子元素会获得透视效果,而不是元素本 ...
- Spring框架概述
Spring是最流行的Java企业级应用开发框架,全球数以百万的开发者在使用Spring框架创建高性能.易测试.可重用的代码. Spring框架的核心特性可以应用于任何Java应用,但扩展的JavaE ...
- javascript函数
array.sort(function(a, b){ return a -b ; } ) 把数组 array 按照从小到大排序. [11, 22, 586, 10, -58, 86].sort(f ...
- 水平可见直线 bzoj 1007
水平可见直线 (1s 128M) lines [问题描述] 在xoy直角坐标平面上有n条直线L1,L2,...Ln,若在y值为正无穷大处往下看,能见到Li的某个子线段,则称Li为可见的,否则Li为被覆 ...
- 设置Hyper-V和VMware多个服务之间共存
这个方法是解决多个服务之间不能共存,下面相当于是以Hyper-V和VMware做例子,其他的也适用. 今天准备安装VMware Workstation 10,然后玩玩MAC OS. 没想到,淡定的我双 ...
- 使用nginx反向代理,一个80端口下,配置多个微信项目
我们要接入微信公众号平台开发,需要填写服务器配置,然后依据接口文档才能实现业务逻辑.但是微信公众号接口只支持80接口(80端口).我们因业务需求需要在一个公众号域名下面,发布两个需要微信授权的项目,怎 ...