ITPub博客

首页 > 数据库 > Oracle > ORACLE RAC 的滚动升级

ORACLE RAC 的滚动升级

Oracle 作者:murkey 时间:2014-09-15 11:24:28 0 删除 编辑


Oracle 11g 新特性 --Online Patching (Hot Patching 热补丁)说明


http://blog.csdn.net/tianlesoftware/article/details/8214412


 


Oracle 更新 OPatch 工具版本 的方法说明


http://blog.csdn.net/tianlesoftware/article/details/6857059


 


 


这里看一下RAC的Patch。 这里是争对DB Patch 来说明,如果是RAC的GI升级,或者是PSR,还是需要停机的。因为GI的升级需要停掉整个CRS。 但对数据库独立patch则可以采取滚动方式来安装。


 


一. RAC Patch的几种方法
 


RAC 环境下有三种不同的patch方法:


 


1.1 对所有节点同时Patch(All-Node Patch)
对于这种模式,OPatch 先在本地节点apply patch,然后在其他节点apply,最后更新inventory。 在这个patch的过程中,所有实例都必须shutdown。


 


该模式的操作步骤如下:


(1)关闭所有节点上的实例。


(2)在所有节点上applypatch。


(3)启动所有实例。


 


1.2 使用最小宕机时间来打Patch
 


在这种模式下,OPatch 先对本地节点打opatch。然后让用户选择其他的节点来进行patch, 其他节点也patch完成,最后在更新inventory。


 


    在这种模式下,downtime的时间就是第二个节点关闭到第一个节点起来之间的时间。


 


最小宕机的操作步骤如下:


(1)关闭节点1的实例


(2)在节点1上apply Patch


(3)关闭节点2上的实例。


(4)在节点2上应用Patch。


(5)关闭节点3上的实例。


(6)在这个时候,节点1和节点2的实例可以启动。


(7)在节点3上应用patch。


(8)启动节点3上的实例。


 


以上整个过程,downtime就是节点3 shutdown到节点1,2启动这段时间。


 


1.3 Rolling Patch(不需要down time)
 


    在这种方法里,没有downtime 时间。 每个节点都可以patch,并且其他节点也可以正常运行,这种情况下对系统就没有影响。


 


Rolling Patch 也不总是不需要downtime时间,因为有些patch支持 rolling patch,有些不支持,对于不支持rolling patch的,只能按照老方法来安装。


 


Rolling patch的步骤如下:


(1)关闭节点1的实例


(2)在节点1上应用Patch。


(3)在节点1上启动实例。


(4)关闭节点2上的实例。


(5)在节点2上应用Patch。


(6)在节点2上启动实例。


(7)关闭节点3上的实例。


(8)在节点3上应用Patch。


(9)启动节点3上的实例。


 


 


1.4 如何判断使用哪种方法
 


只有满足特定条件的Patch 才可以进行rolling patch。该类patch被称为:rolling updateble patch 或者 rolling patch。


 


如果用户指定了最小宕机时间,选择最小宕机时间,如果没有指定,就使用rolling patch,最后在考虑同时对所有节点进行patch。


 


 


 


 


二. 如何判断Patch 是否是Rolling Patch?
 


    当oracle 发布一个patch的时候,会对patch 进行标记:rolling 或者是not rolling。大部分的patch 都是rolling的。


 


Rolling Patch 有如下特性:


(1)Patch 不影响数据库的内容


(2)Patch 和RAC 内部通信结构无关


(3)Patch 改变程序的逻辑,不修改kernel modules的common header definitions。包括客户端的patch,其只影响一些工具,如export,import,sql*plus和sql*loader等。


 


只有独立的patches才是rollable的。对于patch sets不能进行rolling patch。


 


将多个rolling patch 合并起来的merge patch 和普通的patch都不是 rolling patch。


 


从Oracle 9.2.0.4 开始,根据定义的规则,所有的的patches都会被标记为rolling 或者 not rolling patch。 在这之前的patch都会标记为not rolling。


 


 


2.1检查patch是否是 rolling patch
 


执行如下命令:


    - 9i or 10gR1: opatchquery -is_rolling


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


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


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


 


 


如果我们解压缩的patch 路径包含多个子patch目录,那么opatch命令就不能正常工作。


 


--不能用root用户执行判断命令:


[root@rac1 16056266]#/u01/app/grid/11.2.0/OPatch/opatch query -is_rolling_patch/u01/software/16056266


