프린트 하기 URL 복사

OS 환경 : Oracle Linux 8.7 (64bit)

 

DB 환경 : Oracle Database 19.32.0.0

 

방법 : 오라클 19c 싱글 환경 opatchauto 이용 19.32 RU 패치 가이드

본문에서는 19.31이 설치된 싱글DB 환경에 19.32 패치를 적용하는 방법을 설명함
이때 opatch apply를 개별적으로 수행하지 않고 opatchauto를 이용해 커맨드 한줄로 수행하는 방법을 설명함
원래 싱글 db를 패치할때는 db 패치파일 경로에 가서 opatch apply 명령만 수행해주면 패치가 수행됨(오라클 패치 파일 readme에도 opatch apply를 사용하라고 되어 있음)
그리고 rac나 restart 환경에서 패치 할때는 opatchauto를 사용해 편하게 패치할수도 있음
본문에서는 opatch 옵션중 하나인 sidb 옵션을 이용해 싱글 db에서 opatchauto를 수행하는 방법을 설명함

 

 

패치파일은 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>

 

 

테스트
현재 패치 정보 확인

1
2
3
4
5
$ opatch lspatches
39034528;Database Release Update : 19.31.0.0.260421 (REL-APR2026) (39034528)
37654975;OCW RELEASE UPDATE 19.27.0.0.0 (37654975)
 
OPatch succeeded.

19.31 패치가 적용되어 있음

 

 

패치파일 unzip

1
2
3
4
5
6
7
8
9
10
$ cd /app/oracle/media
$ unzip -q p39618711_190000_Linux-x86-64.zip
$ ls -al 39618711
total 60
drwxrwxrwx 4 oracle dba    80 Jul 21 20:39 .
drwxrwxr-x 3 oracle dba   215 Aug  9 20:08 ..
drwxr-xr-x 4 oracle dba    67 Jun 29 22:23 39222882
drwxr-x--- 8 oracle dba   159 Jul 14 03:55 39467003
-rw-rw-r-- 1 oracle dba 33440 Jul 21 13:09 PatchSearch.xml
-rw-r--r-- 1 oracle dba 23512 Jul 21 20:39 README.html

 

 

opatch 파일 업데이트

1
2
3
$ cd $ORACLE_HOME
$ mv OPatch OPatchold
$ unzip -q /app/oracle/media/p6880880_190000_Linux-x86-64.zip

 

 

opatch 버전 확인

1
2
3
4
$ opatch version
OPatch Version: 12.2.0.1.52
 
OPatch succeeded.

 

 

opatchauto 수행(db, grid 패치가 모두 존재하는 39467003 경로에서 수행)

1
2
3
4
5
$ cd /app/oracle/media/39618711/39467003
$ opatchauto apply
 
opatchauto must run from Grid Home with current arguments. Please retry it inside Grid Home
opatchauto returns with error code = 2

oracle 유저로 수행하니 안됨(현재 grid 유저는 존재하지 않음)

 

 

root 유저로 opatchauto 수행

1
2
3
4
5
6
7
8
# export ORACLE_BASE=/app/oracle;
# export ORACLE_HOME=$ORACLE_BASE/product/19c;
# export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
# cd /app/oracle/media/39618711/39467003
# opatchauto apply
 
opatchauto must run from Grid Home with current arguments. Please retry it inside Grid Home
opatchauto returns with error code = 2

동일하게 에러 발생함

 

 

root 유저로 opatchauto 수행(sidb 옵션 사용)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# opatchauto apply -sidb
 
OPatchauto session is initiated at Sun Aug  9 21:21:36 2026
 
System initialization log file is /app/oracle/product/19c/cfgtoollogs/opatchautodb/systemconfig2026-08-09_09-21-47PM.log.
 
Please set ORACLE_SID property to proceed
OPATCHAUTO-72050: System instance creation failed.
OPATCHAUTO-72050: Failed while retrieving system information.
OPATCHAUTO-72050: Please check log file for more details.
 
OPatchauto session completed at Sun Aug  9 21:21:47 2026
Time taken to complete the session 0 minute, 1 second
 
Topology creation failed.

이번엔 sid를 찾을수 없다고 나옴
이 경우 옵션에 sid를 사용해주거나 ORACLE_SID 환경변수를 설정해주면 됨

 

 

root 유저로 opatchauto 수행(sidb, sid 옵션 사용)
(db 및 리스너를 내리지 않고 바로 opatchauto 수행함)

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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# export ORACLE_SID=ORA19DBFS;
# opatchauto apply -sidb -sid ORA19DBFS
 
OPatchauto session is initiated at Sun Aug  9 21:23:42 2026
 
