OS 환경 : Oracle Linux 9.6 (64bit)
DB 환경 : Oracle Database 19.28.0.0, 19.32.0.0
방법 : 오라클 19c Restart 환경 Out-of-place 방식 19.32 RU 패치 및 롤백 가이드(OOP)
본문에서는 Oracle Restart 환경에서 기존 19.28 Grid 및 Oracle Home을 직접 패치하지 않고 새로운 Home을 생성한 뒤 19.32 RU가 적용된 엔진으로 전환하는 방법을 설명함
새로운 Grid Home과 Oracle Home에 19.3 Base Release를 설치하면서 RU를 함께 적용하고 기존 DB와 Grid Infrastructure를 새로운 Home으로 전환함
이후 기존 Home으로 원상 복구하는 방법도 함께 설명함
Out-of-place 패치란
Out-of-place 패치는 현재 운영 중인 Oracle Home에 패치를 직접 적용하지 않고 새로운 Oracle Home을 별도로 만든 뒤 신규 Home에 원하는 RU 및 one-off 패치를 적용하고 최종적으로 운영 대상을 신규 Home으로 전환하는 방식임
본문에서는 아래와 같이 기존 19.28 Home은 그대로 유지하고 19.32 RU가 적용된 신규 Home을 별도로 구성함
- 기존 Grid Home : /app/grid/product/19c
- 신규 Grid Home : /app/grid/product/19c32
- 기존 Oracle Home : /app/oracle/product/19c
- 신규 Oracle Home : /app/oracle/product/19c32
두 방식의 차이
In-place 패치
- 현재 운영 중인 Home에 패치를 직접 적용함
- 패치 전후 Oracle Home 경로가 동일함
- 별도의 신규 Home 공간이 거의 필요하지 않음
- 문제가 발생하면 기존 Home의 패치를 rollback 해야함
- 패치 적용 작업 대부분이 점검 시간 안에 수행됨
Out-of-place 패치
- 신규 Home을 생성하고 패치된 바이너리를 미리 구성함
- 패치 후 Oracle Home 및 Grid Home 경로가 변경됨
- 기존 Home과 신규 Home을 동시에 보관할 추가 디스크 공간이 필요함
- 문제가 발생하면 기존 Home으로 다시 전환할 수 있음
- 신규 Home 설치와 패치 준비 작업을 서비스 중인 상태에서 미리 수행할 수 있음
Out-of-place 패치의 장점
기존 운영 Home을 직접 변경하지 않으므로 패치 전 바이너리를 그대로 보존할 수 있음
신규 Home 생성, Base Release 압축 해제, OPatch 업데이트 및 RU 적용 같은 작업을 서비스 전환 전에 미리 수행할 수 있음
따라서 점검 시간에는 Home 전환과 리소스 재기동 및 datapatch 등 핵심 작업에 집중할 수 있음
기존 Home이 남아 있으므로 바이너리 문제 발생 시 기존 Home으로 되돌아갈 수 있음
다만 Database에 datapatch까지 적용한 뒤 롤백하는 경우에는 기존 Home으로 경로만 변경하는 것으로 끝나지 않고 기존 Home의 바이너리를 기준으로 datapatch를 다시 수행하여 SQL 패치도 rollback 해야함
신규 Home을 사전에 검사하고 동일한 이미지로 여러 서버에 배포하기 편하므로 패치 이미지의 표준화 및 자동화에 유리함(FPP 등)
Out-of-place 패치의 단점 및 주의사항
기존 Home과 신규 Home을 함께 유지하므로 Grid 및 Database Home 용량만큼 추가 디스크 공간이 필요함
password file, tnsnames.ora, sqlnet.ora, listener.ora, glogin.sql, wallet, TDE keystore, 사용자 스크립트 및 기타 Home 내부 구성 파일을 신규 Home으로 옮겨야 할 수 있음
필요한 파일이 누락되면 신규 Home 전환 후 접속 또는 기동 문제가 발생할 수 있음
srvctl, /etc/oratab, Oracle Inventory, root/grid/oracle 유저의 환경변수 및 운영 스크립트에 설정된 Home 경로를 함께 점검해야함
하드코딩된 스크립트에 기존 Home 경로가 남아 있으면 패치 후 일부 작업이 기존 바이너리를 참조할 수 있음
기존 Home으로 되돌리기 쉬운 구조이지만 롤백 절차가 Home 경로 전환, 리소스 재기동 및 datapatch rollback을 포함하므로 작업 전에 실제 롤백 절차까지 테스트해야함
본문의 Oracle Restart 환경에서는 roothas.sh -prepatch 수행만으로 서비스가 중지되지는 않지만 roothas.sh -postpatch 수행 시 기존 Grid Infrastructure Home이 종료되고 신규 Home에서 리소스가 다시 시작됨
따라서 Out-of-place 패치를 무중단 패치라곤 할수 없고 최소다운타임 패치로 볼수 있음
실제 서비스 중단 시간은 DB 종료 및 기동 시간, 리소스 전환 시간, datapatch 수행 시간 등에 따라 달라짐
패치파일은 39618711를 사용함
Patch 39618711 - Combo of OJVM Component Release Update 19.32.0.0.260721 + Grid Infrastructure Jul 2026 Release Update 19.32.0.0.260721
패치파일 구조
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
39618711
|
|-- 39467003 <<-- GRID 및 DB 패치 파일
| -- 39472050 <<-- Database Release Update 19.32.0.0.260721
| Non-RAC: Oracle Home
| RAC : Oracle Home 및 Grid Home
|
| -- 39526364 <<-- OCW Release Update 19.32.0.0.260721
| Oracle Home 및 Grid Home
|
| -- 39503034 <<-- ACFS Release Update 19.32.0.0.260721
| Grid Home만 적용
|
| -- 39107855 <<-- Tomcat Release Update 19.0.0.0.0
| Grid Home만 적용
| Beginning 19.31 TOMCAT version will be deleted.
|
| -- 39107825 <<-- DBWLM Release Update 19.0.0.0.0
| Grid Home만 적용
| Beginning from 19.31 Apr2026, QOS / WLM directory has been removed.
|
|-- 39222882 <<-- OJVM 패치 파일
| -- <other files and directories>
|
테스트
*참고로 본문 환경은 grid 유저 없이 oracle 유저 하나로만 구성된 환경임
crs 상태 확인
|
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
|
$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE ora19 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE ora19 STABLE
ora.asm
ONLINE ONLINE ora19 Started,STABLE
ora.ons
OFFLINE OFFLINE ora19 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE ora19 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE ora19 STABLE
ora.oracle19.db
1 ONLINE ONLINE ora19 Open,HOME=/app/oracl
e/product/19c,STABLE
--------------------------------------------------------------------------------
|
현재 grid, db가 모두 기동된 상태임
현재 패치 버전 확인
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
$ opatch lspatches -oh $GRID_HOME
38124772;TOMCAT RELEASE UPDATE 19.0.0.0.0 (38124772)
37962946;OCW RELEASE UPDATE 19.28.0.0.0 (37962946)
37962938;ACFS RELEASE UPDATE 19.28.0.0.0 (37962938)
37960098;Database Release Update : 19.28.0.0.250715 (37960098)
36758186;DBWLM RELEASE UPDATE 19.0.0.0.0 (36758186)
OPatch succeeded.
$ opatch lspatches -oh $ORACLE_HOME
37847857;OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857)
37962946;OCW RELEASE UPDATE 19.28.0.0.0 (37962946)
37960098;Database Release Update : 19.28.0.0.250715 (37960098)
OPatch succeeded.
|
현재 테스트 환경은 Oracle Linux 9.6, Oracle Database 19c, Oracle Restart 구성임
Grid 및 DB Home에는 19.28 RU가 적용되어 있음
설치 및 패치 다운로드 및 업로드
다운로드 파일
|
1
2
3
4
|
LINUX.X64_193000_grid_home.zip
LINUX.X64_193000_db_home.zip
p39618711_190000_Linux-x86-64.zip
p6880880_190000_Linux-x86-64.zip
|
19.32 RU 패치 파일 및 최신 OPatch 파일은 아래 MOS 문서에서 다운로드 가능함
Assistant: Download Reference for Oracle Database/GI Update, Revision, PSU, SPU(CPU), Bundle Patches, Patchsets and Base Releases(KA958)
https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=6880880
패치파일 확인
|
1
2
3
4
5
6
7
8
9
10
11
|
# cd /app/media
# chmod 755 ./*.zip
# chown oracle:dba *.zip
$ ls -al
total 8893232
drwxrwxr-x. 3 oracle dba 172 Aug 30 15:31 .
drwxrwxr-x. 6 oracle dba 65 Dec 21 2025 ..
-rwxrwxr-x. 1 oracle dba 3059705302 Nov 17 2025 LINUX.X64_193000_db_home.zip
-rwxrwxr-x. 1 oracle dba 2889184573 Nov 17 2025 LINUX.X64_193000_grid_home.zip
-rwxr-xr-x 1 oracle dba 3021311494 Aug 30 15:19 p39618711_190000_Linux-x86-64.zip
-rwxr-xr-x 1 oracle dba 136460315 Aug 30 15:19 p6880880_190000_Linux-x86-64.zip
|
신규 Grid Home 생성 및 설치 준비
root 유저에서 새로운 Grid Home 디렉토리 생성
|
1
2
3
4
5
6
|
# echo $GRID_HOME
/app/grid/product/19c
# mkdir -p /app/grid/product/19c32
# chown -R oracle:dba /app/grid/product/19c32
# chmod -R 775 /app/grid/product/19c32
|
oracle 유저에서 기존 및 신규 Grid Home 환경변수 설정
|
1
2
3
4
5
6
|
$ export OLDGRIDHOME=$GRID_HOME
$ export NEWGRIDHOME=/app/grid/product/19c32
$ echo $OLDGRIDHOME
/app/grid/product/19c
$ echo $NEWGRIDHOME
/app/grid/product/19c32
|
19.3 grid 엔진을 신규 Grid Home에 압축 해제
|
1
|
$ unzip -q /app/media/LINUX.X64_193000_grid_home.zip -d $NEWGRIDHOME
|
신규 Grid Home의 기존 OPatch를 백업 및 최신 OPatch 설치
|
1
2
3
4
5
6
|
$ mv $NEWGRIDHOME/OPatch $NEWGRIDHOME/OPatch.bak.19.3
$ unzip -q /app/media/p6880880_190000_Linux-x86-64.zip -d $NEWGRIDHOME
$ $NEWGRIDHOME/OPatch/opatch version
OPatch Version: 12.2.0.1.52
OPatch succeeded.
|
opatch가 12.2.0.1.52로 패치됨
신규 Grid 설치 전 사전 문제 사항 확인
|
1
2
3
4
5
6
7
8
|
$ export GRID_HOME=$NEWGRIDHOME
$ export ORACLE_HOME=$GRID_HOME
$ $GRID_HOME/gridSetup.sh -executePrereqs -silent
Launching Oracle Grid Infrastructure Setup Wizard...
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /app/oraInventory/logs/GridSetupActions2026-08-30_03-36-36PM/gridSetupActions2026-08-30_03-36-36PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /app/oraInventory/logs/GridSetupActions2026-08-30_03-36-36PM/gridSetupActions2026-08-30_03-36-36PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
|
에러가 발생함, 사전 확인 결과에 오류가 있는 경우 설치 전에 조치해야함
로그 파일 확인
|
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
|
$ vi /app/oraInventory/logs/GridSetupActions2026-08-30_03-36-36PM/gridSetupActions2026-08-30_03-36-36PM.log
...
875 INFO: [Aug 30, 2026 3:36:59 PM] *********************************************
876 INFO: [Aug 30, 2026 3:36:59 PM] Package: compat-libcap1-1.10: This is a prerequisite condition to test whether the package "compat-libcap1-1.10" is available o n the system.
877 INFO: [Aug 30, 2026 3:36:59 PM] Severity:IGNORABLE
878 INFO: [Aug 30, 2026 3:36:59 PM] OverallStatus:VERIFICATION_FAILED
879 INFO: [Aug 30, 2026 3:36:59 PM] -----------------------------------------------
880 INFO: [Aug 30, 2026 3:36:59 PM] Verification Result for Node:ora19
881 INFO: [Aug 30, 2026 3:36:59 PM] Expected Value:compat-libcap1-1.10
882 INFO: [Aug 30, 2026 3:36:59 PM] Actual Value:missing
883 INFO: [Aug 30, 2026 3:36:59 PM] Error Message:PRVF-7532 : Package "compat-libcap1" is missing on node "ora19"
884 INFO: [Aug 30, 2026 3:36:59 PM] Cause: A required package is either not installed or, if the package is a kernel module, is not loaded on the specified node.
885 INFO: [Aug 30, 2026 3:36:59 PM] Action: Ensure that the required package is installed and available.
886 INFO: [Aug 30, 2026 3:36:59 PM] -----------------------------------------------
...
INFO: [Aug 30, 2026 3:37:00 PM] *************** End of CVU Error logs ***************
INFO: [Aug 30, 2026 3:37:00 PM] All forked task are completed at state init
INFO: [Aug 30, 2026 3:37:00 PM] ------------------List of failed Tasks------------------
INFO: [Aug 30, 2026 3:37:00 PM] *********************************************
INFO: [Aug 30, 2026 3:37:00 PM] Package: compat-libcap1-1.10: This is a prerequisite condition to test whether the package "compat-libcap1-1.10" is available on the system.
INFO: [Aug 30, 2026 3:37:00 PM] Severity:IGNORABLE
INFO: [Aug 30, 2026 3:37:00 PM] OverallStatus:VERIFICATION_FAILED
INFO: [Aug 30, 2026 3:37:00 PM] -----------------End of failed Tasks List----------------
INFO: [Aug 30, 2026 3:37:00 PM] Adding ExitStatus PREREQUISITES_NOT_MET to the exit status set
WARNING: [Aug 30, 2026 3:37:00 PM] [WARNING] [INS-13014] Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /app/oraInventory/logs/GridSetupActions2026-08-30_03-36-36PM/gridSetupActions2026-08-30_03-36-36PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /app/oraInventory/logs/GridSetupActions2026-08-30_03-36-36PM/gridSetupActions2026-08-30_03-36-36PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
...
|
compat-libcap1-1.10 패키지가 없다는 에러 로그가 발생하지만 이 패키지는 Linux 9에서는 필요없기 때문에 무시 가능함
참고 : nothing provides compat-libcap1 needed by oracle-database-preinstall-19c-1.0-1.el7.x86_64 ( https://positivemh.tistory.com/958 )
참고 : https://docs.oracle.com/en/database/oracle/oracle-database/19/rnrdm/linux-platform-issues.html#GUID-69942B7A-B662-48DC-8FC1-DFC56A3719D6
19.32 RU 패치 압축 해제
|
1
2
3
4
5
6
7
8
9
|
$ unzip -q /app/media/p39618711_190000_Linux-x86-64.zip -d /app/media
$ ls -al /app/media/39618711/
total 64
drwxrwxrwx 4 oracle oinstall 80 Jul 21 20:39 .
drwxrwxr-x. 4 oracle dba 4096 Aug 30 15:42 ..
drwxr-xr-x 4 oracle oinstall 67 Jun 29 22:23 39222882
drwxr-x--- 8 oracle oinstall 159 Jul 14 03:55 39467003
-rw-rw-r-- 1 oracle oinstall 33440 Jul 21 13:09 PatchSearch.xml
-rw-r--r-- 1 oracle oinstall 23512 Jul 21 20:39 README.html
|
신규 Grid 설치용 response file 생성
기존 설치에 사용한 response file에서 awk를 이용해 주석, 빈 줄, 값이 비어 있는 설정을 제외하고 실제 값이 들어간 설정만 추출
|
1
2
3
|
$ awk -F= 'NF && $1 !~ /^#/ && $2!=""' /app/grid/product/19c/install/response/grid_2025-12-21_02-22-54PM.rsp > /home/oracle/rsp/grid_new.rsp
또는
$ awk -F= 'NF && $1 !~ /^#/ && $2!=""' /home/oracle/rsp/grid.rsp > /home/oracle/rsp/grid_new.rsp
|
만약 초기 설치시 사용한 rsp 파일이 없는 경우 아래처럼 수동 생성하면됨
awk 명령 설명 :
-F= : = 문자를 기준으로 필드를 구분
NF : 빈 줄 제외
&& : 모든 조건을 만족하는 경우만 출력
$1 !~ /^#/ : #으로 시작하는 주석 줄 제외
$2 != "" : = 뒤에 값이 없는 항목 제외
grid_new.rsp 파일은 아래 항목을 기준으로 설정함
환경에 따라 ASM Disk Group 이름, 디스크 경로, OS 그룹 및 Inventory 경로는 변경해야함
신규 Grid 엔진 설치 단계에서는 root.sh가 자동 실행되지 않도록 oracle.install.crs.rootconfig.executeRootScript=false로 설정함
|
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
|
$ vi /home/oracle/rsp/grid_new.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v19.0.0
INVENTORY_LOCATION=/app/oraInventory
oracle.install.option=HA_CONFIG
ORACLE_BASE=/app/oracle
oracle.install.asm.OSDBA=dba
oracle.install.asm.OSOPER=dba
oracle.install.asm.OSASM=dba
oracle.install.crs.config.scanType=LOCAL_SCAN
oracle.install.crs.config.ClusterConfiguration=STANDALONE
oracle.install.crs.config.configureAsExtendedCluster=false
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.autoConfigureClusterNodeVIP=false
oracle.install.crs.config.gpnp.gnsOption=CREATE_NEW_GNS
oracle.install.crs.configureGIMR=false
oracle.install.asm.configureGIMRDataDG=false
oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=
oracle.install.crs.config.useIPMI=false
oracle.install.asm.diskGroup.name=DATA
oracle.install.asm.diskGroup.redundancy=EXTERNAL
oracle.install.asm.diskGroup.AUSize=1
oracle.install.asm.diskGroup.disksWithFailureGroupNames=ORCL:DATA,
oracle.install.asm.diskGroup.disks=ORCL:DATA
oracle.install.asm.diskGroup.diskDiscoveryString=ORCL:*
oracle.install.asm.gimrDG.AUSize=1
oracle.install.asm.configureAFD=false
oracle.install.crs.configureRHPS=false
oracle.install.crs.config.ignoreDownNodes=false
oracle.install.config.managementOption=NONE
oracle.install.config.omsPort=0
oracle.install.crs.rootconfig.executeRootScript=false
|
환경변수 설정
|
1
2
3
4
5
6
7
8
9
10
|
$ export ORA_INVENTORY=/app/oraInventory
$ export NEWGRIDHOME=/app/grid/product/19c32
$ export GRID_HOME=$NEWGRIDHOME
$ export ORACLE_HOME=$GRID_HOME
$ echo $NEWGRIDHOME
/app/grid/product/19c32
$ echo $GRID_HOME
/app/grid/product/19c32
$ echo $ORACLE_HOME
/app/grid/product/19c32
|
19.32 RU가 적용된 신규 Grid 엔진 설치
|
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
|
$ $ORACLE_HOME/gridSetup.sh -ignorePrereq -waitforcompletion -silent \
-applyRU /app/media/39618711/39467003 \
-responseFile /home/oracle/rsp/grid_new.rsp \
oracle.install.option=CRS_SWONLY \
oracle.install.crs.rootconfig.executeRootScript=false
#로그
Preparing the home to patch...
Applying the patch /app/media/39618711/39467003...
Successfully applied the patch.
The log can be found at: /app/oraInventory/logs/GridSetupActions2026-08-30_05-23-10PM/installerPatchActions_2026-08-30_05-23-10PM.log
Launching Oracle Grid Infrastructure Setup Wizard...
[WARNING] [INS-41808] Possible invalid choice for OSASM Group.
CAUSE: The name of the group you selected for the OSASM group is commonly used to grant other system privileges (For example: asmdba, asmoper, dba, oper).
ACTION: Oracle recommends that you designate asmadmin as the OSASM group.
[WARNING] [INS-41809] Possible invalid choice for OSDBA Group.
CAUSE: The group name you selected as the OSDBA for ASM group is commonly used for Oracle Database administrator privileges.
ACTION: Oracle recommends that you designate asmdba as the OSDBA for ASM group, and that the group should not be the same group as an Oracle Database OSDBA group.
[WARNING] [INS-41810] Possible invalid choice for OSOPER Group.
CAUSE: The group name you selected as the OSOPER for ASM group is commonly used for Oracle Database administrator privileges.
ACTION: Oracle recommends that you designate asmoper as the OSOPER for ASM group, and that the group should not be the same group as an Oracle Database OSOPER group.
[WARNING] [INS-41813] OSDBA for ASM, OSOPER for ASM, and OSASM are the same OS group.
CAUSE: The group you selected for granting the OSDBA for ASM group for database access, and the OSOPER for ASM group for startup and shutdown of Oracle ASM, is the same group as the OSASM group, whose members have SYSASM privileges on Oracle ASM.
ACTION: Choose different groups as the OSASM, OSDBA for ASM, and OSOPER for ASM groups.
The response file for this session can be found at:
/app/grid/product/19c32/install/response/grid_2026-08-30_05-23-10PM.rsp
You can find the log of this install session at:
/app/oraInventory/logs/GridSetupActions2026-08-30_05-23-10PM/gridSetupActions2026-08-30_05-23-10PM.log
As a root user, execute the following script(s):
1. /app/grid/product/19c32/root.sh
Execute /app/grid/product/19c32/root.sh on the following nodes:
[ora19]
Successfully Setup Software.
|
설치가 완료되면 root.sh 실행 메세지가 출력되지만 이 단계에서는 신규 Grid Home의 root.sh를 실행하지 않음
참고용. 아래 경로에서 설치 로그 모니터링 가능
|
1
|
$ tail -300f /app/grid/product/19c32/cfgtoollogs/opatchauto/opatchauto_2026-08-30_17-23-30_binary.log
|
신규 Oracle Home 생성 및 설치 준비
oracle 유저에서 신규 Oracle Home 디렉토리 생성
|
1
2
3
4
5
|
$ export OLDORACLEHOME=$ORACLE_HOME
$ export NEWORACLEHOME=/app/oracle/product/19c32
$ mkdir -p $NEWORACLEHOME
$ echo $NEWORACLEHOME
/app/oracle/product/19c32
|
19.3 db 엔진을 신규 Oracle Home에 압축 해제
|
1
|
$ unzip -q /app/media/LINUX.X64_193000_db_home.zip -d $NEWORACLEHOME
|
신규 Grid Home의 기존 OPatch를 백업 및 최신 OPatch 설치
|
1
2
3
4
5
6
|
$ mv $NEWORACLEHOME/OPatch $NEWORACLEHOME/OPatch.bak.19.3
$ unzip -q /app/media/p6880880_190000_Linux-x86-64.zip -d $NEWORACLEHOME
$ $NEWORACLEHOME/OPatch/opatch version
OPatch Version: 12.2.0.1.52
OPatch succeeded.
|
opatch가 12.2.0.1.52로 패치됨
신규 Oracle 엔진 설치용 response file 생성
기존 설치에 사용한 response file에서 awk를 이용해 주석, 빈 줄, 값이 비어 있는 설정을 제외하고 실제 값이 들어간 설정만 추출
|
1
2
3
|
$ awk -F= 'NF && $1 !~ /^#/ && $2!=""' /app/oracle/product/19c/install/response/db_2025-12-21_03-10-01PM.rsp > /home/oracle/rsp/db_new.rsp
또는
$ awk -F= 'NF && $1 !~ /^#/ && $2!=""' /home/oracle/rsp/db.rsp > /home/oracle/rsp/db_new.rsp
|
만약 초기 설치시 사용한 rsp 파일이 없는 경우 아래처럼 수동 생성하면됨
awk 명령 설명 :
-F= : = 문자를 기준으로 필드를 구분
NF : 빈 줄 제외
&& : 모든 조건을 만족하는 경우만 출력
$1 !~ /^#/ : #으로 시작하는 주석 줄 제외
$2 != "" : = 뒤에 값이 없는 항목 제외
db_new.rsp 파일은 아래 항목을 기준으로 설정함
환경에 따라 OS 그룹 및 Inventory 경로는 변경해야함
신규 DB 엔진 설치 단계에서는 root.sh가 자동 실행되지 않도록 oracle.install.db.rootconfig.executeRootScript=false로 설정함
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
$ vi /home/oracle/rsp/db_new.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/app/oraInventory
ORACLE_BASE=/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=dba
oracle.install.db.OSBACKUPDBA_GROUP=dba
oracle.install.db.OSDGDBA_GROUP=dba
oracle.install.db.OSKMDBA_GROUP=dba
oracle.install.db.OSRACDBA_GROUP=dba
oracle.install.db.rootconfig.executeRootScript=false
oracle.install.db.rootconfig.configMethod=ROOT
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.ConfigureAsContainerDB=false
oracle.install.db.config.starterdb.memoryOption=false
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.managementOption=DEFAULT
oracle.install.db.config.starterdb.omsPort=0
oracle.install.db.config.starterdb.enableRecovery=false
|
환경변수 설정
|
1
2
3
4
5
6
7
|
$ export ORA_INVENTORY=/app/oraInventory
$ export NEWORACLEHOME=/app/oracle/product/19c32
$ export ORACLE_HOME=$NEWORACLEHOME
$ echo $NEWORACLEHOME
/app/oracle/product/19c32
$ echo $ORACLE_HOME
/app/oracle/product/19c32
|
19.32 RU가 적용된 신규 DB 엔진 설치(OJVM도 같이 패치)
|
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
|
$ $ORACLE_HOME/runInstaller -ignorePrereqFailure -waitforcompletion -silent \
-applyRU /app/media/39618711/39467003 \
-applyOneOffs /app/media/39618711/39222882 \
-responseFile /home/oracle/rsp/db_new.rsp \
oracle.install.db.rootconfig.executeRootScript=false
#로그
Preparing the home to patch...
Applying the patch /app/media/39618711/39467003...
Successfully applied the patch.
Applying the patch /app/media/39618711/39222882...
Successfully applied the patch.
The log can be found at: /app/oraInventory/logs/InstallActions2026-08-30_08-51-21PM/installerPatchActions_2026-08-30_08-51-21PM.log
Launching Oracle Database Setup Wizard...
The response file for this session can be found at:
/app/oracle/product/19c32/install/response/db_2026-08-30_08-51-21PM.rsp
You can find the log of this install session at:
/app/oraInventory/logs/InstallActions2026-08-30_08-51-21PM/installActions2026-08-30_08-51-21PM.log
As a root user, execute the following script(s):
1. /app/oracle/product/19c32/root.sh
Execute /app/oracle/product/19c32/root.sh on the following nodes:
[ora19]
Successfully Setup Software.
|
참고용. 아래 경로에서 설치 로그 모니터링 가능
|
1
|
$ tail -300f /app/oracle/product/19c32/cfgtoollogs/opatchauto/opatchauto_2026-08-30_20-42-44_binary.log
|
root 유저에서 신규 Oracle Home의 root.sh 실행
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# /app/oracle/product/19c32/root.sh
Check /app/oracle/product/19c32/install/root_ora19_2026-08-30_21-24-40-530450497.log for the output of root script
# cat /app/oracle/product/19c32/install/root_ora19_2026-08-30_21-24-40-530450497.log
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /app/oracle/product/19c32
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
|
신규 Oracle Home 설치가 완료됨
기존 DB를 신규 Oracle Home으로 변경
기존 Oracle Home 환경에서 DB 구성과 spfile 및 password file 위치 확인
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
$ export ORACLE_HOME=$OLDORACLEHOME
$ echo $ORACLE_HOME
/app/oracle/product/19c
$ srvctl config database -db oracle19
Database unique name: oracle19
Database name: oracle19
Oracle home: /app/oracle/product/19c
Oracle user: oracle
Spfile: +DATA/ORACLE19/PARAMETERFILE/spfile.266.1220457563
Password file: /app/oracle/product/19c/dbs/orapworacle19
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups: DATA
Services:
OSDBA group:
OSOPER group:
Database instance: oracle19
|
기존 Oracle Home에만 존재하는 password file 및 네트워크 설정 파일을 신규 Oracle Home으로 복사
|
1
2
3
4
5
6
7
8
9
|
$ cp /app/oracle/product/19c/dbs/orapworacle19 /app/oracle/product/19c32/dbs/orapworacle19
$ cp /app/oracle/product/19c/network/admin/tnsnames.ora /app/oracle/product/19c32/network/admin/tnsnames.ora
$ cp /app/oracle/product/19c/network/admin/sqlnet.ora /app/oracle/product/19c32/network/admin/sqlnet.ora
$ cp /app/oracle/product/19c/sqlplus/admin/glogin.sql /app/oracle/product/19c32/sqlplus/admin/glogin.sql
또는
$ cp $OLDORACLEHOME/dbs/orapworacle19 $NEWORACLEHOME/dbs/orapworacle19
$ cp $OLDORACLEHOME/network/admin/tnsnames.ora $NEWORACLEHOME/network/admin/tnsnames.ora
$ cp $OLDORACLEHOME/network/admin/sqlnet.ora $NEWORACLEHOME/network/admin/sqlnet.ora
$ cp $OLDORACLEHOME/sqlplus/admin/glogin.sql $NEWORACLEHOME/sqlplus/admin/glogin.sql
|
listener.ora, wallet, TDE keystore, external password store 등 기존 Oracle Home에 별도로 구성한 파일이 있다면 작업 전에 추가로 확인하여 복사해야함
password file이 ASM 또는 별도 공유 위치에 존재한다면 실제 구성에 맞게 진행해야함
srvctl에 등록된 DB의 Oracle Home을 신규 Oracle Home으로 변경
|
1
|
$ srvctl modify database -db oracle19 -o $NEWORACLEHOME
|
srvctl에 등록된 DB의 패스워드 파일 경로를 신규 Oracle Home으로 변경
|
1
|
$ srvctl modify database -d oracle19 -pwfile $NEWORACLEHOME/dbs/orapworacle19
|
srvctl config database 설정 확인
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
$ srvctl config database -db oracle19
Database unique name: oracle19
Database name: oracle19
Oracle home: /app/oracle/product/19c32
Oracle user: oracle
Spfile: +DATA/ORACLE19/PARAMETERFILE/spfile.266.1220457563
Password file: /app/oracle/product/19c32/dbs/orapworacle19
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups: DATA
Services:
OSDBA group:
OSOPER group:
Database instance: oracle19
|
정상적으로 srvctl의 oracle home 경로 및 패스워드 파일 경로가 신규 엔진 경로로 변경됨
기존 Grid Home을 신규 Grid Home으로 전환
root 유저에서 신규 Grid Home 등록 및 prepatch 수행(이 명령은 어떤 서비스도 종료하지 않음)
|
1
2
3
4
5
6
7
8
9
10
|
# export ORACLE_HOME=/app/grid/product/19c32
# echo $ORACLE_HOME
/app/grid/product/19c32
# $ORACLE_HOME/rdbms/install/rootadd_rdbms.sh
# $ORACLE_HOME/crs/install/roothas.sh -prepatch -dstcrshome $ORACLE_HOME
Using configuration parameter file: /app/grid/product/19c32/crs/install/crsconfig_params
The log of current session can be found at:
/app/oracle/crsdata/ora19/crsconfig/hapatch_2026-08-30_10-32-15PM.log
2026/08/30 22:32:24 CLSRSC-347: Successfully unlock /app/grid/product/19c32
2026/08/30 22:32:24 CLSRSC-671: Pre-patch steps for patching GI home successfully completed.
|
postpatch 수행(다운타임 시작)
아래 명령을 수행하면 Oracle Restart 리소스가 중지된 뒤 신규 Grid Home을 기준으로 다시 기동됨
has도 -f 옵션으로 내려지고, db도 abort 옵션으로 내려짐, 원치 않는 경우 먼저 srvctl stop database -d oracle19를 수행할 수 있음
|
1
2
3
4
5
6
|
# $ORACLE_HOME/crs/install/roothas.sh -postpatch -dstcrshome $ORACLE_HOME
Using configuration parameter file: /app/grid/product/19c32/crs/install/crsconfig_params
The log of current session can be found at:
/app/oracle/crsdata/ora19/crsconfig/hapatch_2026-08-30_10-33-03PM.log
2026/08/30 22:34:04 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
2026/08/30 22:35:42 CLSRSC-672: Post-patch steps for patching GI home successfully completed.
|
참고용. 위 명령 수행시 db 중지부터 기동까지 걸린 시간 확인(alert log)
|
1
2
3
4
5
6
7
|
$ tail -300f /app/oracle/diag/rdbms/oracle19/oracle19/trace/alert_oracle19.log
2026-08-30T22:33:07.104846+09:00
Shutting down ORACLE instance (abort) (OS id: 232726)
...
2026-08-30T22:35:41.663349+09:00
CJQ0 started with pid=55, OS id=237488
Completed: ALTER DATABASE OPEN /* db agent *//* {0:0:2} */
|
2분정도 소요됨(다운타임 끝)
Oracle Inventory의 신규 및 기존 Grid Home 속성 갱신
신규 Grid Home을 CRS=TRUE로, 기존 Grid Home을 CRS=FALSE로 변경
|
1
2
3
4
5
6
7
8
9
10
11
|
$ /app/grid/product/19c32/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/app/grid/product/19c32 CRS=TRUE
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 7932 MB Passed
The inventory pointer is located at /etc/oraInst.loc
$ /app/grid/product/19c/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/app/grid/product/19c CRS=FALSE
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 7932 MB Passed
The inventory pointer is located at /etc/oraInst.loc
|
oraInventory 파일 확인
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
$ cat /app/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2026, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>12.2.0.7.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraGI19Home1" LOC="/app/grid/product/19c" TYPE="O" IDX="1"/>
<HOME NAME="OraDB19Home1" LOC="/app/oracle/product/19c" TYPE="O" IDX="2"/>
<HOME NAME="OraGI19Home2" LOC="/app/grid/product/19c32" TYPE="O" IDX="3"/ CRS="true">
<HOME NAME="OraDB19Home2" LOC="/app/oracle/product/19c32" TYPE="O" IDX="4"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
|
정상적으로 업데이트됨(기존 Grid home에 CRS=true가 안빠졌으면 updateNodeList 명령 재수행)
root, grid, oracle 유저 환경변수 변경
root 유저의 .bash_profile에서 GRID_HOME과 DB_HOME을 신규 Home으로 변경
|
1
2
3
4
5
6
7
|
# vi ~root/.bash_profile
...
export ORACLE_BASE=/app/oracle
export GRID_HOME=/app/grid/product/19c32
export DB_HOME=$ORACLE_BASE/product/19c32
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$GRID_HOME/bin:$GRID_HOME/OPatch:$PATH
...
|
oracle 유저의 .bash_profile에서 GRID_HOME과 DB_HOME을 신규 Home으로 변경
|
1
2
3
4
5
6
7
|
# vi ~oracle/.bash_profile
...
export ORACLE_BASE=/app/oracle
export GRID_HOME=/app/grid/product/19c32
export ORACLE_HOME=$ORACLE_BASE/product/19c32
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$GRID_HOME/bin:$PATH
...
|
기존 .bash_profile에 설정된 alias와 기타 환경변수는 유지하고 Home 관련 경로만 변경함
환경변수를 변경한 뒤 각 유저로 다시 로그인하거나 .bash_profile을 적용
|
1
|
$ . ~/.bash_profile
|
datapatch 수행($ORACLE_HOME/sqlplus/admin/glogin.sql에 영향을 끼칠만한 sql 없는지 확인 후 진행)
|
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
|
$ cd $ORACLE_HOME/OPatch
$ ./datapatch -verbose
SQL Patching tool version 19.32.0.0.0 Production on Sun Aug 30 22:53:26 2026
Copyright (c) 2012, 2026, Oracle. All rights reserved.
Log file for this invocation: /app/oracle/cfgtoollogs/sqlpatch/sqlpatch_246402_2026_08_30_22_53_26/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 37847857 (OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857)):
Binary registry: Not installed
SQL registry: Applied successfully on 21-DEC-25 03.56.19.928163 PM
Interim patch 39222882 (OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882)):
Binary registry: Installed
SQL registry: Not installed
Current state of release update SQL patches:
Binary registry:
19.32.0.0.0 Release_Update 260705220710: Installed
SQL registry:
Applied 19.28.0.0.0 Release_Update 250705030417 successfully on 21-DEC-25 03.59.02.872697 PM
Adding patches to installation queue and performing prereq checks...done
Installation queue:
The following interim patches will be rolled back:
37847857 (OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857))
Patch 39472050 (Database Release Update : 19.32.0.0.260721 (39472050)):
Apply from 19.28.0.0.0 Release_Update 250705030417 to 19.32.0.0.0 Release_Update 260705220710
The following interim patches will be applied:
39222882 (OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882))
Installing patches...
Patch installation complete. Total patches installed: 3
Validating logfiles...done
Patch 37847857 rollback: SUCCESS
logfile: /app/oracle/cfgtoollogs/sqlpatch/37847857/27534561/37847857_rollback_ORACLE19_2026Aug30_22_55_41.log (no errors)
Patch 39472050 apply: SUCCESS
logfile: /app/oracle/cfgtoollogs/sqlpatch/39472050/28919163/39472050_apply_ORACLE19_2026Aug30_22_57_28.log (no errors)
Patch 39222882 apply: SUCCESS
logfile: /app/oracle/cfgtoollogs/sqlpatch/39222882/28830205/39222882_apply_ORACLE19_2026Aug30_22_57_10.log (no errors)
SQL Patching tool complete on Sun Aug 30 22:59:58 2026
|
db패치 정보 확인
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
SQL>
set lines 200 pages 1000
column action_time format a20
column action format a10
column status format a10
column description format a60
column version format a10
select to_char(action_time, 'yyyy/mm/dd hh24:mi:ss') as action_time
,action
,status
,description
,source_version
,target_version
,patch_id
from dba_registry_sqlpatch
order by action_time;
ACTION_TIME ACTION STATUS DESCRIPTION SOURCE_VERSION TARGET_VERSION PATCH_ID
-------------------- ---------- ---------- ------------------------------------------------------------ --------------- --------------- ----------
2025/12/21 15:56:19 APPLY SUCCESS OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857) 19.1.0.0.0 19.28.0.0.0 37847857
2025/12/21 15:59:02 APPLY SUCCESS Database Release Update : 19.28.0.0.250715 (37960098) 19.1.0.0.0 19.28.0.0.0 37960098
2026/08/30 22:57:10 ROLLBACK SUCCESS OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857) 19.28.0.0.0 19.32.0.0.0 37847857
2026/08/30 22:57:28 APPLY SUCCESS OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882) 19.28.0.0.0 19.32.0.0.0 39222882
2026/08/30 22:59:25 APPLY SUCCESS Database Release Update : 19.32.0.0.260721 (39472050) 19.28.0.0.0 19.32.0.0.0 39472050
|
정상적으로 패치됨
패치 버전 확인
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
$ opatch lspatches -oh $GRID_HOME
39526364;OCW RELEASE UPDATE 19.32.0.0.0 (39526364)
39503034;ACFS RELEASE UPDATE 19.32.0.0.0 (39503034)
39472050;Database Release Update : 19.32.0.0.260721 (39472050)
39107855;TOMCAT RELEASE UPDATE 19.0.0.0.0 (39107855)
39107825;DBWLM RELEASE UPDATE 19.0.0.0.0 (39107825)
OPatch succeeded.
$ opatch lspatches -oh $ORACLE_HOME
39222882;OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882)
39526364;OCW RELEASE UPDATE 19.32.0.0.0 (39526364)
39472050;Database Release Update : 19.32.0.0.260721 (39472050)
OPatch succeeded.
|
19.32로 패치됨
crs 상태 확인
|
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
|
$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE ora19 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE ora19 STABLE
ora.asm
ONLINE ONLINE ora19 Started,STABLE
ora.ons
OFFLINE OFFLINE ora19 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE ora19 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE ora19 STABLE
ora.oracle19.db
1 ONLINE ONLINE ora19 Open,HOME=/app/oracl
e/product/19c32,STAB
LE
--------------------------------------------------------------------------------
|
정상임
oratab 확인
|
1
2
3
|
$ cat /etc/oratab | grep -E '(\+ASM|oracle19)'
+ASM:/app/grid/product/19c32:N # line added by Agent
oracle19:/app/oracle/product/19c32:N # line added by Agent
|
신규 엔진 경로로 정상적으로 적혀있음
grid 패치 레벨 조회
|
1
2
|
$ crsctl query has releasepatch
Oracle Clusterware release patch level is [3004609525] and the complete list of patches [39107825 39107855 39472050 39503034 39526364 ] have been applied on the local node. The release patch string is [19.32.0.0.0].
|
19.32로 정상적으로 표시됨
원상 복구
실제 롤백 전에는 해당 패치 README의 롤백 절차와 현재 적용된 one-off 패치의 호환성을 반드시 확인해야함
srvctl에 등록된 DB의 Oracle Home을 기존 Oracle Home으로 변경
|
1
|
$ /app/grid/product/19c32/bin/srvctl modify database -db oracle19 -o /app/oracle/product/19c
|
srvctl에 등록된 DB의 패스워드 파일 경로를 신규 Oracle Home으로 변경
|
1
|
$ /app/grid/product/19c32/bin/srvctl modify database -d oracle19 -pwfile /app/oracle/product/19c/dbs/orapworacle19
|
srvctl config database 설정 확인
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
$ /app/grid/product/19c32/bin/srvctl config database -db oracle19
Database unique name: oracle19
Database name: oracle19
Oracle home: /app/oracle/product/19c
Oracle user: oracle
Spfile: +DATA/ORACLE19/PARAMETERFILE/spfile.266.1220457563
Password file: /app/oracle/product/19c/dbs/orapworacle19
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups: DATA
Services:
OSDBA group:
OSOPER group:
Database instance: oracle19
|
정상적으로 srvctl의 oracle home 경로 및 패스워드 파일 경로가 기존 엔진 경로로 변경됨
db의 datapatch는 grid home 원상 복구(자동 재기동) 후 수행 예정
Grid Home 원상 복구
root 유저에서 기존 Grid Home 등록 및 prepatch 수행(이 명령은 어떤 서비스도 종료하지 않음)
|
1
2
3
4
5
6
7
8
|
# export ORACLE_HOME=/app/grid/product/19c
# $ORACLE_HOME/rdbms/install/rootadd_rdbms.sh
# $ORACLE_HOME/crs/install/roothas.sh -prepatch -dstcrshome $ORACLE_HOME
Using configuration parameter file: /app/grid/product/19c/crs/install/crsconfig_params
The log of current session can be found at:
/app/oracle/crsdata/ora19/crsconfig/hapatch_2026-09-01_07-09-13PM.log
2026/09/01 19:09:16 CLSRSC-347: Successfully unlock /app/grid/product/19c
2026/09/01 19:09:16 CLSRSC-671: Pre-patch steps for patching GI home successfully completed.
|
postpatch 수행(다운타임 시작)
아래 명령을 수행하면 Oracle Restart 리소스가 중지된 뒤 기존 Grid Home을 기준으로 다시 기동됨
has도 -f 옵션으로 내려지고, db도 abort 옵션으로 내려짐, 원치 않는 경우 먼저 srvctl stop database -d oracle19를 수행할 수 있음
|
1
2
3
4
5
6
|
# $ORACLE_HOME/crs/install/roothas.sh -postpatch -dstcrshome $ORACLE_HOME
Using configuration parameter file: /app/grid/product/19c/crs/install/crsconfig_params
The log of current session can be found at:
/app/oracle/crsdata/ora19/crsconfig/hapatch_2026-09-01_07-10-10PM.log
2026/09/01 19:10:55 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
2026/09/01 19:12:04 CLSRSC-672: Post-patch steps for patching GI home successfully completed.
|
참고용. 위 명령 수행시 db 중지부터 기동까지 걸린 시간 확인(alert log)
|
1
2
3
4
5
6
7
|
$ tail -300f /app/oracle/diag/rdbms/oracle19/oracle19/trace/alert_oracle19.log
2026-09-01T19:10:10.570326+09:00
Shutting down ORACLE instance (abort) (OS id: 387903)
...
2026-09-01T19:12:04.483899+09:00
CJQ0 started with pid=54, OS id=389940
Completed: ALTER DATABASE OPEN /* db agent *//* {0:0:2} */
|
2분정도 소요됨(다운타임 끝)
Oracle Inventory의 기존 및 신규 Grid Home 속성 갱신
기존 Grid Home을 CRS=TRUE로, 신규 Grid Home을 CRS=FALSE로 변경
|
1
2
3
4
5
6
7
8
9
10
11
|
$ /app/grid/product/19c/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/app/grid/product/19c CRS=TRUE
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 7359 MB Passed
The inventory pointer is located at /etc/oraInst.loc
$ /app/grid/product/19c32/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/app/grid/product/19c32 CRS=FALSE
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 7359 MB Passed
The inventory pointer is located at /etc/oraInst.loc
|
oraInventory 파일 확인
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
$ cat /app/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2026, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>12.2.0.7.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraGI19Home1" LOC="/app/grid/product/19c" TYPE="O" IDX="1" CRS="true"/>
<HOME NAME="OraDB19Home1" LOC="/app/oracle/product/19c" TYPE="O" IDX="2"/>
<HOME NAME="OraGI19Home2" LOC="/app/grid/product/19c32" TYPE="O" IDX="3"/>
<HOME NAME="OraDB19Home2" LOC="/app/oracle/product/19c32" TYPE="O" IDX="4"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
|
정상적으로 업데이트됨(기존 Grid home에 CRS=true가 안들어가 있으면 updateNodeList 명령 재수행)
root, grid, oracle 유저 환경변수 변경
root 유저의 .bash_profile에서 GRID_HOME과 DB_HOME을 기존 Home으로 변경
|
1
2
3
4
5
6
7
|
# vi ~root/.bash_profile
...
export ORACLE_BASE=/app/oracle
export GRID_HOME=/app/grid/product/19c
export DB_HOME=$ORACLE_BASE/product/19c
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$GRID_HOME/bin:$GRID_HOME/OPatch:$PATH
...
|
oracle 유저의 .bash_profile에서 GRID_HOME과 DB_HOME을 기존 Home으로 변경
|
1
2
3
4
5
6
7
|
# vi ~oracle/.bash_profile
...
export ORACLE_BASE=/app/oracle
export GRID_HOME=/app/grid/product/19c
export ORACLE_HOME=$ORACLE_BASE/product/19c
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$GRID_HOME/bin:$PATH
...
|
기존 .bash_profile에 설정된 alias와 기타 환경변수는 유지하고 Home 관련 경로만 변경함
환경변수를 변경한 뒤 각 유저로 다시 로그인하거나 .bash_profile을 적용
|
1
|
$ . ~/.bash_profile
|
datapatch 수행($ORACLE_HOME/sqlplus/admin/glogin.sql에 영향을 끼칠만한 sql 없는지 확인 후 진행)
|
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
|
$ cd $ORACLE_HOME/OPatch
$ ./datapatch -verbose
SQL Patching tool version 19.28.0.0.0 Production on Tue Sep 1 19:17:36 2026
Copyright (c) 2012, 2025, Oracle. All rights reserved.
Log file for this invocation: /app/oracle/cfgtoollogs/sqlpatch/sqlpatch_393786_2026_09_01_19_17_36/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 37847857 (OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857)):
Binary registry: Installed
SQL registry: Rolled back successfully on 30-AUG-26 10.57.10.070954 PM
Interim patch 39222882 (OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882)):
Binary registry: Not installed
SQL registry: Applied successfully on 30-AUG-26 10.57.28.131683 PM
Current state of release update SQL patches:
Binary registry:
19.28.0.0.0 Release_Update 250705030417: Installed
SQL registry:
Applied 19.32.0.0.0 Release_Update 260705220710 successfully on 30-AUG-26 10.59.25.218637 PM
Adding patches to installation queue and performing prereq checks...done
Installation queue:
The following interim patches will be rolled back:
39222882 (OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882))
Patch 39472050 (Database Release Update : 19.32.0.0.260721 (39472050)):
Rollback from 19.32.0.0.0 Release_Update 260705220710 to 19.28.0.0.0 Release_Update 250705030417
The following interim patches will be applied:
37847857 (OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857))
Installing patches...
Patch installation complete. Total patches installed: 3
Validating logfiles...done
Patch 39222882 rollback: SUCCESS
logfile: /app/oracle/cfgtoollogs/sqlpatch/39222882/28830205/39222882_rollback_ORACLE19_2026Sep01_19_18_28.log (no errors)
Patch 39472050 rollback: SUCCESS
logfile: /app/oracle/cfgtoollogs/sqlpatch/39472050/28919163/39472050_rollback_ORACLE19_2026Sep01_19_20_06.log (no errors)
Patch 37847857 apply: SUCCESS
logfile: /app/oracle/cfgtoollogs/sqlpatch/37847857/27534561/37847857_apply_ORACLE19_2026Sep01_19_19_51.log (no errors)
SQL Patching tool complete on Tue Sep 1 19:21:53 2026
|
db패치 정보 확인
|
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
|
SQL>
set lines 200 pages 1000
column action_time format a20
column action format a10
column status format a10
column description format a60
column version format a10
select to_char(action_time, 'yyyy/mm/dd hh24:mi:ss') as action_time
,action
,status
,description
,source_version
,target_version
,patch_id
from dba_registry_sqlpatch
order by action_time;
ACTION_TIME ACTION STATUS DESCRIPTION SOURCE_VERSION TARGET_VERSION PATCH_ID
-------------------- ---------- ---------- ------------------------------------------------------------ --------------- --------------- ----------
2025/12/21 15:56:19 APPLY SUCCESS OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857) 19.1.0.0.0 19.28.0.0.0 37847857
2025/12/21 15:59:02 APPLY SUCCESS Database Release Update : 19.28.0.0.250715 (37960098) 19.1.0.0.0 19.28.0.0.0 37960098
2026/08/30 22:57:10 ROLLBACK SUCCESS OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857) 19.28.0.0.0 19.32.0.0.0 37847857
2026/08/30 22:57:28 APPLY SUCCESS OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882) 19.28.0.0.0 19.32.0.0.0 39222882
2026/08/30 22:59:25 APPLY SUCCESS Database Release Update : 19.32.0.0.260721 (39472050) 19.28.0.0.0 19.32.0.0.0 39472050
2026/09/01 19:19:51 ROLLBACK SUCCESS OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882) 19.32.0.0.0 19.28.0.0.0 39222882
2026/09/01 19:20:06 APPLY SUCCESS OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857) 19.32.0.0.0 19.28.0.0.0 37847857
2026/09/01 19:21:30 ROLLBACK SUCCESS Database Release Update : 19.32.0.0.260721 (39472050) 19.32.0.0.0 19.28.0.0.0 39472050
8 rows selected.
|
정상적으로 롤백됨
패치 버전 확인
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
$ opatch lspatches -oh $GRID_HOME
38124772;TOMCAT RELEASE UPDATE 19.0.0.0.0 (38124772)
37962946;OCW RELEASE UPDATE 19.28.0.0.0 (37962946)
37962938;ACFS RELEASE UPDATE 19.28.0.0.0 (37962938)
37960098;Database Release Update : 19.28.0.0.250715 (37960098)
36758186;DBWLM RELEASE UPDATE 19.0.0.0.0 (36758186)
OPatch succeeded.
$ opatch lspatches -oh $ORACLE_HOME
37847857;OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857)
37962946;OCW RELEASE UPDATE 19.28.0.0.0 (37962946)
37960098;Database Release Update : 19.28.0.0.250715 (37960098)
OPatch succeeded.
|
19.28로 롤백됨
crs 상태 확인
|
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
|
$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE ora19 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE ora19 STABLE
ora.asm
ONLINE ONLINE ora19 Started,STABLE
ora.ons
OFFLINE OFFLINE ora19 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE ora19 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE ora19 STABLE
ora.oracle19.db
1 ONLINE ONLINE ora19 Open,HOME=/app/oracl
e/product/19c,STABLE
--------------------------------------------------------------------------------
|
정상임
oratab 확인
|
1
2
3
|
$ cat /etc/oratab | grep -E '(\+ASM|oracle19)'
+ASM:/app/grid/product/19c:N # line added by Agent
oracle19:/app/oracle/product/19c:N # line added by Agent
|
기존 엔진 경로로 정상적으로 적혀있음
grid 패치 레벨 조회
|
1
2
|
$ crsctl query has releasepatch
Oracle Clusterware release patch level is [880628325] and the complete list of patches [36758186 37960098 37962938 37962946 38124772 ] have been applied on the local node. The release patch string is [19.28.0.0.0].
|
19.28로 정상적으로 롤백되어 표시됨
결론 :
Out-of-place(OOP) 패치를 이용해 다운타임을 줄이면서 패치를 빠르게 수행할 수 있음
그리고 문제가 발생해도 빠르게 롤백도 가능함
이는 새로운 엔진을 구성한뒤 엔진만 바꿔치기 하는 방식이기 떄문에 가능함
하지만 엔진 2개 만큼의 디스크 공간을 더 사용한다는 단점이 있음
참조 :
https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/switch-gi-home-patching.html
https://docs.oracle.com/en/database/oracle/oracle-database/19/upgor/upgrading-and-patching-oracle-restart.html
https://docs.oracle.com/en/database/oracle/oracle-database/19/cwaix/applying-patches-to-oracle-asm.html
https://docs.oracle.com/en/database/oracle/oracle-database/19/rilin/applying-patches-during-database-install-or-upgrade.html
https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/running-oracle-universal-installer-to-install-oracle-database.html
https://docs.oracle.com/en/database/oracle/oracle-database/19/haovw/apply-software-update.html
https://www.oracle.com/kr/database/technologies/oracle19c-linux-downloads.html
https://docs.oracle.com/en/database/oracle/oracle-database/19/rnrdm/linux-platform-issues.html#GUID-69942B7A-B662-48DC-8FC1-DFC56A3719D6
https://mikedietrichde.com/2022/05/17/simple-database-installation-with-applyru-and-applyoneoffs/
https://db-expert.tistory.com/42
https://www.youtube.com/watch?v=GKDPlEU8vDU&t=1s
https://dohdatabase.com/2024/11/12/how-to-patch-oracle-restart-19c-and-oracle-database-using-out-of-place-switch-home/
'ORACLE > Install' 카테고리의 다른 글
| Oracle Linux 10.2에 Oracle 26ai 설치 가이드 (0) | 2026.09.10 |
|---|---|
| 오라클 19c 싱글 환경 opatchauto 이용 19.32 RU 패치 가이드 (0) | 2026.08.23 |
| 오라클 26ai DBCA 이용 패치 가이드 (0) | 2026.08.20 |
| 오라클 19c Restart 환경 opatchauto 이용 19.31 RU 패치 가이드 (0) | 2026.06.23 |
| 오라클 19c Restart(ASM) to 싱글(FS) ADG 구성 가이드 (0) | 2026.06.08 |
