Oracle Home Silent Deinstallation

Today i tried deinstalling ORCALE_HOME silently on redhat 5 and it was fun.The command used :-

./runInstaller -deinstall ORACLE_HOME=current_oracle_home "REMOVE_HOMES={oracle_home_to_be_removed}"  -silent
 

1. Login to the server

2. Check the Current Oracle Home.

3. Correctly note the Oracle Home to be removed.

4. Check the contents of  “inventory.xml” in oraInventory/ContentsXML folder :-

[oracle@ash-sr84 ContentsXML]$ cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 2005 Oracle Corporation. All rights Reserved -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>10.2.0.1.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDb10g_home1" LOC="/u01/app/oracle/product/10.2.0/db_1" TYPE="O" IDX="1"/>
<HOME NAME="OraDb10g_home2" LOC="/u01/app/oracle/product/10.2.0/db_2" TYPE="O" IDX="2"/>
</HOME_LIST>
</INVENTORY>
[oracle@ibs-ash-sr84 ContentsXML]$

6. Run the runInstaller from $ORACLE_HOME/oui/bin in silent mode

./runInstaller -deinstall ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 "REMOVE_HOMES={/u01/app/oracle/product/10.2.0/db_2}"  -silent

Once this command is executed,output is

Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-03-26_05-32-17AM. Please wait ...[oracle@ibs-ash-sr84 bin]$ Oracle Universal Installer, Version 10.2.0.3.0 Production
Copyright (C) 1999, 2006, Oracle. All rights reserved.

Starting deinstall

Deinstall in progress (Fri Mar 26 04:32:20 EST 2010)
Configuration assistant "Oracle Database Configuration Assistant" succeeded
Configuration assistant "Oracle Net Configuration Assistant - Deinstall Script" succeeded
.............................................................................................................
100% Done.

Deinstall successful

End of install phases.(Fri Mar 26 04:32:51 EST 2010)
End of deinstallations
Please check '/u01/app/oracle/oraInventory/logs/silentInstall2010-03-26_05-32-17AM.log' for more details.

7. After successful deinstallation, 3 folders were seen in the deinstalled $ORACLE_HOME : –

[oracle@ash-sr84 db_2]$ ls -lrt
total 20
drwxr-x--- 3 oracle oinstall  4096 Mar 26 05:32 ctx
drwxr-x--- 2 oracle oinstall  4096 Mar 26 05:32 lib32
drwxr-x--- 2 oracle oinstall 12288 Mar 26 05:32 lib
[oracle@ibs-ash-sr84 db_2]$

8. Check back the contents of  “inventory.xml” in oraInventory/ContentsXML folder :-

[oracle@ibs-ash-sr84 ContentsXML]$ cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 2005 Oracle Corporation. All rights Reserved -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>10.2.0.3.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDb10g_home1" LOC="/u01/app/oracle/product/10.2.0/db_1" TYPE="O" IDX="1"/>
<HOME NAME="OraDb10g_home2" LOC="/u01/app/oracle/product/10.2.0/db_2" TYPE="O" IDX="2" REMOVED="T"/>
</HOME_LIST>
</INVENTORY>
[oracle@ibs-ash-sr84 ContentsXML]$

9. Remove the left over folders using rm command.

10. The REMOVE_HOME can be the same ORACLE_HOME itself.The deinstalltion will succeed.

Its a nice cool stuff  🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s