System initialization log file is /app/oracle/product/19c/cfgtoollogs/opatchautodb/systemconfig2026-08-09_09-23-47PM.log.
 
Session log file is /app/oracle/product/19c/cfgtoollogs/opatchauto/opatchauto2026-08-09_09-23-48PM.log
The id for this session is 7KUD
 
Executing OPatch prereq operations to verify patch applicability on home /app/oracle/product/19c
Patch applicability verified successfully on home /app/oracle/product/19c
 
 
Executing patch validation checks on home /app/oracle/product/19c
Patch validation checks successfully completed on home /app/oracle/product/19c
 
 
Verifying SQL patch applicability on home /app/oracle/product/19c
No sqlpatch prereq operations are required on the local node for this home
No step execution required.........
 
 
Preparing to bring down database service on home /app/oracle/product/19c
Successfully prepared home /app/oracle/product/19c to bring down database service
 
 
Bringing down database service on home /app/oracle/product/19c
Database service successfully brought down on home /app/oracle/product/19c
 
 
Performing prepatch operation on home /app/oracle/product/19c
Prepatch operation completed successfully on home /app/oracle/product/19c
 
 
Start applying binary patch on home /app/oracle/product/19c
Binary patch applied successfully on home /app/oracle/product/19c
 
 
Running rootadd_rdbms.sh on home /app/oracle/product/19c
Successfully executed rootadd_rdbms.sh on home /app/oracle/product/19c
 
 
Performing postpatch operation on home /app/oracle/product/19c
Postpatch operation completed successfully on home /app/oracle/product/19c
 
 
 
 
Starting database service on home /app/oracle/product/19c
Database service successfully started on home /app/oracle/product/19c
 
 
Preparing home /app/oracle/product/19c after database service restarted
No step execution required.........
 
 
Trying to apply SQL patch on home /app/oracle/product/19c
SQL patch applied successfully on home /app/oracle/product/19c
 
OPatchAuto successful.
 
--------------------------------Summary--------------------------------
 
Patching is completed successfully. Please find the summary as follows:
 
Host:ora19fs
SIDB Home:/app/oracle/product/19c
Version:19.0.0.0.0
Summary:
 
==Following patches were SKIPPED:
 
Patch: /app/oracle/media/39618711/39467003/39503034
Reason: This patch is not applicable to this specified target type - "oracle_database"
 
Patch: /app/oracle/media/39618711/39467003/39107825
Reason: This patch is not applicable to this specified target type - "oracle_database"
 
Patch: /app/oracle/media/39618711/39467003/39107855
Reason: This patch is not applicable to this specified target type - "oracle_database"
 
 
==Following patches were SUCCESSFULLY applied:
 
Patch: /app/oracle/media/39618711/39467003/39472050
Log: /app/oracle/product/19c/cfgtoollogs/opatchauto/core/opatch/opatch2026-08-09_21-27-16PM_1.log
 
Patch: /app/oracle/media/39618711/39467003/39526364
Log: /app/oracle/product/19c/cfgtoollogs/opatchauto/core/opatch/opatch2026-08-09_21-27-16PM_1.log
 
 
 
OPatchauto session completed at Sun Aug  9 21:46:45 2026
Time taken to complete the session 22 minutes, 59 seconds

완료됨

 

 

엔진 패치 정보 확인

1
2
3
4
5
$ opatch lspatches
39526364;OCW RELEASE UPDATE 19.32.0.0.0 (39526364)
39472050;Database Release Update : 19.32.0.0.260721 (39472050)
 
OPatch succeeded.

자동으로 DB RU 패치, OCW 패치까지 진행해줌

 

 

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
30
31
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/05/31 10:59:10  APPLY      SUCCESS    Database Release Update : 19.27.0.0.250415 (37642901)        19.1.0.0.0      19.27.0.0.0       37642901
2026/05/18 03:42:09  APPLY      SUCCESS    Database Release Update : 19.31.0.0.260421 (39034528)        19.27.0.0.0     19.31.0.0.0       39034528
2026/05/18 04:27:35  ROLLBACK   SUCCESS    Database Release Update : 19.31.0.0.260421 (39034528)        19.31.0.0.0     19.28.0.0.0       39034528
2026/05/20 12:17:22  APPLY      SUCCESS    Database Release Update : 19.31.0.0.260421 (REL-APR2026) (39 19.28.0.0.0     19.31.0.0.0       39034528
                                           034528)
2026/05/20 12:37:04  ROLLBACK   SUCCESS    Database Release Update : 19.31.0.0.260421 (REL-APR2026) (39 19.31.0.0.0     19.27.0.0.0       39034528
                                           034528)
