June 10, 2025

Oracle Home remove/Detach from Inventory

Remove/Detach Oracle Home from Inventory

Prechecks:

Check /etc/oraInst.loc

go to the inventory location:

cd ContentsXML

cat inventory.xml and check which one needs to be detached.

inventory.xml example:

<?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?>

<!-- Copyright (c) 1999, 2024, Oracle. All rights reserved. -->

<!-- Do not modify the contents of this file by hand. --><INVENTORY>

   <VERSION_INFO>

      <SAVED_WITH>13.9.4.0.0</SAVED_WITH>

      <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>

   </VERSION_INFO>

   <HOME_LIST>

      <HOME NAME="OraDB19Home1" LOC="/u01/app/oracle/19.3.0/" TYPE="O" IDX="4"/>

      <HOME NAME="agent13c1" LOC="/u01/app/em13c/agent_13.4.0.0.0" TYPE="O" IDX="3"/>

      <HOME NAME="agent13c2" LOC="/u01/app/em13c/agent_13.5.0.0.0" TYPE="O" IDX="6"/>

   </HOME_LIST>

   <COMPOSITEHOME_LIST/>

Detach Oracle Home:

set Oracle Home to a currently running DB home and run the following:

cd $ORACLE_HOME/oui/bin

./runInstaller -silent -detachHome ORACLE_HOME="<actual Path>" ORACLE_HOME_NAME="<Oracle home name>"


Example:

$ORACLE_HOME/oui/bin/runInstaller -silent -detachHome ORACLE_HOME="/u01/app/em13c/agent_13.4.0.0.0" ORACLE_HOME_NAME="agent13c1"

Post-steps:

Once the detach script ran successfully the inventory.xml will look like this:

example:

<?xml version="1.0" standalone="yes" ?>

<!-- Copyright (c) 1999, 2025, 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="OraDB19Home1" LOC="/u01/app/oracle/product/19.3.0/" TYPE="O" IDX="4"/>

<HOME NAME="agent13c2" LOC="/u01/app/em13c/agent_13.5.0.0.0" TYPE="O" IDX="6"/>

<HOME NAME="agent13c1" LOC="/u01/app/em13c/agent_13.4.0.0.0" TYPE="O" IDX="3" REMOVED="T"/>

</HOME_LIST>

<COMPOSITEHOME_LIST>

</COMPOSITEHOME_LIST>

</INVENTORY>


After that, the detached ORACLE Home folder can be removed. 

example: 

rm -rf  /u01/app/em13c/agent_13.4.0.0.0


Best Wishes!!!

No comments:

Post a Comment

If you have any queries/ any suggestion please do comment and let me know.

Recent Post

Check progress on expdp and impdp

 Check progress on expdp and impdp: In few cases we need to monitor the progress of an export or import job in oracle. below are the steps c...