프린트 하기 URL 복사

OS 환경 : Oracle Linux 8.7 (64bit)

 

DB 환경 : Oracle Database 19.31.0.0

 

방법 : 오라클 19c oraInventory 비정상 시 runInstaller attachHome 재등록 방법

본문에서는 oraInventory가 비정상적으로 되어 있는 경우 어떤 문제가 발생하는지
그리고 이 경우 어떻게 조치 해야하는지를 설명함

 

 

테스트
현재 oraInventory 경로 확인

1
2
3
4
5
6
$ cat /etc/oraInst.loc
inventory_loc=/app/oraInventory
inst_group=dba
$ cat $ORACLE_HOME/oraInst.loc
inventory_loc=/app/oraInventory
inst_group=dba

현재 인벤토리 경로는 /app/oraInventory로 되어있음

 

 

oraInventory 경로 실제로 존재하는지 확인

1
2
3
4
5
6
7
8
$ cd /app
$ ls -al
total 8
drwxrwxr-x.  5 oracle dba        55 Aug  9 20:00 .
dr-xr-xr-x. 21 root   root     4096 Feb 14 22:30 ..
drwxrwxr-x.  2 oracle dba         6 May 28  2025 oraarch
drwxrwxr-x. 17 oracle dba      4096 Jan 30  2026 oracle
drwxrwx---   4 oracle oinstall   37 Aug  9 03:07 oraInventory

정상적으로 존재함

 

 

패치 정보 조회

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.

정상적으로 확인 가능함

 

 

기존 oraInventory 폴더 이름 변경(장애 유발)

1
2
3
$ mv oraInventory/ oraInventorybak
$ ls
oraarch  oracle  oraInventorybak

 

 

패치 정보 재조회

1
2
3
4
5
6
7
8
$ opatch lspatches
Inventory load failed... LsPatchesSession::loadAndPrintInstalledPatch()
LsPatchesSession failed: OPatch failed to locate Central Inventory.
Possible causes are:
    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.
 
OPatch failed with error code 2

인벤토리가 커럽트 났다고 나옴

 

 

이 경우 패치를 하려고 해도 에러가 발생함
패치 시도(19.32)

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
$ cd /app/oracle/media/39618711/39467003/39472050
$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.52
Copyright (c) 2026, Oracle Corporation.  All rights reserved.
 
 
Oracle Home       : /app/oracle/product/19c
Central Inventory : /app/oraInventory
   from           : /app/oracle/product/19c/oraInst.loc
OPatch version    : 12.2.0.1.52
OUI version       : 12.2.0.7.0
Log file location : /app/oracle/product/19c/cfgtoollogs/opatch/opatch2026-08-09_20-10-35PM_1.log
 
OPatchSession cannot load inventory for the given Oracle Home /app/oracle/product/19c. Possible causes are:
   No read or write permission to ORACLE_HOME/.patch_storage
   Central Inventory is locked by another OUI instance
   No read permission to Central Inventory
   The lock file exists in ORACLE_HOME/.patch_storage
   The Oracle Home does not exist in Central Inventory
 
UtilSession failed: OPatch failed to locate Central Inventory.
Possible causes are:
    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.
Log file location: /app/oracle/product/19c/cfgtoollogs/opatch/opatch2026-08-09_20-10-35PM_1.log
 
OPatch failed with error code 73

에러가 발생하면서 패치도 안됨
Possible causes를 읽어보면 안되는 이유 힌트를 찾을 수 있음

 

 

이 경우 만약 정상적인 인벤토리 경로가 없는 경우 현재 엔진에 있는 정보를 인벤토리에 재등록해줘야함

 

 

현재 ORACLE HOME에 대해 oraInventory 재등록

1
2
3
4
5
6
7
8
9
$ cd $ORACLE_HOME/oui/bin
$ ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME="OraDB19Home1"
Starting Oracle Universal Installer...
 
Checking swap space: must be greater than 500 MB.   Actual 9248 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
You can find the log of this install session at:
 /app/oraInventory/logs/AttachHome2026-08-09_08-15-31PM.log
'AttachHome' was successful.

 

 

인벤토리 경로 재확인

1
2
3
4
5
6
7
8
$ ls -al /app/
total 8
drwxrwxr-x.  6 oracle dba        78 Aug  9 20:05 .
dr-xr-xr-x. 21 root   root     4096 Feb 14 22:30 ..
drwxrwxr-x.  2 oracle dba         6 May 28  2025 oraarch
drwxrwxr-x. 17 oracle dba      4096 Jan 30  2026 oracle
drwxr-xr-x   4 oracle oinstall   37 Aug  9 20:15 oraInventory
drwxrwx---   4 oracle oinstall   37 Aug  9 03:07 oraInventorybak

oraInventory 경로가 새로 생김

 

 

