OS환경 : Oracle Linux 7.5 (64bit)
DB 환경 : Oracle Database 19.7.0.0
에러 : $ORACLE_HOME/.patch_storage does not exists or is not readable.
오라클 19.3 OPatch 후 패치 롤백 명령시 발생한 메세지
롤백이 실패함
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | $ $ORACLE_HOME/OPatch/opatch rollback -id 30869156 Oracle Interim Patch Installer version 12.2.0.1.19 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle Home : /app/oracle/product/19orcl Central Inventory : /app/oraInventory from : /app/oracle/product/19orcl/oraInst.loc OPatch version : 12.2.0.1.19 OUI version : 12.2.0.7.0 Log file location : /app/oracle/product/19orcl/cfgtoollogs/opatch/opatch2020-06-02_14-52-13PM_1.log Patches will be rolled back in the following order: 30869156 Prerequisite check "CheckRollbackable" failed. Possible causes are: The patch can not be rolled back No read or write permission to ORACLE_HOME/.patch _storage The ORACLE_HOME/.patch_storage file may have been removed. The details are: Patch 30869156: Achive Action: Directory "/app/oracle/product/19orcl/.patch_storage/30869156_Apr_6_2020_23_20_53" does not exists or is not readable. 'oracle.rdbms.rsf, 19.0.0.0.0': Cannot update file '/app/oracle/product/19orcl/rdbms/lib/libskgxpr.a' with '/skgxpg.o' Achive Action: Directory "/app/oracle/product/19orcl/.patch_storage/30869156_Apr_6_2020_23_20_53" does not exists or is not readable. 'oracle.rdbms.rsf, 19.0.0.0.0': Cannot update file '/app/oracle/product/19orcl/rdbms/lib/libskgxpr.a' with '/ssskgxpg.o' Achive Action: Directory "/app/oracle/product/19orcl/.patch_storage/30869156_Apr_6_2020_23_20_53" does not exists or is not readable. 'oracle.rdbms.rsf, 19.0.0.0.0': Cannot update file '/app/oracle/product/19orcl/lib/libasmclnt19.a' with '/kgfd.o' Achive Action: Directory "/app/oracle/product/19orcl/.patch_storage/30869156_Apr_6_2020_23_20_53" does not exists or is not readable. 'oracle.rdbms.rsf, 19.0.0.0.0': Cannot update file '/app/oracle/product/19orcl/lib/libasmclnt19.a' with '/kgfm.o' Achive Action: Directory "/app/oracle/product/19orcl/.patch_storage/30869156_Apr_6_2020_23_20_53" does not exists or is not readable. 'oracle.rdbms.rsf, 19.0.0.0.0': Cannot update file '/app/oracle/product/19orcl/lib/libasmclnt19.a' with '/kgfdputl.o' . . Copy Action: Directory "/app/oracle/product/19orcl/.patch_storage/30869156_Apr_6_2020_23_20_53" does not exists or is not readable. 'oracle.jdk, 1.8.0.201.0': Cannot copy file from 'javafx-src.zip' to '/app/oracle/product/19orcl/jdk/javafx-src.zip' Copy Action: Directory "/app/oracle/product/19orcl/.patch_storage/30869156_Apr_6_2020_23_20_53" does not exists or is not readable. 'oracle.jdk, 1.8.0.201.0': Cannot copy file from 'THIRDPARTYLICENSEREADME-JAVAFX.txt' to '/app/oracle/product/19orcl/jdk/THIRDPARTYLICENSEREADME-JAVAFX.txt' UtilSession failed: Prerequisite check "CheckRollbackable" failed. Log file location: /app/oracle/product/19orcl/cfgtoollogs/opatch/opatch2020-06-02_14-52-13PM_1.log |
해결 방법 : $ORACLE_HOME/.patch_storage/패치번호~폴더를 만들어준다
나의 경우 $ORACLE_HOME/.patch_storage/30869156_Apr_6_2020_23_20_53 폴더를 생성
1 2 3 4 5 | $ mkdir -p $ORACLE_HOME/.patch_storage/30869156_Apr_6_2020_23_20_53 $ ls -al $ORACLE_HOME/.patch_storage/30869156_Apr_6_2020_23_20_53 total 0 drwxr-xr-x 2 oracle dba 6 Jun 2 15:12 . drwxr-xr-x 3 oracle dba 42 Jun 2 15:12 .. |
롤백 전 패치 확인
1 2 3 4 5 6 | $ $ORACLE_HOME/OPatch/opatch lspatches -oh $ORACLE_HOME 30805684;OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684) 30869156;Database Release Update : 19.7.0.0.200414 (30869156) 29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399) OPatch succeeded. |
패치 롤백 재시도
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | $ $ORACLE_HOME/OPatch/opatch rollback -id 30869156 Oracle Interim Patch Installer version 12.2.0.1.19 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle Home : /app/oracle/product/19orcl Central Inventory : /app/oraInventory from : /app/oracle/product/19orcl/oraInst.loc OPatch version : 12.2.0.1.19 OUI version : 12.2.0.7.0 Log file location : /app/oracle/product/19orcl/cfgtoollogs/opatch/opatch2020-06-02_15-13-28PM_1.log Patches will be rolled back in the following order: 30869156 The following patch(es) will be rolled back: 30869156 Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/app/oracle/product/19orcl') Is the local system ready for patching? [y|n] y User Responded with: Y Rolling back patch 30869156... RollbackSession rolling back interim patch '30869156' from OH '/app/oracle/product/19orcl' Patching component oracle.rdbms.rsf, 19.0.0.0.0... Deleting "krmk3.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "krmk6.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "krms.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "ulndot.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "ulpvd.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "krmpa.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "krmr.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "krmp.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "trcu.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "krmk4.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "krmb.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "krmq.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "krmk5.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "krmk7.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" Deleting "krmpp.o" from archive "/app/oracle/product/19orcl/rdbms/lib/libdbtools19.a" . . User Responded with: Y Inactive sub-set patch [29517242] has become active due to the rolling back of a super-set patch [30869156]. Please refer to Doc ID 2161861.1 for any possible further required actions. OPatch Session completed with warnings. Log file location: /app/oracle/product/19orcl/cfgtoollogs/opatch/opatch2020-06-02_15-13-28PM_1.log OPatch completed with warnings. |
에러가 발생하긴 했지만 롤백이 완료됨
중간에 failed 이 발생하기는 하지만 y 입력 후 넘어가주면 됨
1 2 3 4 5 6 7 8 | The following actions have failed: Copy failed from '/app/oracle/product/19orcl/.patch_storage/30869156_Apr_6_2020_23_20_53/files/jdk' to '/app/oracle/product/19orcl/jdk'... Do you want to proceed? [y|n] y User Responded with: Y RollbackSession removing interim patch '30869156' from inventory |
롤백 후 패치 확인
1 2 3 4 5 6 | $ $ORACLE_HOME/OPatch/opatch lspatches -oh $ORACLE_HOME 30805684;OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684) 29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399) 29517242;Database Release Update : 19.3.0.0.190416 (29517242) OPatch succeeded. |
정상적으로 19.3 버전으로 롤백됨
원인 : $ORACLE_HOME/.patch_storage/패치번호~폴더가 존재하지 않아 발생하는 오류
어떤이유로 인해 $ORACLE_HOME/.patch_storage/패치번호~폴더가 유실되었을 경우 rollback 시 에러 발생함
참고
OPatch apply 전 $ORACLE_HOME/.patch_storage/의 모든 파일을 지우고 OPatch apply 를 할 시
해당 폴더에 패치관련 파일들이 생성됨
19.7 30869156 패치 $ORACLE_HOME/OPatch/opatch apply 전
1 2 3 4 | $ ls -al $ORACLE_HOME/.patch_storage total 40 drwxr-xr-x 4 oracle dba 151 Jun 2 15:01 . drwxr-xr-x 71 oracle dba 4096 Jun 2 15:02 .. |
19.7 30869156 패치 $ORACLE_HOME/OPatch/opatch apply 후
1 2 3 4 5 6 7 8 9 | $ ls -al $ORACLE_HOME/.patch_storage total 40 drwxr-xr-x 4 oracle dba 151 Jun 2 15:03 . drwxr-xr-x 71 oracle dba 4096 Jun 2 14:51 .. drwxr-xr-x 7 oracle dba 81 Jun 2 15:03 30869156_Apr_6_2020_23_20_53 -rw-r--r-- 1 oracle dba 24180 Jun 2 15:03 interim_inventory.txt -rw-r--r-- 1 oracle dba 92 Jun 2 15:03 LatestOPatchSession.properties drwxr-xr-x 3 oracle dba 35 Jun 2 15:03 NApply -rw-r--r-- 1 oracle dba 6219 Jun 2 15:03 record_inventory.txt |
interim_inventory.txt 파일 확인
1 2 3 4 5 6 7 8 9 10 11 | $ cat interim_inventory.txt # napply: list of patches installed in Oracle Home. 30869156:recorded:30533132,30312546,29924181,29549154,30937410,29970081,8476681, 14735102,17428816,19080742,19697993,20313356,21374587,21965541,23296836,23606241, 24687075,24971456,25756945,25806201,25883179,25986062,25997810,26284288,26476244, 26611353,26668264,26739322,26777814,26872233,27036163,27044169,27101798,27126122, 27126938,27166935,27195935,27244999,27254335,27359766,27369515,27378053,27406105, 27411022,27423500,27439716,27453490,27458357,27489107,27582210,27666312,27710072, 27729678,27801144,27846298,27880 . . |
패치 정보가 저장되어 있음
참조 : Doc. 1244414.1, Doc. 403218.1
https://positivemh.tistory.com/551