Question: I want the steps to manually uninstall
Oracle on my server. I don't want to use an uninstall wizard and I want to
understand the steps to remove the installation..
Answer: In essence, uninstalling Oracle involves two major
steps, removing the executable code from the server and downgrading the Oracle
data dictionary. Note: An uninstall cannot be
recovered, so make sure to take a full backup of all server-side components
before uninstalling Oracle.
Manually uninstalling Oracle
For experienced DBA's, the manual uninstall is the preferred method of
uninstalling Oracle
Step 1: Nuke all Oracle processes. The uninstall requires
stopping all Oracle instances, listeners and daemon processes that are
associated with the release:
$ORACLE_HOME/bin/shutdown abort
$ORACLE_HOME/bin/emctl stop dbconsole
$ORACLE_HOME/bin/lsnrctl stop
$ORACLE_HOME/bin/isqlplusctl stop
Step 2: Take a full backup of $ORACLE_HOME. In UNIX/Linux
you can make a backup copy in case you need anything later:
root> tar -xvf $ORACLE_HOME >
/dev/rmt0/bkup
Step 3: Remove $ORACLE_HOME and all
subdirectories. You can use the DBCA uninstaller function if you are
on 10g or beyond. In UNIX/Linux you can remove the software footprint as
follows:
root> cd $ORACLE_HOME
root> rm -RF *
Step 4: Remove entries in shared parm files. The
database may participate in server-side parameter files and you want to complete
the uninstallation process by removing references to the database in these
locations specified by the "dest" parameters in the init.ora file (e.g.
log_archive_dest_n):
- tnsnames.ora
- protocol.ora
- listener.ora
- oratab (/etc or /var/opt/oracle)
Assisted Oracle uninstall
For beginners and those who are unfamiliar with the components of Oracle, the
Oracle DBCA has assisted uninstall procedures:
Step 1: Nuke all Oracle processes. The uninstall requires
stopping all Oracle instances, listeners and daemon processes that are
associated with the release:
$ORACLE_HOME/bin/shutdown abort
$ORACLE_HOME/bin/emctl stop dbconsole
$ORACLE_HOME/bin/lsnrctl stop
$ORACLE_HOME/bin/isqlplusctl stop
Step 2: Start the Database Creation Assistant (DBCA) and choose
the remove database option
Step 3: Use the assisted deinstall wizard. Execute the
Oracle Universal Installer (OUI)
$ORACLE_HOME/oui/bin/runInstaller
Step 4. In the OUI Welcome window, click the "Deinstall Products"
button.
Step 5. In the OUI software Inventory screen, select the Oracle home and
the products that you want to remove, cross your fingers and mash the "Remove"
button.
Uninstall Oracle on Windows:
Its easy to uninstall Oracle on Windows :
- Uninstall all Oracle components using the Oracle Universal Installer
(OUI).
- Run regedit.exe and delete the HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE
key. This contains registry entires for all Oracle products.
- Delete any references to Oracle services left behind in the
following part of the registry (HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Ora*).
It should be pretty obvious which ones relate to Oracle.
- Reboot your Windows box.
- Delete the "C:\Oracle" directory, or whatever directory is your
ORACLE_BASE.
- Delete the "C:\Program Files\Oracle" directory.
- Empty the contents of your "C:\temp" directory.
- Empty your recycle bin.