RAC資料庫中用opatch應用補丁
在RAC資料庫中用opatch應該補丁,可以一個一個節點進行;如果條件容許,可以多個節點一起進行,在Oracle10.2.0.3.4開始還可以一次應用多個補丁。
[@more@] apply -h
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..
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..
DESCRIPTION
This operation applies an interim patch to an ORACLE_HOME from
the current directory. The patch location can specified using
the parameter patch_location.
SYNTAX
opatch apply [-delay ] [ -force ]
[-invPtrLoc ] [-jdk ]
[-jre ] [-local ] [-minimize_downtime ]
[-no_bug_superset ] [-no_inventory ]
[-oh ] [-retry ] [-silent ]
[-verbose ] [-no_relink] [-pre pre script in escaped double quotes> [-opatch_pre_end] ]
[-post quotes> [-opatch_post_end] ] [-no_sysmod]
[-property_file]
[-local_node]
[-remote_nodes
opatch apply [-delay
[-invPtrLoc
[-jre
[-no_bug_superset ] [-no_inventory ]
[-oh
[-verbose ] [-no_relink] [-pre
[-post
[-property_file
[-local_node
[-remote_nodes
- ]
[
OPTIONS
-all_nodes
Apply the patch using all-node mode.
-all_nodes
Apply the patch using all-node mode.
......
-local_node
This option can be used to specify to OPatch the local
node name to be used for RAC mode application of the patch
This option can be used to specify to OPatch the local
node name to be used for RAC mode application of the patch
-remote_nodes
This option can be used to specify to OPatch the list
of remote nodes to be used for RAC mode application of
the patch. The node names are comma separated and
without spaces
This option can be used to specify to OPatch the list
of remote nodes to be used for RAC mode application of
the patch. The node names are comma separated and
without spaces
停止應用應用補丁
stop service -d mdzj
stop instance -d mdzj -i mdzj1,mdzj2
stop nodeapps -n zj1
stop nodeapps -n zj2
-t
Name Type Target State Host
------------------------------------------------------------
ora.mdzj.db application OFFLINE OFFLINE
ora....j1.inst application OFFLINE OFFLINE
ora....j2.inst application OFFLINE OFFLINE
ora.....zj1.cs application OFFLINE OFFLINE
ora....zj1.srv application OFFLINE OFFLINE
ora....zj2.srv application OFFLINE OFFLINE
ora.....zj2.cs application OFFLINE OFFLINE
ora....zj1.srv application OFFLINE OFFLINE
ora....zj2.srv application OFFLINE OFFLINE
ora.....zj3.cs application OFFLINE OFFLINE
ora....zj1.srv application OFFLINE OFFLINE
ora....zj2.srv application OFFLINE OFFLINE
ora....J1.lsnr application OFFLINE OFFLINE
ora.zj1.gsd application OFFLINE OFFLINE
ora.zj1.ons application OFFLINE OFFLINE
ora.zj1.vip application OFFLINE OFFLINE
ora....J2.lsnr application OFFLINE OFFLINE
ora.zj2.gsd application OFFLINE OFFLINE
ora.zj2.ons application OFFLINE OFFLINE
ora.zj2.vip application OFFLINE OFFLINE
>
stop instance -d mdzj -i mdzj1,mdzj2
stop nodeapps -n zj1
stop nodeapps -n zj2
-t
Name Type Target State Host
------------------------------------------------------------
ora.mdzj.db application OFFLINE OFFLINE
ora....j1.inst application OFFLINE OFFLINE
ora....j2.inst application OFFLINE OFFLINE
ora.....zj1.cs application OFFLINE OFFLINE
ora....zj1.srv application OFFLINE OFFLINE
ora....zj2.srv application OFFLINE OFFLINE
ora.....zj2.cs application OFFLINE OFFLINE
ora....zj1.srv application OFFLINE OFFLINE
ora....zj2.srv application OFFLINE OFFLINE
ora.....zj3.cs application OFFLINE OFFLINE
ora....zj1.srv application OFFLINE OFFLINE
ora....zj2.srv application OFFLINE OFFLINE
ora....J1.lsnr application OFFLINE OFFLINE
ora.zj1.gsd application OFFLINE OFFLINE
ora.zj1.ons application OFFLINE OFFLINE
ora.zj1.vip application OFFLINE OFFLINE
ora....J2.lsnr application OFFLINE OFFLINE
ora.zj2.gsd application OFFLINE OFFLINE
ora.zj2.ons application OFFLINE OFFLINE
ora.zj2.vip application OFFLINE OFFLINE
>
/soft/patch/5471564
apply -all_nodes
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..
Copyright (c) 2005, Oracle Corporation. All rights reserved..
Oracle Home : /u01/app/oracle/product/10.2.0/db
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.3.0
OUI version : 10.2.0.3.0
OUI location : /u01/app/oracle/product/10.2.0/db/oui
Log file location : /u01/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2008-04-16_14-06-39PM.log
ApplySession applying interim patch '5471564' to OH '/u01/app/oracle/product/10.2.0/db'
Invoking fuser to check for active processes.
Invoking fuser on "/u01/app/oracle/product/10.2.0/db/lib/libjox10.a"
Invoking fuser to check for active processes.
Invoking fuser on "/u01/app/oracle/product/10.2.0/db/lib/libjox10.a"
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: 'zj2'
Local node: 'zj1'
Please shut down Oracle instances running out of this ORACLE_HOME on all the nodes.
(Oracle Home = '/u01/app/oracle/product/10.2.0/db')
Are all the nodes 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 '5471564' for restore. This might take a while...
Backing up files affected by the patch '5471564' for rollback. This might take a while...
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 '5471564' for restore. This might take a while...
Backing up files affected by the patch '5471564' for rollback. This might take a while...
Patching component oracle.javavm.server, 10.2.0.3.0...
Copying file to "/u01/app/oracle/product/10.2.0/db/lib/libjox10.a"
Copying file to "/u01/app/oracle/product/10.2.0/db/lib/libjox10.a"
The following actions have failed:
Copy failed from '/soft/patch/5471564/files/lib/libjox10.a' to '/u01/app/oracle/product/10.2.0/db/lib/libjox10.a'...
Copy failed from '/soft/patch/5471564/files/lib/libjox10.a' to '/u01/app/oracle/product/10.2.0/db/lib/libjox10.a'...
Do you want to proceed? [y|n]
y
User Responded with: Y
ApplySession adding interim patch '5471564' to inventory
Verifying the update...
Inventory check OK: Patch ID 5471564 is registered in Oracle Home inventory with proper meta-data.
Copy failed: failed to update "/u01/app/oracle/product/10.2.0/db/lib/libjox10.a" with updated "/soft/patch/5471564/files/lib/libjox10.a"
Inventory check OK: Patch ID 5471564 is registered in Oracle Home inventory with proper meta-data.
Copy failed: failed to update "/u01/app/oracle/product/10.2.0/db/lib/libjox10.a" with updated "/soft/patch/5471564/files/lib/libjox10.a"
ApplySession failed: ApplySession failed in system modification phase... 'Verification of patch failed: null'
OPatch will attempt to restore the system...
Restoring the Oracle Home...
Checking if OPatch needs to invoke 'make' to restore some binaries...
OPatch was able to restore your system. Look at log file and timestamp of each file to make sure your system is in the state prior to applying the patch.
--------------------------------------------------------------------------------
The following warnings have occurred during OPatch execution:
1) OUI-67124:Copy failed from '/soft/patch/5471564/files/lib/libjox10.a' to '/u01/app/oracle/product/10.2.0/db/lib/libjox10.a'...
OPatch will attempt to restore the system...
Restoring the Oracle Home...
Checking if OPatch needs to invoke 'make' to restore some binaries...
OPatch was able to restore your system. Look at log file and timestamp of each file to make sure your system is in the state prior to applying the patch.
--------------------------------------------------------------------------------
The following warnings have occurred during OPatch execution:
1) OUI-67124:Copy failed from '/soft/patch/5471564/files/lib/libjox10.a' to '/u01/app/oracle/product/10.2.0/db/lib/libjox10.a'...
--------------------------------------------------------------------------------
OPatch failed with error code 73
在兩個節點上執行/usr/sbin/slibclean
從記憶體中清除一些當前不用的modules
後重新應用patch
apply -all_nodes
Invoking OPatch 10.2.0.3.0
apply -all_nodes
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..
Copyright (c) 2005, Oracle Corporation. All rights reserved..
Oracle Home : /u01/app/oracle/product/10.2.0/db
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.3.0
OUI version : 10.2.0.3.0
OUI location : /u01/app/oracle/product/10.2.0/db/oui
Log file location : /u01/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2008-04-16_14-09-23PM.log
ApplySession applying interim patch '5471564' to OH '/u01/app/oracle/product/10.2.0/db'
Invoking fuser to check for active processes.
Invoking fuser on "/u01/app/oracle/product/10.2.0/db/lib/libjox10.a"
Invoking fuser to check for active processes.
Invoking fuser on "/u01/app/oracle/product/10.2.0/db/lib/libjox10.a"
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: 'zj2'
Local node: 'zj1'
Please shut down Oracle instances running out of this ORACLE_HOME on all the nodes.
(Oracle Home = '/u01/app/oracle/product/10.2.0/db')
Are all the nodes 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 '5471564' for restore. This might take a while...
Backing up files affected by the patch '5471564' for rollback. This might take a while...
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 '5471564' for restore. This might take a while...
Backing up files affected by the patch '5471564' for rollback. This might take a while...
Patching component oracle.javavm.server, 10.2.0.3.0...
Copying file to "/u01/app/oracle/product/10.2.0/db/lib/libjox10.a"
ApplySession adding interim patch '5471564' to inventory
Copying file to "/u01/app/oracle/product/10.2.0/db/lib/libjox10.a"
ApplySession adding interim patch '5471564' to inventory
Verifying the update...
Inventory check OK: Patch ID 5471564 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 5471564 are present in Oracle Home.
Inventory check OK: Patch ID 5471564 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 5471564 are present in Oracle Home.
Patching in all-node mode.
Updating nodes 'zj2'
Apply-related files are:
FP = "/u01/app/oracle/product/10.2.0/db/.patch_storage/5471564_Jan_21_2008_04_46_49/rac/copy_files.txt"
DP = "/u01/app/oracle/product/10.2.0/db/.patch_storage/5471564_Jan_21_2008_04_46_49/rac/copy_dirs.txt"
MP = "/u01/app/oracle/product/10.2.0/db/.patch_storage/5471564_Jan_21_2008_04_46_49/rac/make_cmds.txt"
Apply-related files are:
FP = "/u01/app/oracle/product/10.2.0/db/.patch_storage/5471564_Jan_21_2008_04_46_49/rac/copy_files.txt"
DP = "/u01/app/oracle/product/10.2.0/db/.patch_storage/5471564_Jan_21_2008_04_46_49/rac/copy_dirs.txt"
MP = "/u01/app/oracle/product/10.2.0/db/.patch_storage/5471564_Jan_21_2008_04_46_49/rac/make_cmds.txt"
Instantiating the file "/u01/app/oracle/product/10.2.0/db/.patch_storage/5471564_Jan_21_2008_04_46_49/rac/copy_files.txt.instantiated" by replacing $ORACLE_HOME in "/u01/app/oracle/product/10.2.0/db/.patch_storage/5471564_Jan_21_2008_04_46_49/rac/copy_files.txt" with actual path.
Propagating files to remote nodes...
Instantiating the file "/u01/app/oracle/product/10.2.0/db/.patch_storage/5471564_Jan_21_2008_04_46_49/rac/copy_dirs.txt.instantiated" by replacing $ORACLE_HOME in "/u01/app/oracle/product/10.2.0/db/.patch_storage/5471564_Jan_21_2008_04_46_49/rac/copy_dirs.txt" with actual path.
Propagating directories to remote nodes...
Propagating files to remote nodes...
Instantiating the file "/u01/app/oracle/product/10.2.0/db/.patch_storage/5471564_Jan_21_2008_04_46_49/rac/copy_dirs.txt.instantiated" by replacing $ORACLE_HOME in "/u01/app/oracle/product/10.2.0/db/.patch_storage/5471564_Jan_21_2008_04_46_49/rac/copy_dirs.txt" with actual path.
Propagating directories to remote nodes...
All nodes have been patched. You may start Oracle instances on the local system and nodes 'zj2'
OPatch succeeded.
>
ok,應用成功
檢視補丁有沒有應用到系統:
lsinventory|grep 5471564
Patch 5471564 : applied on Wed Apr 16 14:09:43 GMT+08:00 2008
Patch 5471564 : applied on Wed Apr 16 14:09:43 GMT+08:00 2008
lsinventory|grep 5471564
Patch 5471564 : applied on Wed Apr 16 14:09:43 GMT+08:00 2008
Patch 5471564 : applied on Wed Apr 16 14:09:43 GMT+08:00 2008
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15385/viewspace-1002614/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- EBS opatch 補丁應用
- 【opatch】Oracle打補丁工具opatch簡介Oracle
- Oracle的OPatch補丁更新Oracle
- 資料庫補丁索引資料庫索引
- 使用OPatch給Oracle打補丁Oracle
- opatch 工具打補丁使用說明
- oracle 9204 補丁應用工具opatch相關小述Oracle
- Oracle資料庫打補丁方法Oracle資料庫
- 如何檢視Oracle補丁 - opatch 的使用Oracle
- Oracle RAC更新補丁Oracle
- Oracle資料庫升級與補丁Oracle資料庫
- 給Oracle資料庫打補丁(轉)Oracle資料庫
- Oracle 補丁體系 及 opatch 工具 介紹Oracle
- Oracle資料庫PSU補丁安裝Oracle資料庫
- oracle資料庫高危漏洞補丁集安裝Oracle資料庫
- 在RAC中用NID修改資料庫名稱資料庫
- vm server RAC--補丁Server
- oracle 資料庫版本對應的psu和補丁號碼Oracle資料庫
- 資料庫Oracle 11g RAC手動打GI PSU補丁(11.2.0.4.8)資料庫Oracle
- 資料庫Patchsets 補丁號碼快速參考資料庫
- Oracle將釋出新的資料庫補丁程式Oracle資料庫
- 打補丁報錯Opatch error : "Unable to lock Central InventoryError
- oracle opatch 工具的使用(oracle小補丁安裝)(轉)Oracle
- 安裝oraInventory和使用opatch給Oracle打補丁AIOracle
- zt_使用opatch給oracle打補丁patch_bugOracle
- adpatch 時是否需要停應用,opatch是否需要停資料庫資料庫
- EBS R12應用通過opatch打補丁提示: Cannot open the file: /etc/oraInst.locAI
- 資料庫打完11.1.0.7.12補丁後資料庫啟動失敗資料庫
- 檢視資料庫版本與補丁的版本資訊資料庫
- Oracle 資料庫 PSU 的補丁號變化Oracle資料庫
- 檢查資料庫CPU和PSU補丁資訊資料庫
- 資料庫的升級和打補丁的研究資料庫
- 摘:Oracle資料庫補丁分類、安裝及管理Oracle資料庫
- 【opatch打補丁】oracle10.2.0.5.0升級10.2.0.5.9 for linuxOracleLinux
- ORACLE 10G RAC 升級補丁Oracle 10g
- 資料庫補丁衝突解決方案 (文件 ID 1674432.1)資料庫
- Pycharn破解補丁啟用
- Oracle RAC 19.3打19.5.1 RU補丁Oracle