How to remove old oracle home ?
- Get tar file of old oracle home.
/<$BACKUP_LOCATION>/db_home.tar.gz
$ORACLE_HOME
-
Go to $ORACLE_HOME/oui/bin location
-
Check oratab file before remove file.
-
Execute below in silent mode to detach home.
-bash-4.4$ ./runInstaller -silent
-waitforcompletion -detachHome
ORACLE_HOME='/u01/app/oracle/product/12.2.0/dbhome_1' -local
-
After executed above check the oratab file.
Output of above command:
Starting Oracle Universal
Installer...
Checking swap space: must be
greater than 500 MB. Actual 38817
MB Passed
The inventory pointer is located at
/var/opt/oracle/oraInst.loc
'DetachHome' was successful.
-
Check inventory.xml in oraInventory.
-bash-4.4$ cat
/var/opt/oracle/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
-bash-4.4$ cd
/u01/app/oraInventory/ContentsXML/
-bash-4.4$ ls -lrt
total 9
-rw-rw----
1 oracle oinstall 174 Sep
2 22:16 oui-patch.xml
-rw-rw----
1 oracle oinstall 917 Oct 19 22:17 inventory.xml
-rw-rw----
1 oracle oinstall 329 Oct 19 22:17 comps.xml
-rw-rw----
1 oracle oinstall 292 Oct 19 22:17 libs.xml
-bash-4.4$ cat 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.1.4</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraGI19Home1"
LOC="/u01/app/19.0.0/grid" TYPE="O" IDX="4"
CRS="true"/>
<HOME NAME="agent13c1"
LOC="/EM13C/emagent/agent_13.2.0.0.0" TYPE="O"
IDX="3"/>
<HOME NAME="OraDB19Home1"
LOC="/u01/app/oracle/product/19.0.0.0/dbhome_1" TYPE="O"
IDX="5"/>
<HOME NAME="agent13c2"
LOC="/em_agent/emagent_13c/agent_13.4.0.0.0" TYPE="O"
IDX="6"/>
<HOME NAME="OraGI12Home1"
LOC="/u01/app/12.2.0/grid" TYPE="O" IDX="1"
REMOVED="T"/>
<HOME NAME="OraDB12Home1"
LOC="/u01/app/oracle/product/12.2.0/dbhome_1" TYPE="O" IDX="2"
REMOVED="T"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
-
After removed entry should be as above.
-
Rename the old oracle home folder and keep few
days and remove after checked by fuser command.
Fuser -u $ORACLE_HOME/*
Comments
Post a Comment