패치 정보 재조회

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.32 패치 적용 시도

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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
$ cd /app/oracle/media/39618711/39467003/39472050
$ opatch apply -silent
Oracle Interim Patch Installer version 12.2.0.1.52
Copyright (c) 2026, Oracle Corporation.  All rights reserved.
 
 
Oracle Home       : /app/oracle/product/19c
Central Inventory : /app/oraInventory
   from           : /app/oracle/product/19c/oraInst.loc
OPatch version    : 12.2.0.1.52
OUI version       : 12.2.0.7.0
Log file location : /app/oracle/product/19c/cfgtoollogs/opatch/opatch2026-08-09_20-24-00PM_1.log
 
Verifying environment and performing prerequisite checks...
 
--------------------------------------------------------------------------------
Start OOP by Prereq process.
Launch OOP...
 
Oracle Interim Patch Installer version 12.2.0.1.52
Copyright (c) 2026, Oracle Corporation.  All rights reserved.
 
 
Oracle Home       : /app/oracle/product/19c
Central Inventory : /app/oraInventory
   from           : /app/oracle/product/19c/oraInst.loc
OPatch version    : 12.2.0.1.52
OUI version       : 12.2.0.7.0
Log file location : /app/oracle/product/19c/cfgtoollogs/opatch/opatch2026-08-09_20-26-31PM_1.log
 
Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   39472050
 
Do you want to proceed? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
All checks passed.
 
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/app/oracle/product/19c')
 
 
Is the local system ready for patching? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
Backing up files...
Applying interim patch '39472050' to OH '/app/oracle/product/19c'
ApplySession: Optional component(s) [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.assistants.asm, 19.0.0.0.0 ] , [ oracle.datamining, 19.0.0.0.0 ] , [ oracle.crypto.rsf, 19.0.0.0.0 ] , [ oracle.oraolap.mgmt, 19.0.0.0.0 ] , [ oracle.pg4appc, 19.0.0.0.0 ] , [ oracle.precomp.companion, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.java.sqlj.sqljruntime, 19.0.0.0.0 ] , [ oracle.rdbms.tg4db2, 19.0.0.0.0 ] , [ oracle.sdo.companion, 19.0.0.0.0 ] , [ oracle.tfa, 19.0.0.0.0 ] , [ oracle.rdbms.tg4ifmx, 19.0.0.0.0 ] , [ oracle.oid.client, 19.0.0.0.0 ] , [ oracle.rdbms.tg4sybs, 19.0.0.0.0 ] , [ oracle.ldap.ztk, 19.0.0.0.0 ] , [ oracle.ons.eons.bwcompat, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.ons.cclient, 19.0.0.0.0 ] , [ oracle.xdk.companion, 19.0.0.0.0 ] , [ oracle.options.olap, 19.0.0.0.0 ] , [ oracle.rdbms.tg4msql, 19.0.0.0.0 ] , [ oracle.rdbms.tg4tera, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.options.olap.api, 19.0.0.0.0 ] , [ oracle.jdk, 1.8.0.191.0 ] , [ oracle.jdk, 1.8.0.391.11 ]  not present in the Oracle Home or a higher version is found.
 
Patching component oracle.rdbms.util, 19.0.0.0.0...
 
Patching component oracle.rdbms.rsf, 19.0.0.0.0...
 
Patching component oracle.rdbms, 19.0.0.0.0...
 
Patching component oracle.assistants.acf, 19.0.0.0.0...
 
Patching component oracle.assistants.deconfig, 19.0.0.0.0...
 
Patching component oracle.assistants.server, 19.0.0.0.0...
 
Patching component oracle.blaslapack, 19.0.0.0.0...
 
Patching component oracle.buildtools.rsf, 19.0.0.0.0...
 
Patching component oracle.wwg.plsql, 19.0.0.0.0...
 
Patching component oracle.ctx, 19.0.0.0.0...
 
Patching component oracle.dbdev, 19.0.0.0.0...
 
Patching component oracle.dbjava.ic, 19.0.0.0.0...
 
Patching component oracle.dbjava.jdbc, 19.0.0.0.0...
 
Patching component oracle.dbjava.ucp, 19.0.0.0.0...
 
Patching component oracle.duma, 19.0.0.0.0...
 
Patching component oracle.javavm.client, 19.0.0.0.0...
 
Patching component oracle.ldap.client, 19.0.0.0.0...
 
Patching component oracle.ldap.owm, 19.0.0.0.0...
 
Patching component oracle.ldap.rsf, 19.0.0.0.0...
 
Patching component oracle.ldap.security.osdt, 19.0.0.0.0...
 
Patching component oracle.marvel, 19.0.0.0.0...
 
Patching component oracle.network.rsf, 19.0.0.0.0...
 
Patching component oracle.nlsrtl.rsf, 19.0.0.0.0...
 
Patching component oracle.nlsrtl.rsf.core, 19.0.0.0.0...
 
Patching component oracle.nlsrtl.rsf.ic, 19.0.0.0.0...
 
Patching component oracle.swd.oui, 12.2.0.7.0...
 
Patching component oracle.odbc.ic, 19.0.0.0.0...
 
Patching component oracle.ons, 19.0.0.0.0...
 
