OS환경 : Oracle Linux 8.5 (64bit)
DB 환경 : Oracle Database 19.12.0.0 RAC
방법 : 오라클 19c db oraInventory 재설정
오라클 19c RAC Grid 문제 시 재설치 가이드 ( https://positivemh.tistory.com/802 ) 경우처럼
rac가 구성된 환경에서 grid를 재설치하면서 기존 oraInventory를 제거한 경우
db oraInventory 정보가 유실됨, 이때 다시 추가하는 방법을 설명함
기존 oraInventory를 지운 뒤 grid 재설치 후
패치 정보 확인
1
2
3
4
5
6
7
8
9
|
$ cd $ORACLE_HOME/OPatch
$ ./opatch lspatches
List of Homes on this system:
Home name= OraGI19Home1, Location= "/oracle/app/grid/19c"
Inventory load failed... LsPatchesSession::loadAndPrintInstalledPatch()
LsPatchesSession failed: RawInventory gets null OracleHomeInfo
OPatch failed with error code 2
|
oraInvnetory가 새로 생성되서 패치 정보 확인이 되지않음
현재 oraInvnetory의 ContentsXML/inventory.xml 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
$ cat /oracle/app/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2021, 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="/oracle/app/grid/19c" TYPE="O" IDX="1" CRS="true"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
|
db home 정보가 없음
기존에 백업해두었던 oraInvnetory 중 ContentsXML/inventory.xml 확인(백업본이 있는경우)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
$ cat /oracle/app/oraInventorybak/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2021, 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="/oracle/app/grid/19c" TYPE="O" IDX="1" CRS="true"/>
<HOME NAME="OraDB19Home1" LOC="/oracle/app/oracle/product/19c" TYPE="O" IDX="2"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
|
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 7712 MB Passed
The inventory pointer is located at /etc/oraInst.loc
You can find the log of this install session at:
/oracle/app/oraInventory/logs/AttachHome2022-01-06_04-10-23PM.log
'AttachHome' was successful.
|
재등록후 oraInvnetory의 ContentsXML/inventory.xml 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
$ cat /oracle/app/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2022, 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="/oracle/app/grid/19c" TYPE="O" IDX="1" CRS="true"/>
<HOME NAME="OraDB19Home1" LOC="/oracle/app/oracle/product/19c" TYPE="O" IDX="2"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
|
정상적으로 db 정보가 등록됨
다시 패치정보 확인
1
2
3
4
5
|
$ cd $ORACLE_HOME/OPatch
$ ./opatch lspatches
32876380;OJVM RELEASE UPDATE: 19.12.0.0.210720 (32876380)
32916816;OCW RELEASE UPDATE 19.12.0.0.0 (32916816)
32904851;Database Release Update : 19.12.0.0.210720 (32904851)
|
정상적으로 확인됨
참조 : 556834.1
'ORACLE > Admin' 카테고리의 다른 글
오라클 19c dba_users.password_versions이 user$ 값으로 변경해도 바뀔까 (2) | 2022.05.10 |
---|---|
오라클 11g R2 client 19c 접속 19c client 11g R2 접속 시도 (2) | 2022.05.10 |
오라클 19c rootcrs.sh unlock과 lock (0) | 2021.12.30 |
오라클 19c 리스너 로그 자동백업 파라미터 (0) | 2021.12.26 |
오라클 19c ahf(tfa) 업그레이드 가이드 (0) | 2021.12.25 |