The user is root. OPatch cannot continue ifthe user is root.


 


 


OPatch failed with error code 255


 


[root@rac1 16056266]# su - grid


[grid@rac1 ~]$/u01/app/grid/11.2.0/OPatch/opatch query -is_rolling_patch/u01/software/16056266


Oracle Interim Patch Installer version11.2.0.3.4


Copyright (c) 2012, OracleCorporation.  All rights reserved.


 


 


Oracle Home       : /u01/app/grid/11.2.0


Central Inventory : /u01/app/oraInventory


  from           :/u01/app/grid/11.2.0/oraInst.loc


OPatch version    : 11.2.0.3.4


OUI version       : 11.2.0.3.0


Log file location :/u01/app/grid/11.2.0/cfgtoollogs/opatch/opatch2013-06-09_04-14-34AM_1.log


 


Failed to load the patch object.  Possible causes are:


  Thespecified path is not an interim Patch shiphome


 Meta-data files are missing from the patch area


 Patch location = /u01/software/16056266


 Details = Input metadata files are missing.


 


Patch Location"/u01/software/16056266" doesn't point to a valid patch area.


--因为我们指定的/u01/software/16056266的路径下面还包含其他的子patch,所以报错。


 


OPatch failed with error code 75


 


[grid@rac1 ~]$ cd /u01/software/16056266


[grid@rac1 16056266]$ ls


13343438 13696216  13923374  14275605 14727310  16056266  patchmd.xml README.html  README.txt


 


--对单个patch进行查看:


[grid@rac1 16056266]$  /u01/app/grid/11.2.0/OPatch/opatch query-is_rolling_patch /u01/software/16056266/13343438/


Oracle Interim Patch Installer version11.2.0.3.4


Copyright (c) 2012, OracleCorporation.  All rights reserved.


 


 


Oracle Home       : /u01/app/grid/11.2.0


Central Inventory : /u01/app/oraInventory


  from           :/u01/app/grid/11.2.0/oraInst.loc


OPatch version    : 11.2.0.3.4


OUI version       : 11.2.0.3.0


Log file location :/u01/app/grid/11.2.0/cfgtoollogs/opatch/opatch2013-06-09_04-15-17AM_1.log


 


--------------------------------------------------------------------------------


 Patch is a rolling patch: true


 


OPatch succeeded.


 


[grid@rac116056266]$ /u01/app/grid/11.2.0/OPatch/opatch query -is_rolling_patch/u01/software/16056266/13696216


Oracle Interim Patch Installer version11.2.0.3.4


Copyright (c) 2012, OracleCorporation.  All rights reserved.


 


Oracle Home       : /u01/app/grid/11.2.0


Central Inventory : /u01/app/oraInventory


  from           :/u01/app/grid/11.2.0/oraInst.loc


OPatch version    : 11.2.0.3.4


OUI version       : 11.2.0.3.0


Log file location :/u01/app/grid/11.2.0/cfgtoollogs/opatch/opatch2013-06-09_04-15-32AM_1.log


 


--------------------------------------------------------------------------------


 Patch is a rolling patch: true


 


OPatch succeeded.


 


 


2.2 Patch的一些限制
 


2.2.1 在Shared File System上进行Patch
Currently Opatch会把Shared File System当作单实例来进行Patch。OPatch 会把patch file 放在ORACLE_HOME目录,因为是共享的,所以其他节点也可以访问。


因此对于Shared FileSystem的环境,就不能使用OPatch 的高级功能:rollingpatch,在打Patch的时候,所有节点都必须shutdown。


 


 


2.2.2 每次Patch一个节点
可以在每个节点独立的进行patch,即在opatch的时候只用: -local 关键字,这样就只会在本地节点进行patch。


 


 


 


 


 


 


 


 


--------------------------------------------------------------------------------------------


版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!


QQ:      251097186


Skype:    tianlesoftware


Email:    tianlesoftware@gmail.com


Blog:     http://blog.csdn.net/tianlesoftware


Weibo:    http://weibo.com/tianlesoftware


Twitter:  http://twitter.com/tianlesoftware


Facebook: http://www.facebook.com/tianlesoftware


Linkedin: http://cn.linkedin.com/in/tianlesoftware

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/500314/viewspace-1269863/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-07-29

  • 博文量
    137
  • 访问量
    558607