Thursday, October 30, 2008

How to Deinstall/Uninstall Oracle 10g on Redhat Linux

======================Solution 1====================

Stop all of the processes


Delete the ORACLE_BASE directory (usually the one one level up from ORACLE_HOME)
Delete the oraInventory directory if it isn't inside ORACLE_BASE
Delete /etc/oratab, /etc/oraInst.loc
Delete /user/local/bin/coraenv, /user/local/bin/oraenv, /user/local/bin/dbhome
Undo any environment settings you may have modified (in .bash_profile and bashrc)

That should be just about it. That's how I usually clean out my system between installs.

=======================Solution 2=======================

You don't need to run OUI, you can do this manually also. Here are the steps which I follow:

Stop all the databases and listener on the box either manually or using your startup script (/etc/init.d/oracle stop).

$ORACLE_HOME/bin/localconfig delete

rm -rf /etc/ora*

*********** /etc/oratab include contest as below to note which ORACLE_SID/ORACLE_HOME
test:/home/oracle/oracle/product/10.2.0/db_2:N
orcl:/u01/app/oracle/product/10.2.0/db_1:N
********** /etc/oraInst.loc is the ORACLE install location
inventory_loc=/home/oracle/oraInventory
inst_group=dba

rm -rf $ORACLE_HOME

rm -rf $ORACLE_BASE

rm -rf /tmp/Ora*
rm -rf /var/tmp/.oracle

This should be enough to remove the whole software from the box, you can drop the OS users and their home directories also if you want.

No comments: