opatch被異常中斷后的處理.doc_第1頁
opatch被異常中斷后的處理.doc_第2頁
opatch被異常中斷后的處理.doc_第3頁
opatch被異常中斷后的處理.doc_第4頁
opatch被異常中斷后的處理.doc_第5頁
已閱讀5頁,還剩27頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

今天在打一個(gè)patch的時(shí)候,已經(jīng)是用opatch執(zhí)行到了最后一個(gè)patch,一時(shí)手欠,沒看清楚telnet的窗口,不小心按下了ctrl+C,于是,opatch被中斷了。汗了,晚節(jié)不保?。≡俅螆?zhí)行opatch apply,報(bào)錯(cuò):$ opatch apply 6163771Invoking OPatch .6Oracle Interim Patch Installer version .6Copyright (c) 2009, Oracle Corporation. All rights reserved.Oracle Home : /oracle/app/oracle/product/10.2.0/db_1Central Inventory : /oracle/app/oracle/oraInventory from : /var/opt/oracle/oraInst.locOPatch version : .6OUI version : .0OUI location : /oracle/app/oracle/product/10.2.0/db_1/ouiLog file location : /oracle/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2009-04-08_16-29-59PM.logPatch history file: /oracle/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txtApplySession applying interim patch 6163771 to OH /oracle/app/oracle/product/10.2.0/db_1Running prerequisite checks.OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.(Oracle Home = /oracle/app/oracle/product/10.2.0/db_1)Is the local system ready for patching? y|nYUser Responded with: YBacking up files and inventory (not for auto-rollback) for the Oracle HomeBacking up files affected by the patch 6163771 for restore. This might take a while.Backing up files affected by the patch 6163771 for rollback. This might take a while.Patching component oracle.rdbms, .0.Updating archive file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a with lib/libserver10.a/kfc.oUpdating archive file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a with lib/libserver10.a/kfcb.oUpdating archive file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a with lib/libserver10.a/kfcl.oUpdating archive file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a with lib/libserver10.a/kfr.oUpdating archive file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a with lib/libserver10.a/kfrb.oThe following actions have failed:Archive not applied /arch/ora_patch/patch_ia/7409356/6163771/files/lib/libserver10.a/kfc.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not applied /arch/ora_patch/patch_ia/7409356/6163771/files/lib/libserver10.a/kfcb.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not applied /arch/ora_patch/patch_ia/7409356/6163771/files/lib/libserver10.a/kfcl.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not applied /arch/ora_patch/patch_ia/7409356/6163771/files/lib/libserver10.a/kfr.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not applied /arch/ora_patch/patch_ia/7409356/6163771/files/lib/libserver10.a/kfrb.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Do you want to proceed? y|nY User Responded with: YRunning make for target ioracleMake failed to invoke /usr/ccs/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/oracle/app/oracle/product/10.2.0/db_1.ld: I/O error, file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a: Fatal error.Stop.The following make actions have failed :Re-link fails on target ioracle.Do you want to proceed? y|nYUser Responded with: YApplySession adding interim patch 6163771 to inventoryVerifying the update.Inventory check OK: Patch ID 6163771 is registered in Oracle Home inventory with proper meta-data.ApplySession failed: ApplySession failed in system modification phase. Verification of patch failed: Error verification failed: ar: kfc.o not foundOPatch will attempt to restore the system.Restoring the Oracle Home.Checking if OPatch needs to invoke make to restore some binaries.Make failed to invoke /usr/ccs/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/oracle/app/oracle/product/10.2.0/db_1.ld: I/O error, file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a: Fatal error.Stop.-Failed to run make commands. They are stored in file /oracle/app/oracle/product/10.2.0/db_1/.patch_storage/6163771_Jun_19_2008_17_41_45/make.txtInvoke these commands manually to restore the binaries in the Oracle Home.OPatch failed to restore OH /oracle/app/oracle/product/10.2.0/db_1. Consult OPatch document to restore the home manually before proceeding.-The following warnings have occurred during OPatch execution:1) OUI-67124:Archive not applied /arch/ora_patch/patch_ia/7409356/6163771/files/lib/libserver10.a/kfc.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not applied /arch/ora_patch/patch_ia/7409356/6163771/files/lib/libserver10.a/kfcb.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not applied /arch/ora_patch/patch_ia/7409356/6163771/files/lib/libserver10.a/kfcl.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not applied /arch/ora_patch/patch_ia/7409356/6163771/files/lib/libserver10.a/kfr.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not applied /arch/ora_patch/patch_ia/7409356/6163771/files/lib/libserver10.a/kfrb.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. 2) OUI-67200:Make failed to invoke /usr/ccs/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/oracle/app/oracle/product/10.2.0/db_1.ld: I/O error, file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a: Fatal error.Stop.3) OUI-67124:Re-link fails on target ioracle.4) OUI-67200:Make failed to invoke /usr/ccs/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/oracle/app/oracle/product/10.2.0/db_1.ld: I/O error, file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a: Fatal error.Stop.-OPatch failed with error code 115$用opatch lsinventory檢查,發(fā)現(xiàn)這個(gè)patch還是已經(jīng)安裝上去了的:$ opatch lsinventoryInvoking OPatch .6Oracle Interim Patch Installer version .6Copyright (c) 2009, Oracle Corporation. All rights reserved.Oracle Home : /oracle/app/oracle/product/10.2.0/db_1Central Inventory : /oracle/app/oracle/oraInventory from : /var/opt/oracle/oraInst.locOPatch version : .6OUI version : .0OUI location : /oracle/app/oracle/product/10.2.0/db_1/ouiLog file location : /oracle/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2009-04-08_17-13-49PM.logPatch history file: /oracle/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txtLsinventory Output file location : /oracle/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2009-04-08_17-13-49PM.txt-Installed Top-level Products (2): Oracle Database 10g .0Oracle Database 10g Release 2 Patch Set 3 .0There are 2 products installed in this Oracle Home.Interim patches (18) :Patch 6163771 : applied on Wed Apr 08 17:12:16 SGT 2009 Created on 19 Jun 2008, 17:41:45 hrs US/Pacific Bugs fixed: 6163771Patch 6052226 : applied on Wed Apr 08 17:11:53 SGT 2009 Created on 15 Sep 2008, 03:10:44 hrs PST8PDT Bugs fixed: 6052226Patch 5868257 : applied on Wed Apr 08 16:24:42 SGT 2009 Created on 21 Oct 2008, 11:41:00 hrs PST8PDT Bugs fixed: 5868257-OPatch succeeded.$ok,既然你已經(jīng)在完成安裝的列表中了,那我卸載可以不?$ opatch rollback -id 6163771Invoking OPatch .6Oracle Interim Patch Installer version .6Copyright (c) 2009, Oracle Corporation. All rights reserved.Oracle Home : /oracle/app/oracle/product/10.2.0/db_1Central Inventory : /oracle/app/oracle/oraInventory from : /var/opt/oracle/oraInst.locOPatch version : .6OUI version : .0OUI location : /oracle/app/oracle/product/10.2.0/db_1/ouiLog file location : /oracle/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2009-04-08_18-47-48PM.logPatch history file: /oracle/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txtRollbackSession rolling back interim patch 6163771 from OH /oracle/app/oracle/product/10.2.0/db_1Running prerequisite checks.OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.(Oracle Home = /oracle/app/oracle/product/10.2.0/db_1)Is the local system ready for patching? y|nYUser Responded with: YBacking up files affected by the patch 6163771 for restore. This might take a while.Patching component oracle.rdbms, .0.Updating archive file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a with lib/libserver10.a/kfc.oUpdating archive file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a with lib/libserver10.a/kfcb.oUpdating archive file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a with lib/libserver10.a/kfcl.oUpdating archive file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a with lib/libserver10.a/kfr.oUpdating archive file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a with lib/libserver10.a/kfrb.oThe following actions have failed:Archive not rolled back /oracle/app/oracle/product/10.2.0/db_1/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfc.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not rolled back /oracle/app/oracle/product/10.2.0/db_1/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfcb.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not rolled back /oracle/app/oracle/product/10.2.0/db_1/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfcl.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not rolled back /oracle/app/oracle/product/10.2.0/db_1/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfr.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not rolled back /oracle/app/oracle/product/10.2.0/db_1/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfrb.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Do you want to proceed? y|nY User Responded with: YRunning make for target ioracleMake failed to invoke /usr/ccs/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/oracle/app/oracle/product/10.2.0/db_1.ld: I/O error, file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a: Fatal error.Stop.The following make actions have failed :Re-link fails on target ioracle.Do you want to proceed? y|nN User Responded with: NRollbackSession failed: RollbackSession failed in system modification phase. Re-link fails on target ioracle.OPatch will attempt to restore the system.Restoring the Oracle Home.Checking if OPatch needs to invoke make to restore some binaries.Make failed to invoke /usr/ccs/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/oracle/app/oracle/product/10.2.0/db_1.ld: I/O error, file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a: Fatal error.Stop.-Failed to run make commands. They are stored in file /oracle/app/oracle/product/10.2.0/db_1/.patch_storage/6163771_Jun_19_2008_17_41_45/make.txtInvoke these commands manually to restore the binaries in the Oracle Home.OPatch failed to restore OH /oracle/app/oracle/product/10.2.0/db_1. Consult OPatch document to restore the home manually before proceeding.-The following warnings have occurred during OPatch execution:1) OUI-67124:Archive not rolled back /oracle/app/oracle/product/10.2.0/db_1/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfc.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not rolled back /oracle/app/oracle/product/10.2.0/db_1/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfcb.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not rolled back /oracle/app/oracle/product/10.2.0/db_1/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfcl.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not rolled back /oracle/app/oracle/product/10.2.0/db_1/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfr.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. Archive not rolled back /oracle/app/oracle/product/10.2.0/db_1/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfrb.o to /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a. 2) OUI-67200:Make failed to invoke /usr/ccs/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/oracle/app/oracle/product/10.2.0/db_1.ld: I/O error, file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a: Fatal error.Stop.3) OUI-67124:Re-link fails on target ioracle.4) OUI-67200:Make failed to invoke /usr/ccs/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/oracle/app/oracle/product/10.2.0/db_1.ld: I/O error, file /oracle/app/oracle/product/10.2.0/db_1/lib/libserver10.a: Fatal error.Stop.-OPatch failed with error code 115$完蛋了,無論是重新apply還是rollback,都失敗了。在這個(gè)情況下,我們可以在$ORACLE_HOME找到一個(gè)隱含的文件夾,里面的rollback.sh和make.txt文件,來清楚已經(jīng)安裝的信息,從而讓我們重新安裝。因?yàn)樵谶M(jìn)行opatch的過程在,在$ORACLE_HOME下有個(gè)隱含目錄.patch_storage,在這個(gè)目錄下的對應(yīng)的目錄,$ cat rollback.sh#!/bin/sh# Copyright (c) 2009, Oracle Corporation. All rights reservedecho This script is going to rollback the changes made to system files onecho this Oracle Home only. It does not perform any of the following:echo - Inventory updateecho - Oracle binary re-linkecho - Running init/pre/post scriptsecho - Customized steps performed manually by userecho Please use this script with supervision from Oracle Technical Support.echo To rollback a patch, please use opatch rollback.echo NOTE: JDK should be present in the Oracle Home to rollback Java Archives.# Get ORACLE_HOME from environment variable ORACLE_HOMEOH=$ORACLE_HOME# Error out if OH is not setif $OH = ; then echo Oracle Home is not set. echo Please set env. variable ORACLE_HOME and try again. echo Script failed to proceed. exit 1fiecho About to modify Oracle Home( $OH )echo Do you want to proceed? Y/Nif $1 = -silent ; then response=Yelse read response;fiif $response = y | $response = Y ; then echo User responded with : Yelse echo User responded with : $response exit 0fiecho Date Time : date $OH/cfgtoollogs/opatch/opatch_history.txtecho Oracle Home : $OH $OH/cfgtoollogs/opatch/opatch_history.txtecho Command : rollback.sh $OH/cfgtoollogs/opatch/opatch_history.txtcd $OH/lib/usr/ccs/bin/ar -rc $OH/lib/libserver10.a $OH/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfc.ocd $OH/lib/usr/ccs/bin/ar -rc $OH/lib/libserver10.a $OH/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfcb.ocd $OH/lib/usr/ccs/bin/ar -rc $OH/lib/libserver10.a $OH/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfcl.ocd $OH/lib/usr/ccs/bin/ar -rc $OH/lib/libserver10.a $OH/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfr.ocd $OH/lib/usr/ccs/bin/ar -rc $OH/lib/libserver10.a $OH/.patch_storage/6163771_Jun_19_2008_17_41_45/files/lib/libserver10.a/kfrb.oecho Rollback script completed.另一個(gè)rollback.sh腳本用于回滾失敗的opatch執(zhí)行過程,和一個(gè)make.txt腳本用于回滾編譯ioracle的過程:cd $ORACLE_HOME/rdbms/lib;/usr/ccs/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=$ORACLE_HOME其實(shí)我們從回滾腳本可以具體的看到,第一個(gè)是將一些kfc.o,kfcb.o,kfcl.o的文件從libserver10.a中抽取出類備份且還原出來。也就是說,在執(zhí)行opatch的過程是將kfc.o,kfcb.o,kfcl.o等文件寫入到libserver10.a文件中的。第二步,重新編譯ioracle。因此,我們可以利用這2個(gè)腳本,和利用原來在opatch的時(shí)候,做的備份(注意,這里一定要用原來的備份,一定要做原來的kfc.o,kfcb.o,kfcl.o的文件,在后續(xù)的操作步驟中,請注意這點(diǎn)。),我們來進(jìn)行還原操作。操作步驟為:情況1,如果你的沒有再次執(zhí)行opatch腳本,即在.patch_storage目錄下的rollbak腳本沒有被覆蓋,你可以:1.運(yùn)行rollback腳本:% sh $ORACLE_HOME/.patch_storage/1234567/rollback_1234567 .sh注意,可以能會(huì)如下報(bào)錯(cuò)./rollback_5901872.sh89: System: not found. ./rollback_5901872.sh97: System: not found.這個(gè)可以不必忽略。 2.運(yùn)行make腳本% sh $ORACLE_HOME/.patch_storage/1234567/1234567_make.txt注,make腳本僅在relink階段出錯(cuò)的時(shí)候才需要使用。3.重命名腳本的原目錄% mv $ORACLE_HOME/.patch_storage/1234567 $ORACLE_HOME/.patch_storage/1234567.orig情況2,如果你已經(jīng)再次執(zhí)行opatch腳本,即在.patch_storage目錄下的rollbak腳本被覆蓋了,你需要:1.從命名你的原路徑:% mv $ORACLE_HOME/.patch_storage/1234567 $ORACLE_HOME2.重新生成rolback腳本,注意用no_inventory和on_relink參數(shù)% cd % opatch apply -no_inventory -no_relink3.將生產(chǎn)的rollback腳本和make腳本移動(dòng)至原路徑,以便利用原來的備份。% cp $ORACLE_HOME/.patch_storage/1234567/rollback_1234567.sh $ORACLE_HOME/1234567% cp $ORACLE_HOME/.patch_storage/1234567/1234567_make.txt $ORACLE_HOME/1234567 % mv $ORACLE_HOME/.patch_storage/1234567 $ORACLE_HOME/1234567.rereun% mv $ORACLE_HOME/1234567$ORACLE_HOME/.patc

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論