一次在Oracle 11g 11.2.0 .2的patch記錄
Bug:10317487
Problem:
tag=TAG20120129T220012 comment=NONE
channel ch2: backup set complete, elapsed time: 00:35:59
released channel: ch1
released channel: ch2
released channel: ch3
released channel: ch4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ch4 channel at 01/29/2012 22:33:19
ORA-00245: control file backup operation failed
Action:
1、升級 OPatch
2、Patch
這邊值得一提的是,在有些patch中,是可以online上patch的。這不同我以往的經驗。Readme中寫到:
(2) Installation
-----------------
This section describes the following modes you can use to install the combo patch. Use the one that best suits your requirement.
- Installing in Offline Mode
- Installing in Online Mode
這讓我很爽,不用安排時間去停機,也不用一台一台的重開關的。
但,有些問題還是要知道的。
升級的程序中,寫了指令:
- For RAC Environments:
$ opatch apply online -connectString [SID_Node1]:[Username_Node1]:[Password_Node1]:[Node1_Name],[SID_Node2]:[Username_Node2]:[Password_Node2]:[Node2_Name],[SID_NodeN]:[Username_NodeN]:[Password_NodeN]:[NodeN_Name] [PATCH_TOP_DIR]/12679138
哇,又是sid,又是username ,又是password,還有一個叫node的。
沒關係我是dba,要什麼我都有。
/oracle/db/OPatch/opatch apply online -connectString MySID1:sys:[MyPassWd]:MyNode1,MySID2:sys:[MyPassWd]: MyNode2 /home/oracle/Patch/12679138
執行結果告訴我語法錯誤。切,我最恨這種狀況了。
查了一下optach apply –help 指令,有一個 –all_nodes可用,因此改了一下語法:
/oracle/db/OPatch/opatch apply online -all_nodes /home/oracle/Patch/12679138
Syntax Error... Unrecognized Option for Apply
○ 歐 ~ NO~
再試了一次
/oracle/db/OPatch/opatch apply online
The patch should be applied/rolled back in '-all_nodes' mode only.
Converting the RAC mode to '-all_nodes' mode.
Applying interim patch '12679138' to OH '/oracle/db'
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckForInputValues" failed.
The details are:
Patch 12679138 :
Online patching requires -connectString option.
很好,查出這個patch要用-all_nodes這個參數…再往下看。
Oh~ no,還是一定要用-connectString來跑。
看來要騙它還要有點技巧。
不死心,再用一個opatch apply –help看一下參數用法。
-connectString
This option can be used to specify the list of database
instances on which the patch needs to be applied. The
value for this option is specified as per the following
syntax "SID:User:Passwd:Node". The SID is a must, others
can be ignored, OPatch takes default values for it.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to
patch just the local node, provide the node name as
empty string.
看到了,我可以偷吃步了。 可以省略username,password,node那真是太好了。
因此我把我的指令改為:
/oracle/db/OPatch/opatch apply online -connectString MySID1:::,MySID2:::
結果:
DB Instance "MySID2" is down or the given SID is invalid.
嘿,第一個ok了,看來第二個要給機器的名稱了。
補上後,就可以運作了。
附上結果
The patch should be applied/rolled back in '-all_nodes' mode only.
Converting the RAC mode to '-all_nodes' mode.
Applying interim patch '12679138' to OH '/oracle/db'
Verifying environment and performing prerequisite checks...
All checks passed.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
Backing up files...
Patching component oracle.rdbms, 11.2.0 .2.0...
The patch will be installed on active database instances.
Installing and enabling the online patch 'bug12679138.pch', on database 'MYSID1'.
Patching in all-node mode.
Updating nodes 'MyNode02'
Apply-related files are:
FP = "/oracle/db/.patch_storage/12679138_Jun_21_2011_18_29_05/rac/copy_files.txt"
DP = "/oracle/db/.patch_storage/12679138_Jun_21_2011_18_29_05/rac/copy_dirs.txt"
MP = "/oracle/db/.patch_storage/12679138_Jun_21_2011_18_29_05/rac/make_cmds.txt"
RC = "/oracle/db/.patch_storage/12679138_Jun_21_2011_18_29_05/rac/remote_cmds.txt"
Instantiating the file "/oracle/db/.patch_storage/12679138_Jun_21_2011_18_29_05/rac/copy_files.txt.instantiated" by replacing $ORACLE_HOME in "/oracle/db/.patch_storage/12679138_Jun_21_2011_18_29_05/rac/copy_files.txt" with actual path.
Propagating files to remote nodes...
Instantiating the file "/oracle/db/.patch_storage/12679138_Jun_21_2011_18_29_05/rac/copy_dirs.txt.instantiated" by replacing $ORACLE_HOME in "/oracle/db/.patch_storage/12679138_Jun_21_2011_18_29_05/rac/copy_dirs.txt" with actual path.
Propagating directories to remote nodes...
Installing and enabling the online patch 'bug12679138.pch', on database 'MYSID2' on node 'MyNode02'.
Patch 12679138 successfully applied
Log file location: /oracle/db/cfgtoollogs/opatch/opatch2012-01-29 _23-45-54PM.log
OPatch succeeded.
沒有留言:
張貼留言