2026/05/24 20:34:23  APPLY      SUCCESS    Database Release Update : 19.31.0.0.260421 (REL-APR2026) (39 19.27.0.0.0     19.31.0.0.0       39034528
                                           034528)
2026/08/09 21:46:31  APPLY      SUCCESS    Database Release Update : 19.32.0.0.260721 (39472050)        19.31.0.0.0     19.32.0.0.0       39472050
 
7 rows selected.

정상적으로 datapatch 까지 적용됨

 

 

db를 내리지 않았지만 자동으로 db를 내리고, 엔진 패치를 수행하고 datapatch 까지 적용시켜줌(OJVM 패치는 별도로 패치해줘야함)

 

 

참고용. opatchauto apply help

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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# opatchauto apply -help
 
OPatchauto session is initiated at Sun Aug  9 21:22:58 2026
Oracle OPatchAuto Version 12.2.1.52.0
Copyright (c) 2016, Oracle Corporation.  All rights reserved.
 
DESCRIPTION
    This operation applies patch.
 
    Purpose:
        Apply a System Patch to Oracle Home. If patch location is not
        specified,  current directory will be taken as the patch location.
 
SYNTAX
    opatchauto apply [ <patch-location> ]
                     [ -phBaseDir <patch.base.directory> ]
                     [ -oh <home> ] [ -log <log> ]
                     [ -logLevel <log_priority> ]
                     [ -customLogDir <customLogDir> ] [ -binary ]
                     [ -analyze ]
                     [ -invPtrLoc <inventory.pointer.location> ]
                     [ -host <host> ] [ -wallet <wallet> ]
                     [ -force_conflict ] [ -skip_conflict ]
                     [ -no_relink ] [ -deleteInactivePatches ]
                     [ -skip_datapatch ] [ -skip_twostage_enable ]
                     [ -skip_rrpatch ] [ -post_twostage_enable ]
                     [ -extreme_perf ] [ -jre <jre> ]
                     [ -drain_timeout <drain.timeout> ]
                     [ -remote-image-location <remote.image.location> ]
                     [ -port <port> ] [ -inplace ] [ -sidb ] [ -sdb ]
                     [ -outofplace ] [ -rolling ]
                     [ -database <database> ] [ -silent <silent.key> ]
                     [ -prepare-clone ] [ -norestart ] [ -switch-clone ]
                     [ -nonrolling ] [ -sid <sid> ]
 
