So your Oracle database install crashes and burns and you are left with a mess to clean up.
Oracle now provides some canned de-install scripts to try to do this for you, but in my experience they are about as useful as a chocolate teapot.
First, let’s verify where Oracle did the install. Check the oraInst.loc file in the /etc directory:
[oracle@orpheus database]$ cat /etc/oraInst.loc inventory_loc=/u01/app/oraInventory inst_group=oinstall
This tells us that the Oracle inventory is located in the directory /u01/app/oraInventory
We now need to check a file called inventory.xml which resides in the inventory directory under the ContentsXML sub-directory.
[oracle@orpheus database]$ cat /u01/app/oraInventory/ContentsXML/inventory.xml <?xml version="1.0" standalone="yes" ?> <!-- Copyright (c) 1999, 2009, Oracle. All rights reserved. --> <!-- Do not modify the contents of this file by hand. --> <INVENTORY> <VERSION_INFO> <SAVED_WITH>11.2.0.1.0</SAVED_WITH> <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER> </VERSION_INFO> <HOME_LIST> <HOME NAME="Ora11g_gridinfrahome1" LOC="/u01/app/11.2.0/grid" TYPE="O" IDX="1" CRS="true"> <NODE_LIST> <NODE NAME="orpheus"/> <NODE NAME="eurydice"/> </NODE_LIST> </HOME> <HOME NAME="OraDb11g_home1" LOC="/u01/app/oracle/product/11.2.0/dbhome_1" TYPE="O" IDX="2"> <NODE_LIST> <NODE NAME="orpheus"/> <NODE NAME="eurydice"/> </NODE_LIST> </HOME> </HOME_LIST> </INVENTORY>
So now let’s delete the database home directory we found in the inventory.xml file:
[oracle@orpheus database]$ cd /u01/app/oracle/product/11.2.0 [oracle@orpheus 11.2.0]$ rm -R dbhome_1 rm: remove write-protected regular file `dbhome_1/oc4j/j2ee/home/config/jazn.security.props'? y
Finally we need to update the inventory.xml file to remove the references to the deleted Oracle home. We will delete everything between the second set of <HOME> tags. When you are done, your inventory.xml file should look more like this:
[oracle@orpheus 11.2.0]$ cat /u01/app/oraInventory/ContentsXML/inventory.xml <?xml version="1.0" standalone="yes" ?> <!-- Copyright (c) 1999, 2009, Oracle. All rights reserved. --> <!-- Do not modify the contents of this file by hand. --> <INVENTORY> <VERSION_INFO> <SAVED_WITH>11.2.0.1.0</SAVED_WITH> <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER> </VERSION_INFO> <HOME_LIST> <HOME NAME="Ora11g_gridinfrahome1" LOC="/u01/app/11.2.0/grid" TYPE="O" IDX="1" CRS="true"> <NODE_LIST> <NODE NAME="orpheus"/> <NODE NAME="eurydice"/> </NODE_LIST> </HOME> </HOME_LIST> </INVENTORY>
