Chinaunix首页 | 论坛 | 博客
  • 博客访问: 31560
  • 博文数量: 7
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 75
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-02 16:51
文章分类

全部博文(7)

文章存档

2011年(3)

2010年(4)

我的朋友
最近访客

分类: Oracle

2010-05-24 15:30:02

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

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

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

    2、打补丁;

    3、启实例1;

    4、停实例2;

    5、打补丁;

    6、启实例2。

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

如何查看patch是否为rolling patch:

1.在补丁目录:/etc/config下,有一个inventory文件,其中有一项:

              <online_rac_installable>trueonline_rac_installable>

若为true则为rolling patch

2.还可以使用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.

阅读(1725) | 评论(0) | 转发(1) |
0

上一篇:乐观锁和悲观锁

下一篇:共享锁和排它锁

给主人留下些什么吧!~~