[转帖]What is rolling patch_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3834 | 回复: 0   主题: [转帖]What is rolling patch        下一篇 
kim
注册用户
等级:中校
经验:1729
发帖:222
精华:0
注册:2011-7-21
状态:离线
发送短消息息给kim 加好友    发送短消息息给kim 发消息
发表于: IP:您无权察看 2011-9-13 15:56:31 | [全部帖] [楼主帖] 楼主

所谓的rolling patch,最大的特点在于,允许RAC环境下,不同实例运行在不同的数据库版本上,当然这个不同,指的是打上rolling patch后造成的版本不一致:

This patch could be applied to the boxes in a cascaded fashion and the different instances they could be running with different versions of the code (the patch causes the code diff) and this is specific for certain patches which can be applied and would not affect the SGA structures and heaps.

比较让人容易误解的是,以为这是一种online patch,可以不用停数据库,在线打。

rolling patch 还是需要停实例打的。比如在两个节点的RAC环境中,可以按这样的步骤操作:
1、停实例1;2、打补丁;3、启实例1;
4、停实例2;5、打补丁;6、启实例2。

其中有一段时间,实例1、实例2同时启着,且数据库版本不一致,但数据库是不受影响,可以有效地减少停机时间。

如何查看patch是否为rolling patch:
在补丁目录:/etc/config下,有一个inventory文件,其中有一项:

<online_rac_installable>true</online_rac_installable>

若为true则为rolling patch

还可以使用opatch query命令:

Patch created on 18 Apr 2008, 02:57:01 hrs PST8PDT Need to shutdown Oracle instances: true Patch is roll-backable: true Patch is a "Patchset Update": false Patch is a rolling patch: true Patch has sql related actions: false Patch is an online patch: false Patch is a portal patch: false Patch is an "auto-enabled" patch: false

Patch is a rolling patch 一项true则为rolling patch。

昨天在测试环境上打了几个rolling patch,是加”local”选项,一个节点全打完,启动,再打另一个节点。
未加”local”选项时,则按提示起停实例即可,以下是网上搜到的一个打rolling patch日志,供大家参考(原链接已不能用,用Google快照打开的,不附出处了):

[oracle@gr7251 9004119]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch apply Invoking OPatch 11.1.0.6.6   Oracle Interim Patch Installer version 11.1.0.6.6 Copyright (c) 2009, Oracle Corporation. All rights reserved.   Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /etc/oraInst.loc OPatch version : 11.1.0.6.6 OUI version : 11.2.0.1.0 OUI location : /u01/app/oracle/product/11.2.0/dbhome_1/oui Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2010-02-04_10-22-44AM.log   Patch history file: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch_history.txt   ApplySession applying interim patch '9004119' to OH '/u01/app/oracle/product/11.2.0/dbhome_1'   Running prerequisite checks...   OPatch detected the node list and the local node from the inventory. OPatch will patch the local system then propagate the patch to the remote nodes.     This node is part of an Oracle Real Application Cluster. Remote nodes: 'gr7265' 'gr7286' Local node: 'gr7251' Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/u01/app/oracle/product/11.2.0/dbhome_1')   Is the local system ready for patching? [y n] y User Responded with: Y Backing up files and inventory (not for auto-rollback) for the Oracle Home Backing up files affected by the patch '9004119' for restore. This might take a while... Backing up files affected by the patch '9004119' for rollback. This might take a while...   Patching component oracle.rdbms, 11.2.0.1.0... Copying file to "/u01/app/oracle/product/11.2.0/dbhome_1/bin/racone2rac" Copying file to "/u01/app/oracle/product/11.2.0/dbhome_1/bin/Omotion" Copying file to "/u01/app/oracle/product/11.2.0/dbhome_1/bin/raconefix" Copying file to "/u01/app/oracle/product/11.2.0/dbhome_1/bin/raconeinit" Copying file to "/u01/app/oracle/product/11.2.0/dbhome_1/bin/raconestatus" ApplySession adding interim patch '9004119' to inventory   Verifying the update... Inventory check OK: Patch ID 9004119 is registered in Oracle Home inventory with proper meta-data. Files check OK: Files from Patch ID 9004119 are present in Oracle Home.   The local system has been patched. You can restart Oracle instances on it.     Patching in rolling mode.   Remaining nodes to be patched: 'gr7265' 'gr7286' What is the next node to be patched? gr7265 You have selected 'gr7265' from 'gr7265' 'gr7286'   The node 'gr7265' will be patched next.   Please shutdown Oracle instances running out of this ORACLE_HOME on 'gr7265'. (Oracle Home = '/u01/app/oracle/product/11.2.0/dbhome_1')   Is the node ready for patching? [y n] y User Responded with: Y Updating nodes 'gr7265' Apply-related files are: FP = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_29_39/rac/copy_files.txt" DP = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_29_39/rac/copy_dirs.txt" MP = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_29_39/rac/make_cmds.txt" RC = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_29_39/rac/remote_cmds.txt"   Instantiating the file "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_29_39/rac/copy_files.txt.instantiated" by replacing $ORACLE_HOME in "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_29_39/rac/copy_files.txt" with actual path. Propagating files to remote nodes... Instantiating the file "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_29_39/rac/copy_dirs.txt.instantiated" by replacing $ORACLE_HOME in "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_29_39/rac/copy_dirs.txt" with actual path. Propagating directories to remote nodes...   The node 'gr7265' has been patched. You can restart Oracle instances on it.     The node 'gr7286' will be patched next.     Please shutdown Oracle instances running out of this ORACLE_HOME on 'gr7286'. (Oracle Home = '/u01/app/oracle/product/11.2.0/dbhome_1')   Is the node ready for patching? [y n] y User Responded with: Y Updating nodes 'gr7286' Apply-related files are: FP = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_29_39/rac/copy_files.txt" DP = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_29_39/rac/copy_dirs.txt" MP = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_29_39/rac/make_cmds.txt" RC = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_29_39/rac/remote_cmds.txt"   Propagating files to remote nodes... Propagating directories to remote nodes...   The node 'gr7286' has been patched. You can restart Oracle instances on it.     OPatch succeeded.




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论