Oracle RAC数据库环境与单实例数据库环境有很多共性,也有很多异性。对于数据库补丁的更新同样如此,都可以通过opatch来完成。但RAC环境的补丁更新有几种不同的更新方式,甚至于可以在零停机的情况下对所有节点实现滚动升级。本文主要是转述了Doc 244241.1,描述RAC环境下的patch更新方式以及在不同的情形下选择何种更新方式。

1、RAC patch的几种方式

OPatch supports 3 different patch methods on a RAC environment:

  • Patching RAC as a single instance (All-Node Patch) (停机方式)

In this mode, OPatch applies the patch to the local node first, then propagates the patch to all the other nodes, and finally updates the inventory. All instances must be down during the whole patching process.

  • Patching RAC using a minimum down-time strategy (Min. Downtime Patch)(最小化停机方式)

In this mode, OPatch patches the local node, asks users for a sub-set of nodes, which will be the first subset of nodes to be patched. After the initial subset of nodes are patched, Opatch propagates the patch to the other nodes and finally updates the inventory. The downtime would happen between the shutdown of the second subset of nodes and the startup of the initial subset of nodes patched.

  • Patching RAC using a rolling strategy - No down time (Rolling Patch)(滚动方式)

With this method, there is no downtime. Each node would be patched and brought up while all the other nodes are up and running, resulting in no disruption of the system.

Rolling patching strategy incur no downtime, however, some rolling patches may incur downtime due to post-installation steps, i.e. running sql scripts to patch the actual database. Please refer to patch readme to find out whether post-installation steps requires downtime or not.
注意这句话,Rolling Patch不会停机,但是有些脚本可能会引发宕机。

2、不同方式Patch的步骤
All-Node Patch
. Shutdown all Oracle instances on all nodes
. Apply the patch to the RAC home on all nodes
. Bring all instances up

Minimum downtime
. Shutdown the Oracle instance on node 1 
. Apply the patch to the RAC home on node 1 
. Shutdown the Oracle instance on node 2 
. Apply the patch to the RAC home on node 2 
. Shutdown the Oracle instance on node 3 
. At this point, instances on nodes 1 and 2 can be brought up
. Apply the patch to the RAC home on node 3 
. Startup the Oracle instance on node 3

Rolling patch (no downtime)
. Shutdown the Oracle instance on node 1 
. Apply the patch to the RAC home on node 1 
. Start the Oracle instance on node 1 
. Shutdown the Oracle instance on node 2 
. Apply the patch to the RAC home on node 2 
. Start the Oracle instance on node 2 
. Shutdown the Oracle instance on node 3 
. Apply the patch to the RAC home on node 3 
. Start the Oracle instance on node 3

3、选用何种方式patch
To be eligible as a rolling patch, the patch needs to meet certain criterias, which are determined by Oracle developers. In order to be applied in a "rolling fashion", the patch must be designated as a "rolling updatable patch" or simply "rolling patch".

The algorithm used to decide which method is going to be used is the following:

If (users specify minimize_downtime)
              patching mechanism = Min. Downtime
       else if (patch is a rolling patch)
              patching mechanism = Rolling
            else
                  patching mechanism = All-Node

#从上面的算法来看最小化停机时间是首选。

4、滚动patch的可用性
When patches are released, they have a tag as "rolling" or "not rolling" patch. While most patches can be applied in a rolling fashion, some patches can not be applied in this fashion. Patches that could potentially be installed on rolling fashion include:
 
   . Patches that do not affect the contents of the database. 
   . Patches that are not related to the RAC internode communication infrastructure. 
   . Patches that change procedural logic and do not modify common header definitions of kernel modules. This includes client side patches that only affect utilities like export, import, sql*plus, sql*loader, etc.

Only individual patches -- not patch sets -- will be “rollable”. It should also be noted that a merge patch of a “rolling patch” and an ordinary patch will not be a “rolling patch”.

From 9.2.0.4 onwards, all patches released will be marked as a "rolling" or "not rolling patch", based on defined set of rules. Patches previously released are packaged as "not rolling".

Because the set of rules currently defined are very conservative, patches released as "not rolling patches", either before and after 9.2.0.4, may be eligible to be re-released as "rolling patches", after analysis from Oracle Development.
  
If you plan to apply a patch that is marked as "not rolling" and want to check if is possible to take advantage of the rolling patch strategy, please contact Oracle Support.

5、如何确认patch是否可滚动
#可使用下面的方式来查询当前的patch是否为可滚动
As database user execute the following:

- 9i or 10gR1: opatch query -is_rolling

- 10gR2: opatch query -all  [unzipped patch location] | grep rolling

- 10gR2 on Windows: opatch query -all [unzipped patch location] | findstr rolling

- Later 10gR2 or 11g: opatch query -is_rolling_patch [unzipped patch location]

The command may not work if unzipped patch location has more than one patch sub-directory, example output while checking CPU patches:
#对于解压路径下有多个子patch的情形,校验是否为滚动patch可能会失败,如下:
Failed to load the patch object.  Possible causes are:
  The specified path is not an interim Patch shiphome
  Meta-data files are missing from the patch area
  Patch location = /home/oracle/stage/8836308
  Details = Input metadata files are missing.

Patch Location "/home/oracle/stage/8836308" doesn't point to a valid patch area.
# Author : Leshami
# Blog   : http://blog.csdn.net/leshmai

OPatch failed with error code 75

6、当前的一些限制

