작업명 | 명령어 | 출력 결과 |
---|---|---|
엑셀에 정리 | preinstall - install - post action - type (db/grid) o,x로 정리 특이 사항 있을 시 추가로 정보 입력" | |
sqlplus 기동 중지 | $ sqlplus / as sysdba | [oracle@ora19cn1 20241228-14:51:59]:ORABSJ:[/oradata/backup] $ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Sat Dec 28 14:52:10 2024 Version 19.24.0.0.0 Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production SQL> shutdown immediate; ORA-01109: database not open Database dismounted. ORACLE instance shut down. |
listener 확인, 중지 | ||
해당 interim scp로 전송 | $ scp /bsj/interim/* oracle@n1:/oramedia/interim | [root@bastion bsj]# scp /bsj/interim/* oracle@n1:/oramedia/interim oracle@n1's password: p30787757_1924000DBRU_Linux-x86-64.zip 100% 140KB 62.1MB/s 00:00 p33131637_1924000DBRU_Linux-x86-64.zip 100% 1337KB 215.4MB/s 00:00 p35398148_1924000DBRU_Linux-x86-64.zip 100% 616KB 195.2MB/s 00:00 p35760594_1924000DBRU_Linux-x86-64.zip 100% 522KB 101.2MB/s 00:00 p36006910_1924000DBRU_Linux-x86-64.zip 100% 2451KB 127.0MB/s 00:00 p36126983_1924000DBRU_Linux-x86-64.zip 100% 37KB 52.5MB/s 00:00 p36943142_1924000DBRU_Linux-x86-64.zip 100% 382KB 186.3MB/s 00:00 p36961299_1924000DBRU_Linux-x86-64.zip 100% 1207KB 193.5MB/s 00:00 |
interim 경로 확인 | $ ls -al | [oracle@ora19cn1 20241228-15:17:29]:ORABSJ:[/oramedia/interim] $ ls -al total 6716 drwxr-xr-x. 2 oracle oinstall 4096 Dec 28 14:37 . drwxrwxrwx. 8 root root 4096 Dec 28 14:37 .. -rw-r--r--. 1 oracle oinstall 143749 Dec 28 14:37 p30787757_1924000DBRU_Linux-x86-64.zip -rw-r--r--. 1 oracle oinstall 1369225 Dec 28 14:37 p33131637_1924000DBRU_Linux-x86-64.zip -rw-r--r--. 1 oracle oinstall 630753 Dec 28 14:37 p35398148_1924000DBRU_Linux-x86-64.zip -rw-r--r--. 1 oracle oinstall 535034 Dec 28 14:37 p35760594_1924000DBRU_Linux-x86-64.zip -rw-r--r--. 1 oracle oinstall 2509418 Dec 28 14:37 p36006910_1924000DBRU_Linux-x86-64.zip -rw-r--r--. 1 oracle oinstall 37390 Dec 28 14:37 p36126983_1924000DBRU_Linux-x86-64.zip -rw-r--r--. 1 oracle oinstall 391353 Dec 28 14:37 p36943142_1924000DBRU_Linux-x86-64.zip -rw-r--r--. 1 oracle oinstall 1236073 Dec 28 14:37 p36961299_1924000DBRU_Linux-x86-64.zip |
압축풀기 | $ unzip p30787757_1924000DBRU_Linux-x86-64.zip | $ unzip p30787757_1924000DBRU_Linux-x86-64.zip Archive: p30787757_1924000DBRU_Linux-x86-64.zip creating: 30787757/ creating: 30787757/files/ creating: 30787757/files/lib/ creating: 30787757/files/lib/libserver19.a/ inflating: 30787757/files/lib/libserver19.a/qosp.o inflating: 30787757/README.txt creating: 30787757/etc/ creating: 30787757/etc/config/ inflating: 30787757/etc/config/inventory.xml inflating: 30787757/etc/config/actions.xml |
충돌나는 패치가 있는지 확인 | $ opatch prereq CheckConflictAgainstOHWithDetail -ph ./ | Oracle Interim Patch Installer version 12.2.0.1.44 Copyright (c) 2024, Oracle Corporation. All rights reserved. PREREQ session Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc OPatch version : 12.2.0.1.44 OUI version : 12.2.0.7.0 Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2024-12-28_15-31-25PM_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded. |
opatch apply | $ opatch apply | Oracle Interim Patch Installer version 12.2.0.1.44 Copyright (c) 2024, Oracle Corporation. All rights reserved. Verifying environment and performing prerequisite checks... Patching component oracle.rdbms, 19.0.0.0.0... Patch 30787757 successfully applied. Log file location: /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2024-12-28_15-34-36PM_1.log OPatch succeeded. |
opatch lspatches | $ opatch lspatches | 30787757;GLOBAL INDEX DISTINCT_KEYS SET TO ZERO AFTER PARTITION MOVE 36414915;OJVM RELEASE UPDATE: 19.24.0.0.240716 (36414915) 36582781;Database Release Update : 19.24.0.0.240716 (36582781) 29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399) OPatch succeeded. |
여러 개의 패치를 한 번에 적용할 때 사용된다. 단일 패치만 적용하는 opatch apply 명령어와 달리, 다수의 패치 디렉터리를 지정된 순서대로 적용한다.
동일한 환경에서 다수의 패치를 동시에 적용해야 할 때 편리하다.
/u01/app/oracle/product/19.0.0/dbhome_1/OPatch/opatch napply \
-oh /u01/app/oracle/product/19.0.0/dbhome_1 \ <<<<<<<<< $ORACLE_HOME
-phBaseDir /oramedia/RU24 \ <<<<<<<<< 패치 디렉토리 경로
-local -silent -no_relink \
-id 36582781 << 적용할 패치의 ID를 쉼표로 구분하여 지정한다.
local: 로컬 노드에서만 패치를 적용 (RAC 환경에서만 사용)
silent: 출력 메시지를 최소화하여 무언 모드로 실행함
no_relink: 패치 적용 후 바이너리를 재빌드하지 않음
analyze: 패치를 실제로 적용하지 않고, 적용 가능 여부와 종속성을 분석한다.