OS환경 : Oracle Linux 7.5 (64bit)
DB 환경 : Oracle Database 19.3.0.0
에러 : Can't load '$ORACLE_HOME/perl/lib/site_perl/5.28.1/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.19.1:
OPatch 롤백 후 datapatch -verbose 명령 실행시 발생한 에러(https://positivemh.tistory.com/579)
1 2 3 4 5 6 7 | $ $ORACLE_HOME/OPatch/datapatch -verbose Can't load '/app/oracle/product/19orcl/perl/lib/site_perl/5.28.1/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.19.1: cannot open shared object file: No such file or directory at /app/oracle/product/19orcl/perl/lib/5.28.1/x86_64-linux-thread-multi/DynaLoader.pm line 193. at /app/oracle/product/19orcl/sqlpatch/sqlpatch.pm line 239. Compilation failed in require at /app/oracle/product/19orcl/sqlpatch/sqlpatch.pm line 239. BEGIN failed--compilation aborted at /app/oracle/product/19orcl/sqlpatch/sqlpatch.pm line 239. Compilation failed in require at /app/oracle/product/19orcl/sqlpatch/sqlpatch.pl line 71. BEGIN failed--compilation aborted at /app/oracle/product/19orcl/sqlpatch/sqlpatch.pl line 71. |
sqlplus 실행 시 에러 발생 및 라이브러리 파일 미존재
1 2 3 4 5 6 7 | $ sqlplus / as sysdba sqlplus: error while loading shared libraries: libclntsh.so.19.1: cannot open shared object file: No such file or directory $ cd $ORACLE_HOME/lib $ ls -al libclntsh.so lrwxrwxrwx 1 oracle dba 17 Jun 2 15:04 libclntsh.so -> libclntsh.so.19.1 $ ls -al libclntsh.so.19.1 ls: cannot access libclntsh.so.19.1: No such file or directory |
relink all 시도
1초만에 끝나고 로그파일을 확인하면 실행하지 못했다고 나옴
1 2 3 4 5 6 7 8 | $ relink all writing relink log to: /app/oracle/product/19orcl/install/relinkActions2020-06-02_04-11-32PM.log $ cat relinkActions2020-06-02_04-11-32PM.log Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 3815 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-06-02_04-11-32PM. Please wait ...The Java RunTime Environment was not found at /tmp/OraInstall2020-06-02_04-11-32PM/jre/bin/java. Hence, the Oracle Universal Installer cannot be run. Please visit http://www.javasoft.com and install JRE version 1.4 or higher and try again. |
해결 방법 : rollback 한 패치 재적용
패치 재적용
1 2 3 4 5 | $ cd /app/media/30783543/30869156/ $ $ORACLE_HOME/OPatch/opatch apply 내용 생략 $ cd /app/media/30783543/30805684/ $ $ORACLE_HOME/OPatch/opatch apply |
$ORACLE_HOME/.patch_storage 디렉토리 안 파일 확인
1 2 3 4 5 6 7 8 9 10 11 12 | $ cd $ORACLE_HOME/.patch_storage $ ls -al total 52 drwxr-xr-x 6 oracle dba 4096 Jun 2 16:01 . drwxr-xr-x 71 oracle dba 4096 Jun 2 16:00 .. drwxr-xr-x 3 oracle dba 74 Jun 2 16:02 30805684_Feb_21_2020_20_52_36 drwxr-xr-x 4 oracle dba 87 Jun 2 16:01 30869156_Apr_6_2020_23_20_53 -rw-r--r-- 1 oracle dba 19365 Jun 2 16:01 interim_inventory.txt -rw-r--r-- 1 oracle dba 93 Jun 2 16:01 LatestOPatchSession.properties drwxr-xr-x 4 oracle dba 64 Jun 2 16:01 NApply drwxr-xr-x 4 oracle dba 64 Jun 2 15:48 NRollback -rw-r--r-- 1 oracle dba 19169 Jun 2 16:01 record_inventory.txt |
정상적으로 존재함
sqlplus 실행 테스트
1 2 3 4 5 6 7 8 | $ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jun 2 16:16:32 2020 Version 19.7.0.0.0 Copyright (c) 1982, 2020, Oracle. All rights reserved. SQL> |
정상 실행됨
라이브러리 파일 확인
1 2 3 4 | $ ls -al libclntsh.so lrwxrwxrwx 1 oracle dba 17 Jun 2 16:15 libclntsh.so -> libclntsh.so.19.1 $ ls -al libclntsh.so.19.1 -rwxr-xr-x 1 oracle dba 80715576 Jun 2 16:15 libclntsh.so.19.1 |
정상적으로 존재함
datapatch -verbose 명령 실행
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 | $ cd $ORACLE_HOME/OPatch $ ./datapatch -verbose SQL Patching tool version 19.7.0.0.0 Production on Sun Jun 02 16:30:44 2020 Copyright (c) 2012, 2020, Oracle. All rights reserved. Log file for this invocation: /app/oracle/cfgtoollogs/sqlpatch/sqlpatch_25425_2020_06_02_16_30_44/sqlpatch_invocation.log Connecting to database...OK Gathering database info...done Bootstrapping registry and package to current versions...done Determining current state...done Current state of interim SQL patches: Interim patch 30805684 (OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684)): Binary registry: Installed SQL registry: Applied successfully on 26-APR-20 02.41.37.290285 AM Current state of release update SQL patches: Binary registry: 19.7.0.0.0 Release_Update 200404035018: Installed SQL registry: Applied 19.7.0.0.0 Release_Update 200404035018 successfully on 26-APR-20 02.41.37.281705 AM Adding patches to installation queue and performing prereq checks...done Installation queue: No interim patches need to be rolled back No release update patches need to be installed No interim patches need to be applied SQL Patching tool complete on Sun Jun 02 16:30:02 2020 |
원인 : OPatch rollback 영향으로 특정 라이브러리 파일이 삭제됨
OPatch rollback 영향으로 특정 라이브러리 파일이 삭제됨
버그인지는 확실치 않음
(깨끗한 상태에서 패치 후 db 생성 후 rollback 시 에러 발생하지 않음
여러번 패치 및 롤백 시도를 해서 중간에 문제가 생긴듯함)
(Oracle 19c SINGLE OPatch Release Update 롤백 방법 https://positivemh.tistory.com/581)
참고
패치 재적용 후 정상적으로 롤백한 이후에도 똑같이 에러가 발생함
참조 : Doc. 2665402.1
https://positivemh.tistory.com/581