Patching with Shared File System
Currently OPatch treats Shared File System, like CFS, as a single-instance patch.  It means that OPatch will blindly patch files under a given ORACLE_HOME knowing that other nodes will pick up the changes via the Shared File System. Unfortunately, this means that OPatch cannot take advantage of a rolling patch on a Shared File System environment; all nodes must be down throughout the patching process.

Patching one node at time

The Opatch strategies discussed above (All-Node, Min. Down-Time, and Rolling) presumes that all nodes will be patched at the same time. Additionally, each node can be patched individually, at different times, using the "-local" key word, which will patch only the local node.

转:http://blog.csdn.net/leshami/article/details/38727151#comments

转载于:https://www.cnblogs.com/andy6/p/5877356.html

Oracle RAC环境下如何更新patch(Rolling Patch)相关推荐

  1. Oracle RAC 环境下的连接管理(转) --- 防止原文连接失效

    崔华老师的文章!!! 这篇文章详细介绍了Oracle RAC环境下的连接管理,分别介绍了什么是 Connect Time Load Balancing.Runtime Connection Load ...

  2. Oracle RAC 环境下的连接管理

    转自 http://www.oracle.com/technetwork/cn/articles/database-performance/oracle-rac-connection-mgmt-165 ...

  3. Oracle RAC环境下如何定位并杀掉最终阻塞的会话

    ‍ ‍ 导读:Oracle RAC环境下定位并杀掉最终阻塞的会话,本文通过一个测试demo来具体介绍. 实验环境: Oracle RAC 11.2.0.4 (2节点) 1.模拟故障:会话被级联阻塞 2 ...

  4. Oracle rac环境下数据文件误建在本地目录的处理过程

    错误描述   Mon Nov 16 19:02:38 2015 Errors in file /u01/app/oracle/diag/rdbms/zwzwdb/zwzwdb1/trace/zwzwd ...

  5. oracle rac环境下修改1521集群端口

    文章目录 一.修改前准备工作 1.确认端口是否占用 2.grid确认监听状态以及名称 二.grid修改集群端口 1.grid修改监听端口 2.grid修改scan监听端口 3.双节点确认实例下loca ...

  6. oracle rac 磁盘重建,Oracle RAC环境下重建ASM磁盘组 Re-create ASM diskgroup with Oracle RAC...

    oracle@node01:/$dbca 查看创建结果: 16)最后,引用原文如下: Steps to Re-Create ASM Diskgroups [ID 268481.1] 修改时间 17-M ...

  7. Oracle RAC 环境数据备份与恢复实践

    [导读]某企业因项目需要在Oracle RAC集群环境下,根据实际情况对Oracle数据库进行备份:使用生产环境的rman全备数据,进行恢复数据搭建测试环境.本文将详细介绍此案例中Oracle数据库r ...

  8. 死锁oracle rac,利用LOGMINER进行RAC环境下的死锁分析——转载

    RAC中的死锁的判断机制跟单机很不相同,比单机要复杂的多,而且消耗的时间和资源也比单机要多的多,所以亚马逊的DBA TEAM曾经在一份经验总结中指出如果是并发非常大的OLTP系统,如果锁的问题处理不好 ...

  9. 11g RAC环境下客户端配置TAF

    TAF是Transparent Application Failover的英文缩写,顾名思义就是对应用透明的故障转移,举个例子,当应用连接某个oracle数据库的执行查询操作的时候,数据库服务器网络中 ...

最新文章

  1. 给机器学习从业者的 12 条建议
  2. 《AOSuite 开发手册》之AOSuite 服务端开发
  3. 今日工作总结及计划: 2022-02-14
  4. Spring+hibernate里使用jdbc connection
  5. pod实例数是什么意思_[灌水] Kubernetes In Action: Pod
  6. 如何在SQL Server中使用级联删除?
  7. 硬核干货:你从普通码农到架构师的封神之路
  8. 设计模式在游戏中的应用--模板方法(七)
  9. HCNA-Cloud云计算认证
  10. android 指令脱壳,安卓脱壳之战-腾讯脱壳
  11. img 标签的 height 和 width 属性设置图像的尺寸。
  12. 农场花园种花偷花前后端完整项目
  13. 核函数是什么-数据的升维与降维
  14. 904. 水果成篮(数组、滑动窗口)
  15. 记十月五日寨口大坡徒步
  16. java 音频转换_java实现音频转换
  17. Vue中阿拉伯数字与汉字的相互转换
  18. ros中 指针传递 ros::NodeHandle *node 报received signal SIGSEGV, Segmentation fault
  19. IDEA中创建Maven Web项目(两种方式)
  20. 基于stm32h743+rtthread的开源项目——板载资源介绍(一)

热门文章

  1. 理论计算机科学中最令人困惑的谜题之一被解开
  2. 万字长文解读运营商搏击5G:一场比拼财力的三国杀
  3. 车联网系统会不会只是智能手机系统的翻版?
  4. 2018, 自动驾驶异常艰难的一年
  5. “光纤之父”高锟离世,感谢他的贡献
  6. 为“证明实力”,某医院前网管离职后远程入侵服务器,致诊疗系统瘫痪
  7. 40 万年薪招应届生?OPPO 狂揽芯片人才,应届生招聘行情究竟如何?
  8. ​他被称为印度“ IT 大王”,富可敌国,却精打细算如守财奴
  9. windows 平台使用 VS2017 编译 libevent 源码
  10. oracle删除临时表空间一直处于等待状态