본문 바로가기
★━Oracle ExaData〃/3. Oracle DB

Oracle 19c HOME 디렉토리 변경하기(runinstall)

by Raynee 2023. 8. 7.
반응형

DB_HOME 변경 runinstall로 실행

19c에서는 runinstaller을사용하라고 나옴

[INFO] [INS-32183] Use of clone.pl is deprecated in this release. Clone operation is equivalent to performing a Software Only installation from the image.
You must use /u01/app/oracle/product/19.0.0.0/dbhome_2/runInstaller script available to perform the Software Only install. For more details on image based installation, refer to help documentation.

runInstaller 을 이용한 오라클 홈경로(엔진경로) 변경

  • 기존 경로 : /u01/app/oracle/product/19.0.0.0/dbhome_2
  • 변경 경로 : /u01/app/oracle/product/19c/dbhome_1

Profile HOME 경로

  • export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_2
  • export ORACLE_HOME=/u01/app/oracle/product/19c/dbhome_1

DB 및 리스터 종료

[FLUTEDB]oracle@flute$ sqlplus / as sysdba
SQL> shutown immediate;

[FLUTEDB]oracle@flute$ lsnrctl stop

ORACLE_HOME 압축 및 새로운 경로로 이동

[FLUTEDB]oracle@flute$ tar -cvf ora_home2.tar *
[FLUTEDB]oracle@flute$ ls -l ora_home2.tar
-rw-r--r-- 1 oracle oinstall 7439052800 Aug  6 15:02 ora_home2.tar

[FLUTEDB]oracle@flute$ mkdir -p /u01/app/oracle/product/19c/dbhome_1

[FLUTEDB]oracle@flute$ tar -xvf ora_home2.tar -C /u01/app/oracle/product/19c/dbhome_1

[FLUTEDB]oracle@flute$ cd /u01/app/oracle/product/19c/dbhome_1

[FLUTEDB]oracle@flute$ rm -rf $ORACLE_HOME

profile 변경

[FLUTEDB]oracle@flute$ vi ~/.bash_profile
export ORACLE_HOME=/u01/app/oracle/product/19c/dbhome_1

[FLUTEDB]oracle@flute$ . ~/.bash_profile
[FLUTEDB]oracle@flute$ echo $ORACLE_HOME
/u01/app/oracle/product/19c/dbhome_1

DB runinstall 실행

[FLUTEDB]oracle@flute$ ./runInstaller

inventory.xml 파일에서 기존 ORACLE_HOME 삭제

[FLUTEDB]oracle@flute$ vi /u01/app/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2023, 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="agent13c1" LOC="/u01/app/em13c/agent_13.5.0.0.0" TYPE="O" IDX="2"/>
<!-- HOME NAME="OraHome1" LOC="/u01/app/oracle/product/19.0.0.0/dbhome_2" TYPE="O" IDX="3"/i -->
<HOME NAME="OraDB19Home1" LOC="/u01/app/oracle/product/19c/dbhome_1" TYPE="O" IDX="1"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

oratab 수정

[FLUTEDB]oracle@flute$ vi /etc/oratab
FLUTEDB:/u01/app/oracle/product/19c/dbhome_1:N

Oracle DB & 리스너 기동


[FLUTEDB]oracle@flute$ sqlplus / as sysdba
SQL> startup;

[FLUTEDB]oracle@flute$ lsnrctl start


[FLUTEDB]oracle@flute$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 06-AUG-2023 23:34:55

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.110.111)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                06-AUG-2023 23:34:44
Uptime                    0 days 0 hr. 0 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/flute/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.110.111)(PORT=1521)))
Services Summary...
Service "FLUTEDB" has 1 instance(s).
  Instance "FLUTEDB", status READY, has 1 handler(s) for this service...
Service "FLUTEDBXDB" has 1 instance(s).
  Instance "FLUTEDB", status READY, has 1 handler(s) for this service...
The command completed successfully

dbca 명령어도 수행 잘됨.

[FLUTEDB]oracle@flute$ dbca

반응형

댓글