6 Removing Oracle Software

This chapter describes how to completely remove all Oracle Databases, their instances, and related software from an Oracle home directory. It includes information about the following topics:

Note:

If you want to remove an Oracle Real Application Clusters (Oracle RAC) installation, then see Oracle Real Application Clusters Installation and Configuration Guide for more information.

If you want to remove an individual product, then check the product-specific documentation for requirements and restrictions.

6.1 Identifying All Instances

To identify all instances associated with the Oracle home that you want to remove, log in to the Oracle Database account and enter the following command:

$ SHOW LOGICAL SYS$LOGIN

Example output:

DISK$ORACLE1:[ORACLE11G]

The instance names are in the ORATAB file in the subdirectory for the current node:

$ TYPE DISK$ORACLE1:[ORACLE11G.nodename]ORATAB.

The output of this command contains entries similar to the following:

$ORACLE_SID:ORACLE_HOME:Y/N

Where:

SID is the system identifier of the Database.

ORACLE_HOME is the home directory of the Database.

For Example:

SID:/VMSDISK/ORACLE_HOME:N

6.2 Removing an Oracle Database

To completely remove Oracle Database software, you must remove any installed databases. To remove an Oracle Database:

Caution:

Removing an Oracle Database deletes all of the data in the database. If you want to keep this data, then ensure that you back up the database before deleting it.
  1. Log in to the Oracle Database account.

  2. Enter the following command to change the directory to the default database location:

    $ set default oracle_home_directory
    
  3. Run the ORAUSER command procedure, specifying the SID for the database that you want to remove:

    $ @ORAUSER sid
    
  4. Use the $ SET DISPLAY command to direct X-Windows to your PC or workstation.

  5. Start Database Configuration Assistant by using the following command:

    $ DBCA
    

    The Welcome screen is displayed.

  6. Click Next.

    The Operations screen is displayed.

  7. Select Delete a Database, then click Next.

  8. Select the database that you want to delete, and then click Finish.

  9. In the screen that is displayed, confirm that you want to delete the database.

  10. When Database Configuration Assistant removes the database, you are prompted to select whether you want to perform another operation. Click Yes to return to the Operations screen or click No to exit from Database Configuration Assistant. If you want to remove another database, click Yes and repeat Steps 6 through 8.

6.3 Removing Oracle Software

The following steps describe how to use the Installer to remove Oracle software from an Oracle home:

Note:

Always use Oracle Universal Installer to remove Oracle software. Do not delete any Oracle home directories without first using Oracle Universal Installer to remove the software.
  1. Remove any database instances that are associated with this Oracle home, and delete or reconfigure the Oracle Cluster Synchronization Services daemon.

  2. Stop any processes running in this Oracle home:

    Table 6-1 Commands to Stop Processes Running in Oracle Home

    Process Name Command

    Database Control

    $ EMCTL STOP AGENT

    Oracle Net Services listener

    $ LSNRCTL STOP


  3. If necessary, log in to the Oracle Database account.

  4. Run the ORAUSER.COM file to redefine the Oracle home.

    $ @ORAUSER
    
  5. Use the $ SET DISPLAY command to direct X-Windows to your PC or workstation.

  6. Start Oracle Universal Installer as follows:

    $ @dvd_device:[DATABASE]RUNINSTALLER
    

    If the product was installed from the [CLIENT] or [COMPANION] directory of the Installation Media, then use that directory instead of [DATABASE].

  7. In the Welcome screen, click Deinstall Products.

    The Inventory screen is displayed, listing all of the Oracle homes on the system.

  8. In the Inventory screen, select the Oracle home and the products that you want to remove, then click Remove.

    Caution:

    If you select to remove Oracle JVM, then Oracle Universal Installer removes all installed products that depend on Oracle JVM, including Oracle Database 11g Release 2 (11.2).
  9. When Oracle Universal Installer displays a confirmation screen asking you to confirm that you want to uninstall the products and their dependent components, click Yes.

    The Installer displays a progress indicator as it removes the software.

  10. When the products have been deleted, click Cancel to exit from Oracle Universal Installer, then click Yes.

Note:

Always use Oracle Universal Installer to remove Oracle software. Do not delete any Oracle home directories without first using Oracle Universal Installer to remove the software.