Overcome “ERROR: ‘${ORACLE_HOME}/agent11g’ subdirectory already exists in Oracle Inventory. Specify another home location.” when doing a silent install in a non-empty Oracle home.
While testing our silent Oracle Grid agents installs I ran into error below when (re-)installing into a non-empty Oracle home directory. …
$ ./runInstaller -silent -responseFile /home/oracle/additional_agent.rsp -invPtrLoc /var/opt/oracle/oraInst.loc . . ERROR: Error:"${ORACLE_HOME}/agent11g" subdirectory already exists in Oracle Inventory. Specify another home location. . .
This error can easily be overcome by manually editting the ‘inventory.xml file in your ${ORACLE_INVENTOY}/ContentsXML direcotry. …
Find the directory of your Oracle inventory – locatino is defined in the pointerfile oraInst.loc (which on most os-es resides in /var/opt/oracle/oraInst.loc) …
Go to the Oracle inventory root directory and cd to the ‘ContentsXML’ directory, …
Backup your existing inventoy xml file, …
Remove the entry <HOME></HOME> entry in inventory.xml for the Oracle home where you want to re-install. …
Before edit: …
$ cat inventory.xml <?xml version="1.0" standalone="yes" ?> <!-- Copyright (c) 1999, 2010, Oracle. All rights reserved. --> <!-- Do not modify the contents of this file by hand. --> <INVENTORY> <COMPOSITEHOME_LIST> </COMPOSITEHOME_LIST> <VERSION_INFO> <SAVED_WITH>11.1.0.8.0</SAVED_WITH> <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER> </VERSION_INFO> <HOME_LIST> . . <HOME NAME="OraDb10g_home1" LOC="********************" TYPE="O" IDX="5"/> <HOME NAME="agent11g1" LOC="${ORACLE_HOME}/agent11g" TYPE="O" IDX="6"/> <HOME NAME="OUIPlaceHolderDummyHome1" LOC="/ora/OraPlaceHolderDummyHome_1" TYPE="O" IDX="3" REMOVED="T"/> </HOME_LIST> </INVENTORY>
After edit: …
<?xml version="1.0" standalone="yes" ?> <!-- Copyright (c) 1999, 2010, Oracle. All rights reserved. --> <!-- Do not modify the contents of this file by hand. --> <INVENTORY> <COMPOSITEHOME_LIST> </COMPOSITEHOME_LIST> <VERSION_INFO> <SAVED_WITH>11.1.0.8.0</SAVED_WITH> <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER> </VERSION_INFO> <HOME_LIST> . . <HOME NAME="OraDb10g_home1" LOC="/ora/product/db/10204" TYPE="O" IDX="5"/> <HOME NAME="OUIPlaceHolderDummyHome1" LOC="/ora/OraPlaceHolderDummyHome_1" TYPE="O" IDX="3" REMOVED="T"/> </HOME_LIST> </INVENTORY>
And off you go – reinstalling in your existing Oracle Home is not a problem anymore – because – Oracle deos not know this is an Oracle Home anymore … …
This was carried out on a test system – seems totally harmless to me in this scenario but still use at your own risk. …
Read more →