记录一次rolling mode给oracle打补丁

数据库是RAC,需要打一个关于library cache 的补丁,使用rolling mode,将停机时间缩短到最小。

先停止第一个节点的数据库和crs,使用opatch apply打补丁

[oracle@XXRAC1 7122093]$ opatch apply
Invoking OPatch 10.2.0.4.9

Oracle Interim Patch Installer version 10.2.0.4.9
Copyright (c) 2009, Oracle Corporation.  All rights reserved.


Oracle Home       : /oracle/product/10.2.0/db
Central Inventory : /oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.9
OUI version       : 10.2.0.4.0
OUI location      : /oracle/product/10.2.0/db/oui
Log file location : /oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2015-10-15_21-51-19PM.log

Patch history file: /oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt

ApplySession applying interim patch '7122093' to OH '/oracle/product/10.2.0/db'

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: 'xxrac2' 
Local node: 'xxrac1'
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/oracle/product/10.2.0/db')


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 '7122093' for restore. This might take a while...
Backing up files affected by the patch '7122093' for rollback. This might take a while...

Patching component oracle.rdbms, 10.2.0.4.0...
Updating archive file "/oracle/product/10.2.0/db/lib/libserver10.a"  with "lib/libserver10.a/kqlf.o"
Updating archive file "/oracle/product/10.2.0/db/lib/libserver10.a"  with "lib/libserver10.a/kqf.o"

Patching component oracle.rdbms.rsf, 10.2.0.4.0...
Updating archive file "/oracle/product/10.2.0/db/lib/libgeneric10.a"  with "lib/libgeneric10.a/kgl2.o"

Patching component oracle.rsf.hybrid, 10.2.0.4.0...
Updating archive file "/oracle/product/10.2.0/db/lib32/libgeneric10.a"  with "lib32/libgeneric10.a/kgl2.o"
Running make for target ikfod
Running make for target ioracle
Running make for target client_sharedlib
ApplySession adding interim patch '7122093' to inventory

Verifying the update...
Inventory check OK: Patch ID 7122093 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 7122093 are present in Oracle Home.

The local system has been patched.  You can restart Oracle instances on it.


Patching in rolling mode.


The node 'xxrac2' will be patched next.


Please shutdown Oracle instances running out of this ORACLE_HOME on 'xxrac2'.
(Oracle Home = '/oracle/product/10.2.0/db')

Is the node ready for patching? [y|n]

到这一步的时候,节点1的补丁已经打好了,这个时候就可以启动节点1,并且关闭节点2的CRS,为下面打补丁做准备。节点2资源都关闭之后,输入y
y   
User Responded with: Y
Updating nodes 'xxrac2' 
   Apply-related files are:
     FP = "/oracle/product/10.2.0/db/.patch_storage/7122093_Nov_18_2010_09_32_26/rac/copy_files.txt"
     DP = "/oracle/product/10.2.0/db/.patch_storage/7122093_Nov_18_2010_09_32_26/rac/copy_dirs.txt"
     MP = "/oracle/product/10.2.0/db/.patch_storage/7122093_Nov_18_2010_09_32_26/rac/make_cmds.txt"
     RC = "/oracle/product/10.2.0/db/.patch_storage/7122093_Nov_18_2010_09_32_26/rac/remote_cmds.txt"

Instantiating the file "/oracle/product/10.2.0/db/.patch_storage/7122093_Nov_18_2010_09_32_26/rac/copy_files.txt.instantiated" by replacing $ORACLE_HOME in "/oracle/product/10.2.0/db/.patch_storage/7122093_Nov_18_2010_09_32_26/rac/copy_files.txt" with actual path.
Propagating files to remote nodes...
Instantiating the file "/oracle/product/10.2.0/db/.patch_storage/7122093_Nov_18_2010_09_32_26/rac/copy_dirs.txt.instantiated" by replacing $ORACLE_HOME in "/oracle/product/10.2.0/db/.patch_storage/7122093_Nov_18_2010_09_32_26/rac/copy_dirs.txt" with actual path.
Propagating directories to remote nodes...
Instantiating the file "/oracle/product/10.2.0/db/.patch_storage/7122093_Nov_18_2010_09_32_26/rac/make_cmds.txt.instantiated" by replacing $ORACLE_HOME in "/oracle/product/10.2.0/db/.patch_storage/7122093_Nov_18_2010_09_32_26/rac/make_cmds.txt" with actual path.
Running command on remote node 'xxrac2': 
cd /oracle/product/10.2.0/db/rdbms/lib; /usr/bin/make -f ins_rdbms.mk ikfod ORACLE_HOME=/oracle/product/10.2.0/db || echo REMOTE_MAKE_FAILED::>&2 

Running command on remote node 'xxrac2': 
cd /oracle/product/10.2.0/db/rdbms/lib; /usr/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/oracle/product/10.2.0/db || echo REMOTE_MAKE_FAILED::>&2 

Running command on remote node 'xxrac2': 
cd /oracle/product/10.2.0/db/network/lib; /usr/bin/make -f ins_net_client.mk client_sharedlib ORACLE_HOME=/oracle/product/10.2.0/db || echo REMOTE_MAKE_FAILED::>&2 


The node 'xxrac2' has been patched.  You can restart Oracle instances on it.

There were relinks on remote nodes.  Remember to check the binary size and timestamp on the nodes 'xxrac2' .
The following make commands were invoked on remote nodes:
'cd /oracle/product/10.2.0/db/rdbms/lib; /usr/bin/make -f ins_rdbms.mk ikfod ORACLE_HOME=/oracle/product/10.2.0/db
cd /oracle/product/10.2.0/db/rdbms/lib; /usr/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/oracle/product/10.2.0/db
cd /oracle/product/10.2.0/db/network/lib; /usr/bin/make -f ins_net_client.mk client_sharedlib ORACLE_HOME=/oracle/product/10.2.0/db
'


OPatch succeeded.
[oracle@XXRAC1 7122093]$ opatch lsinventory
Invoking OPatch 10.2.0.4.9

Oracle Interim Patch Installer version 10.2.0.4.9
Copyright (c) 2009, Oracle Corporation.  All rights reserved.


Oracle Home       : /oracle/product/10.2.0/db
Central Inventory : /oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.9
OUI version       : 10.2.0.4.0
OUI location      : /oracle/product/10.2.0/db/oui
Log file location : /oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2015-10-15_21-59-11PM.log

Patch history file: /oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /oracle/product/10.2.0/db/cfgtoollogs/opatch/lsinv/lsinventory2015-10-15_21-59-11PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2): 

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3                            10.2.0.4.0
There are 2 products installed in this Oracle Home.


Interim patches (1) :

Patch  7122093      : applied on Thu Oct 15 21:52:43 CST 2015
Unique Patch ID:  13156169
   Created on 18 Nov 2010, 09:32:26 hrs PST8PDT
   Bugs fixed:
     7122093



Rac system comprising of multiple nodes
  Local node = xxrac1
  Remote node = xxrac2

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

OPatch succeeded.



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值