OPTIONS
    -phBaseDir <patch.base.directory>
        The location of base patch directory.
 
    -oh <home>
        The location of the oracle home.
 
    -log <log>
        The log location.
 
    -logLevel <log_priority>
        The log level (defaults to "INFO").
          Supported values:
            [SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL, OFF]
 
    -customLogDir <customLogDir>
        The location for creating the log files.
 
    -binary
        Forces execution of "-phases offline:binary-patching".
 
    -analyze
        If this option is selected, the environment will be analysed for suitability of the patch on each home, without affecting the home.
        The patch will not be applied or rolled back, and targets will not be shut down.
 
    -invPtrLoc <inventory.pointer.location>
        The central inventory pointer file location.
 
    -host <host>
        The remote host or host:port.
 
    -wallet <wallet>
        The location of the wallet file. It is a mandatory option from DB 12.1 onwards when patching is performed as non-root user. The current running user must be a part of the wallet entry.
 
    -force_conflict
        If a conflict exist which prevents the patch from being applied, this flag can be used to force application of the patch.
        All the conflicting patches will be removed before applying the current patch.
 
    -skip_conflict
        If a conflict exist which prevents the patch from being applied, this flag can be used to skip the conflicting patches.
        Remaining patches will be applied after skipping conflicting patches.
 
    -no_relink
        The nolink option does not perform any make operations. This option can be used during multiple patch applications and perform the linking step only once.
        It is the job of the opatchauto users to make sure to execute opatchauto without this option at the end, so that compilation happens once.
 
    -deleteInactivePatches
        Used for deleting inactive patches on the home before applying the incoming patches.
        This option is required only for targets of version older than 23ai.
 
    -skip_datapatch
        Skips running the sqlpatch steps during the session. SQL changes will be skipped on all databases that are being patched as part of the session.
 
    -skip_twostage_enable
        Skips enabling the previously applied two-stage patches during apply.
 
    -skip_rrpatch
        Skips running any rrpatch related actions during apply and rollback.
 
    -post_twostage_enable
        Enables the incoming patches after applying the patches, towards the end of the patching session.
        It is effective on the last node of patching.
 
    -extreme_perf
        Relinks the binary with extremeperf make option to enable RAC in OOP patching.
 
    -jre <jre>
        The jre directory path, containing the java that will be used for patching. The path provided will be used only for local patching and will not be used on the remote nodes.
 
    -drain_timeout <drain.timeout>
        Drain timeout is the maximum time the service waits before exiting (in case of
        srvctl stop service or srvctl stop instance) or proceeding to stop database
        (srvctl stop database), until the draining of sessions is completed.
        If session draining completes in 10 seconds and the drain timeout value
        (on CLI or resource attribute) is 100 seconds, then SRVCTL moves on after
        10 seconds. It does not wait for the remaining 90 seconds.
 
    -remote-image-location <remote.image.location>
        The remote image location path.
 
    -port <port>
        Port for connecting to catalog database. The default port is set as
        '1521'.
 
    -inplace
        This option can be used to perform in place patching through opatchauto.
        Here opatchauto performs the patching operation on the original Oracle Home,
        so there will be down time and high availability of services will get affected.
        The default patching mode from opatchauto is inplace.
 
    -sidb
        To signify patching standalone sidb.
        This option is supported only from DB 12.2 onwards.
 
    -sdb
        To signify patching sharded database. Run 'opatchauto <apply|rollback>
         -sdb -help' to get more help on patching a sharded database.
 
    -outofplace
        This option can be used to perform out place patching through opatchauto in a single session,
        where cloning of Oracle Home and Switch of Oracle Home to cloned Oracle Home happens together.
        This option is supported only from DB 12.2 onwards.
 
    -rolling
        Enables sdb rolling mode where database(s) are patched one after
        the other.
 
    -database <database>
        List of databases to be patched. This option is not supported for out of place patching.
 
    -silent <silent.key>
        This option is used to provide a properties file containing original home path to expected clone home path.
        The clone home path provided in this file will be considered for clone home creation.
         If for any requested home, a clone path is not mentioned in the file, then opatchauto will create a default path for it.Please ensure the selected clone home path for each home should not be existing from before on any node.
 
    -prepare-clone
        This operation is used to prepare clone Oracle Home in out of place patching mode. This option is supported only from DB 12.2 onwards.
 
    -norestart
        The no restart option during execution.
 
    -switch-clone
        This operation is used to switch services from original Oracle Home to clone Oracle Home.
        In case of rollback it switches back from cloned Oracle Home to Original Oracle Home.
        This option is supported only from DB 12.2 onwards.
 
    -nonrolling
        Enables non-rolling mode. In case of inplace patching is performed on shared homes, this option is mandatory
        but if out of place patching is performed and the patch is a rolling patch, then this option is not required.
 
    -sid <sid>
        This option can be used for both Shard patching as well as standalone SIDB patching.
        In context to standalone SIDB patching it will take the instance name of the database as value.
        In context to shard patching it will take name of the catalog database. If -service or -sid is not provided in the
        commandline, the default sid is used from the environment variable 'ORACLE_SID'
 
PARAMETERS
    patch-location
        The patch location.
 
EXAMPLES
    To patch GI home and all RAC homes:
    '<GI_HOME>/OPatch/opatchauto apply <Patch_Location>'
 
    To patch multiple homes:
    '<GI_HOME>/OPatch/opatchauto apply <Patch_Location> -oh <GI_HOME>,<RAC_HOME1>,<RAC_HOME2>'
 
    To patch databases running only from RAC homes:
    '<RAC_HOME>/OPatch/opatchauto apply <Patch_Location>-database db1,db2...dbn'
 
    To patch software-only installation:
    '<RAC_HOME>/OPatch/opatchauto apply <Patch_Location> -oh <RAC_HOME>' OR
    '<GI_HOME>/OPatch/opatchauto apply <Patch_Location>-oh <GI_HOME>'

 

 

결론 :
opatchauto apply의 sidb, sid 옵션을 사용하면 싱글 db에서도 편하게 패치를 수행할 수 있음
이 경우 db를 내리지 않아도 자동으로 db를 내리고, 엔진 패치를 수행하고 db를 기동시킨 후 datapatch 까지 적용시켜줌
그리고 OCW 패치까지 같이 적용해줌
하지만 restart, rac 패치와 마찬가지로 OJVM 패치는 별도로 패치를 해줘야함

 

 

참조 : 

오라클 19c Restart 환경 opatchauto 이용 19.31 RU 패치 가이드 ( https://positivemh.tistory.com/1404 )

오라클 19c RAC 환경 opatchauto 이용 19.31 RU 패치 가이드 ( https://positivemh.tistory.com/1390 )