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 installation, then refer to 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.
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:[ORACLE10G]
The instance names are in the ORATAB
file in the subdirectory for the current node:
$ TYPE DISK$ORACLE1:[ORACLE10G.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
To completely remove Oracle Database software, you must remove any installed databases. To remove an Oracle Database:
Log in to the Oracle Database account.
Enter the following command to change the directory to the default database location:
$ set default oracle_home_directory
Run the ORAUSER
command procedure, specifying the SID
for the database that you want to remove:
$ @ORAUSER sid
Use the $ SET DISPLAY
command to direct X-Windows to your PC or workstation.
Start Database Configuration Assistant by using the following command:
$ DBCA
The Welcome screen is displayed.
Click Next.
The Operations screen is displayed.
Select Delete a Database, then click Next.
Select the database that you want to delete, and then click Finish.
In the screen that is displayed, confirm that you want to delete the database.
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.
On cluster systems with Oracle Real Application Clusters installations, the Cluster Synchronization Services daemon is configured during the Oracle Clusterware installation. If the system is running Oracle Clusterware, then refer to Oracle Real Application Clusters Installation and Configuration Guide for information about removing Oracle Real Application Clusters or Oracle Clusterware.
Before you remove an Oracle Database Oracle home, you must determine whether the Oracle Cluster Synchronization Services daemon is running from that Oracle home and whether any other Oracle Database Oracle homes exist on the system:
If the Oracle Database Oracle home that you want to remove is the only Oracle Database installation on the system, then you can delete the Oracle Cluster Synchronization Services daemon configuration.
If the Oracle Cluster Synchronization Services daemon is running from the Oracle Database Oracle home that you want to remove, and if other Oracle Database installations exist on the system, then you must reconfigure the Oracle Cluster Synchronization Services daemon to run from another Oracle Database Oracle home.
The following sections describe how to complete these tasks:
Section 8.3.2, "Reconfiguring the Oracle Cluster Synchronization Services Daemon"
Section 8.3.3, "Deleting the Oracle Cluster Synchronization Services Daemon Configuration"
Display the ORATAB
file contents by using the following command:
$ TYPE DISK$ORACLE1:[ORACLE10G.nodename]ORATAB.
From the output, identify any Oracle home directories where Oracle Database is installed. Oracle homes that contain Oracle Database typically have paths similar to the following. However, they may use different paths.
/device/oracle/product/10_2_0/db_n
If there is only one Oracle home directory that contains an Oracle database, refer to Section 8.3.3, "Deleting the Oracle Cluster Synchronization Services Daemon Configuration" for information about deleting the Oracle Cluster Synchronization Services daemon configuration.
If you identify more than one Oracle Database Oracle home directory, refer to the following section for information about reconfiguring the Oracle Cluster Synchronization Services daemon.
To reconfigure the Oracle Cluster Synchronization Services daemon so that it runs from an Oracle home that you are not removing:
Enter the following command to identify the Oracle home directory being used to run the Oracle Cluster Synchronization Services daemon:
$ TYPE disk:[mylogin.nodename.ORACLE]OCR.LOC
The output from this command is similar to the following:
ocrconfig_loc= VMSDEVICE:[ANY_VMS_DIR]ocr.dat
local_only=FALSE
The ocrconfig_loc
parameter specifies the location of the Oracle Cluster Registry (OCR) used by the Oracle Cluster Synchronization Services daemon. The path is the Oracle home directory where the Oracle Cluster Synchronization Services daemon is running.
Note:
If the value for thelocal_only
parameter is FALSE
, Oracle Clusterware is installed on this system. Refer to Oracle Real Application Clusters Installation and Configuration Guide for information about removing Oracle Real Application Clusters or Oracle Clusterware.If this Oracle home directory is not the Oracle home that you want to remove, you can continue to Section 8.4, "Removing Oracle Software".
Navigate to the Oracle home directory for an Oracle Database installation that you are not removing.
Run the following command in this new Oracle home:
$ @ORAUSER
Enter the following command to reconfigure the Oracle Cluster Synchronization Services daemon to run from this Oracle home:
$ @ORA_ROOT:[BIN]LOCALCONFIG "reset" ORACLE_HOME
The script stops the Oracle Cluster Synchronization Services daemon, reconfigures it in the new Oracle home, and then restarts it. When the system starts, the Oracle Cluster Synchronization Services daemon starts automatically from the new Oracle home.
To delete the Oracle Cluster Synchronization Services daemon configuration:
Navigate to the Oracle home directory that you are removing.
Run the following command in the Oracle home:
$ @ORAUSER
Enter the following command to delete the Oracle Cluster Synchronization Services daemon configuration from this Oracle home:
$ @ORA_ROOT:[BIN]LOCALCONFIG DELETE
The script stops the Oracle Cluster Synchronization Services daemon, then deletes its configuration. When the system restarts, the Oracle Cluster Synchronization Services daemon does not start.
Note:
Delete the Oracle Cluster Synchronization Services daemon configuration only if you are certain that no other Oracle Database installation requires it.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.Remove any database instances that are associated with this Oracle home, and delete or reconfigure the Oracle Cluster Synchronization Services daemon.
Stop any processes running in this Oracle home:
If necessary, log in to the Oracle Database account.
Run the ORAUSER.COM
file to redefine the Oracle home.
$ @ORAUSER
Use the $ SET DISPLAY
command to direct X-Windows to your PC or workstation.
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]
.
In the Welcome screen, click Deinstall Products.
The Inventory screen is displayed, listing all of the Oracle homes on the system.
In the Inventory screen, select the Oracle home and the products that you want to remove, then click Remove.
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.
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.