Patching component oracle.ons.ic, 19.0.0.0.0...
 
Patching component oracle.oracore.rsf, 19.0.0.0.0...
 
Patching component oracle.precomp.common.core, 19.0.0.0.0...
 
Patching component oracle.precomp.rsf, 19.0.0.0.0...
 
Patching component oracle.rdbms.crs, 19.0.0.0.0...
 
Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...
 
Patching component oracle.rdbms.deconfig, 19.0.0.0.0...
 
Patching component oracle.rdbms.install.common, 19.0.0.0.0...
 
Patching component oracle.rdbms.oci, 19.0.0.0.0...
 
Patching component oracle.rdbms.rsf.ic, 19.0.0.0.0...
 
Patching component oracle.rdbms.scheduler, 19.0.0.0.0...
 
Patching component oracle.rhp.db, 19.0.0.0.0...
 
Patching component oracle.rsf, 19.0.0.0.0...
 
Patching component oracle.sdo, 19.0.0.0.0...
 
Patching component oracle.sdo.locator.jrf, 19.0.0.0.0...
 
Patching component oracle.sqlj.sqljruntime, 19.0.0.0.0...
 
Patching component oracle.sqlplus, 19.0.0.0.0...
 
Patching component oracle.sqlplus.ic, 19.0.0.0.0...
 
Patching component oracle.tfa.db, 19.0.0.0.0...
 
Patching component oracle.xdk.rsf, 19.0.0.0.0...
 
Patching component oracle.rdbms.hs_common, 19.0.0.0.0...
 
Patching component oracle.javavm.server, 19.0.0.0.0...
 
Patching component oracle.rdbms.install.plugins, 19.0.0.0.0...
 
Patching component oracle.rdbms.locator, 19.0.0.0.0...
 
Patching component oracle.oraolap.api, 19.0.0.0.0...
 
Patching component oracle.rdbms.hsodbc, 19.0.0.0.0...
 
Patching component oracle.network.client, 19.0.0.0.0...
 
Patching component oracle.rdbms.drdaas, 19.0.0.0.0...
 
Patching component oracle.rdbms.dm, 19.0.0.0.0...
 
Patching component oracle.rdbms.rman, 19.0.0.0.0...
 
Patching component oracle.rdbms.rat, 19.0.0.0.0...
 
Patching component oracle.ovm, 19.0.0.0.0...
 
Patching component oracle.odbc, 19.0.0.0.0...
 
Patching component oracle.xdk.server, 19.0.0.0.0...
 
Patching component oracle.oraolap.dbscripts, 19.0.0.0.0...
 
Patching component oracle.xdk.xquery, 19.0.0.0.0...
 
Patching component oracle.network.listener, 19.0.0.0.0...
 
Patching component oracle.dbtoolslistener, 19.0.0.0.0...
 
Patching component oracle.ldap.rsf.ic, 19.0.0.0.0...
 
Patching component oracle.xdk.parser.java, 19.0.0.0.0...
 
Patching component oracle.sdo.locator, 19.0.0.0.0...
 
Patching component oracle.ctx.rsf, 19.0.0.0.0...
 
Patching component oracle.ldap.ssl, 19.0.0.0.0...
 
Patching component oracle.oraolap, 19.0.0.0.0...
 
Patching component oracle.mgw.common, 19.0.0.0.0...
 
Patching component oracle.install.deinstalltool, 19.0.0.0.0...
 
Patching component oracle.rdbms.dv, 19.0.0.0.0...
 
Patching component oracle.xdk, 19.0.0.0.0...
 
Patching component oracle.nlsrtl.rsf.lbuilder, 19.0.0.0.0...
 
Patching component oracle.ctx.atg, 19.0.0.0.0...
 
Patching component oracle.network.aso, 19.0.0.0.0...
 
Patching component oracle.rdbms.lbac, 19.0.0.0.0...
 
Patching component oracle.precomp.lang, 19.0.0.0.0...
 
Patching component oracle.precomp.common, 19.0.0.0.0...
 
Patching component oracle.oracler.server, 19.0.0.0.0...
 
Patching component oracle.perlint, 5.28.1.0.0...
 
Patching component oracle.jdk, 1.8.0.201.0...
Patch 39472050 successfully applied.
Sub-set patch [39034528] has become inactive due to the application of a super-set patch [39472050].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /app/oracle/product/19c/cfgtoollogs/opatch/opatch2026-08-09_20-26-31PM_1.log
 
OPatch succeeded.

패치가 정상적으로 완료됨

 

 

패치 확인

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

정상적으로 패치됨

 

 

결론 :
oraInventory가 비정상적인 경우 패치 정보도 확인할 수 없고 패치도 할수 없음
이 경우 runInstaller attachHome 옵션을 이용해 현재 ORACLE HOME에 대해 oraInventory를 재등록 해주어야함

 

 

참조 : 

오라클 19c tar 명령을 이용해 db 엔진 복제 ( https://positivemh.tistory.com/1150 )