--打patch之前需要停止所有的oracle应用,包括数据库、asm实例、监听程序、如果是rac环境还包括nodeapps和crs;
--我们这里的环境是rac环境
--将opatch命令的路径包含在PATH变量中
$ pwd
/opt/oracle/product/RAC10g/OPatch
$ export PATH=$PATH:/opt/oracle/product/RAC10g/OPatch
--进入patch相应的目录,这次的bug编号为6136074,目录与bug编号相同
--将下载的patch文件解压后会生成这个目录
$ cd /opt/oracle/patch
$ ls
6136074 p6136074_10203_HPUX-IA64.zip
$ cd 6*
$ pwd
/opt/oracle/patch/6136074
--执行opatch apply 开始应用patch
$ opatch apply
Invoking OPatch 10.2.0.3.0
Oracle interim Patch Installer version 10.2.0.3.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..
Oracle Home : /opt/oracle/product/RAC10g
Central Inventory : /opt/oracle/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 10.2.0.3.0
OUI version : 10.2.0.3.0
OUI location : /opt/oracle/product/RAC10g/oui
Log file location : /opt/oracle/product/RAC10g/cfgtoollogs/opatch/opatch2008-11-16_00-13-32AM.log
ApplySession applying interim patch '6136074' to OH '/opt/oracle/product/RAC10g'
Invoking fuser to check for active processes.
Invoking fuser on "/opt/oracle/product/RAC10g/bin/oracle"
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: 'yxyyhisb'
Local node: 'yxyyhisa'
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/opt/oracle/product/RAC10g')
Is the local system ready for patching?
Do you want to proceed? [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 '6136074' for restore. This might take a while...
Backing up files affected by the patch '6136074' for rollback. This might take a while...
Patching component oracle.rdbms, 10.2.0.3.0...
Updating archive file "/opt/oracle/product/RAC10g/lib/libserver10.a" with "lib/libserver10.a/cvw.o"
ApplySession adding interim patch '6136074' to inventory
Verifying the update...
Inventory check OK: Patch ID 6136074 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 6136074 are present in Oracle Home.
Running make for target ioracle
--这里提示本地节点已经应用完成,可以启动本地的数据库了
The local system has been patched. You can restart Oracle instances on it.
--提示处于滚动升级模式,将升级rac中的另一个节点yxyyhisb
Patching in rolling mode.
The node 'yxyyhisb' will be patched next.
Please shutdown Oracle instances running out of this ORACLE_HOME on 'yxyyhisb'.
(Oracle Home = '/opt/oracle/product/RAC10g')
Is the node ready for patching?
Do you want to proceed? [y|n]
y
User Responded with: Y
Updating nodes 'yxyyhisb'
Apply-related files are:
FP = "/opt/oracle/product/RAC10g/.patch_storage/6136074_Feb_4_2008_14_31_00/rac/copy_files.txt"
DP = "/opt/oracle/product/RAC10g/.patch_storage/6136074_Feb_4_2008_14_31_00/rac/copy_dirs.txt"
MP = "/opt/oracle/product/RAC10g/.patch_storage/6136074_Feb_4_2008_14_31_00/rac/make_cmds.txt"
Instantiating the file "/opt/oracle/product/RAC10g/.patch_storage/6136074_Feb_4_2008_14_31_00/rac/copy_files.txt.instantiated" by replacing $ORACLE_HOME in "/opt/oracle/product/RAC10g/.patch_storage/6136074_Feb_4_2008_14_31_00/rac/copy_files.txt" with actual path.
Propagating files to remote nodes...
Instantiating the file "/opt/oracle/product/RAC10g/.patch_storage/6136074_Feb_4_2008_14_31_00/rac/copy_dirs.txt.instantiated" by replacing $ORACLE_HOME in "/opt/oracle/product/RAC10g/.patch_storage/6136074_Feb_4_2008_14_31_00/rac/copy_dirs.txt" with actual path.
Propagating directories to remote nodes...
Instantiating the file "/opt/oracle/product/RAC10g/.patch_storage/6136074_Feb_4_2008_14_31_00/rac/make_cmds.txt.instantiated" by replacing $ORACLE_HOME in "/opt/oracle/product/RAC10g/.patch_storage/6136074_Feb_4_2008_14_31_00/rac/make_cmds.txt" with actual path.
Running command on remote node 'yxyyhisb': cd /opt/oracle/product/RAC10g/rdbms/lib; /usr/ccs/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/opt/oracle/product/RAC10g || echo REMOTE_MAKE_FAILED::>&2
The node 'yxyyhisb' 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 'yxyyhisb' .
The following make commands were invoked on remote nodes:
'cd /opt/oracle/product/RAC10g/rdbms/lib; /usr/ccs/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/opt/oracle/product/RAC10g
'
OPatch succeeded.
--patch应用成功后,可以用opatch query查询更新情况
$ opatch query
Invoking OPatch 10.2.0.3.0
Oracle interim Patch Installer version 10.2.0.3.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..
Oracle Home : /opt/oracle/product/RAC10g
Central Inventory : /opt/oracle/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 10.2.0.3.0
OUI version : 10.2.0.3.0
OUI location : /opt/oracle/product/RAC10g/oui
Log file location : /opt/oracle/product/RAC10g/cfgtoollogs/opatch/opatch2008-11-16_00-17-20AM.log
--------------------------------------------------------------------------------
Patch created on 4 Feb 2008, 14:31:00 hrs PST8PDT
Need to shutdown Oracle instances: true
Patch is roll-backable: true
Patch is a rolling patch: true
List of platforms supported:
197: HP IA64 HPUNIX
List of bugs to be fixed:
6136074: ORA-4068 ORA-4065 ORA-06508 ERRORS SIGNALED FOR VALID OBJECTS
List of executables affected:
ORACLE_HOME/bin/oracle
List of required components:
oracle.rdbms: 10.2.0.3.0
List of required actions:
Update /opt/oracle/product/RAC10g/lib/libserver10.a with /cvw.o
cd /opt/oracle/product/RAC10g/rdbms/lib
; make -f ins_rdbms.mk ioracle ORACLE_HOME=/opt/oracle/product/RAC10g
Possible XML representation of the patch:
6136074
--------------------------------------------------------------------------------
OPatch succeeded
![ip地址已设置保密](skins/Default/ip.gif)
转载于:http://blog.itpub.net/25243263/viewspace-696294/