Oracle® Database Installation Guide 10g Release 1 (10.1.0.2.0) for Windows Part Number B10130-01 |
|
|
View PDF |
This chapter describes how to remove Oracle databases, instances, and software. Always use Oracle Universal Installer to initially remove Oracle components. To avoid installation and configuration problems with new Oracle installations, follow the instructions in this chapter.
This chapter contains these topics:
See Also:
|
This section describes how to remove the Oracle HTML DB schema, synonyms, and users from the database without deleting the database. If you are going to delete the database, then you do not need to complete these steps.
After using Oracle Universal Installer to remove Oracle HTML DB from its Oracle home, you can remove Oracle HTML DB components from the database. Perform the following steps:
Use SQL*Plus to connect to the database as a privileged user, such as SYS
or SYSTEM
.
Execute the following commands:
SQL> ALTER SESSION SET CURRENT_SCHEMA = flows_010500; SQL> EXEC wwv_flow_upgrade.drop_public_synonyms; SQL> ALTER SESSION SET CURRENT_SCHEMA = SYSTEM; SQL> DROP USER flows_010500 CASCADE; SQL> DROP USER flows_files CASCADE; SQL> DROP USER htmldb_public_user CASCADE;
The first time you install Oracle Database on a system, Oracle Universal Installer configures and starts a single-node version of the Oracle Cluster Synchronization Services (CSS) service. The CSS service is required to enable synchronization between an Automatic Storage Management (ASM) instance and the database instances that rely on it for database file storage. It is configured and started even if you do not choose ASM as a storage mechanism for database files.
If you do not choose ASM as a storage option, you can delete OracleCSService
. To delete this service without deleting the Oracle home, perform the following:
Open a command prompt window.
Temporarily set the ORACLE_HOME
environment variable. For example:
set ORACLE_HOME=c:\oracle\product\10.1.0\db_1
Run the localconfig
batch file with the delete
option to delete the service. For example:
c:\oracle\product\10.1.0\db_1\bin\localconfig delete
Note: You do not need to complete this step if you are removing the Oracle home. See "Reconfiguring Oracle Cluster Synchronization Services (CSS)" for information about configuring the service to use a different Oracle home. |
Use Oracle Universal Installer to remove Oracle components from the inventory on the computer. Afterwards, you need to manually remove the remaining components.
Do not delete Oracle home files or directories (for example, using Windows Explorer or the command prompt) without first using Oracle Universal Installer unless you exit Oracle Universal Installer during an installation. Otherwise, the components in the Oracle home remain registered in the Oracle Universal Installer inventory. If you manually delete Oracle home files and you attempt an installation in the same Oracle home, then some or all of the selected components may not be installed or properly configured.
Oracle Universal Installer does not register the installation in its inventory if the installation is unexpectedly interrupted. However, files may have been copied to your Oracle home. Remove these files manually and restart the installation.
Note: You can use Database Configuration Assistant (DBCA) to remove an instance and related services. For information about Database Configuration Assistant, see "Installing Oracle and Building the Database" chapter of Oracle Database 2 Day DBA. |
This section contains these steps:
You must first stop the Oracle services before removing Oracle components.
To stop Windows services:
Open the Services control panel:
On Windows NT, choose Start >
Settings >
Control Panel >
Services.
On Windows 2000, choose Start >
Settings >
Control Panel >
Administrative Tools >
Services.
On Windows XP, and Windows Server 2003 choose Start >
Control Panel >
Administrative Tools >
Services.
If any Oracle services (names begin with Oracle
or Ora
) exist and have the status Started, then select each of the services, and click Stop.
Click Close to exit the Services window.
Exit the Control Panel.
See Also: Your Microsoft online help for more information about stopping services |
To remove components with Oracle Universal Installer:
Ensure that you first follow the instructions in "Stopping Oracle Services".
Start Oracle Universal Installer. Choose Start >
Programs >
Oracle - HOME_NAME >
Oracle Installation Products >
Universal Installer.
The Welcome screen for Oracle Universal Installer appears.
Click the Deinstall Products button.
The Inventory screen appears.
Expand the tree of installed components until you find the components to remove.
For example, if you installed a database with the Enterprise Edition option and later installed additional components with the Custom option, expand the Oracle home component to display all the components installed in the Oracle home.
Select the components to remove.
Click Remove.
The Confirmation screen appears.
Click Yes to remove the selected components to initiate the removal process.
Note: A message may appear indicating that removing some components may cause other components to not function properly. |
After the components are removed from your computer, the Inventory screen appears without the removed components.
Click Close to close the Inventory screen.
Click Cancel to exit Oracle Universal Installer.
Click Yes to confirm that you want to exit.
Oracle Universal Installer does not remove all Oracle components. After using Oracle Universal Installer to remove Oracle components, you need to manually remove remaining registry keys, environment variables, Start menu options, and directories.
Note: In rare situations, you may want to correct serious system problems by completely removing Oracle components manually from the computer without first deinstalling with Oracle Universal Installer. Do this only as a last resort, and only if you want to remove all Oracle components from your system. |
To remove an Automatic Storage Management (ASM) instance running in the Oracle home after the database has been removed, perform the following steps:
At the command prompt, set the ORACLE_SID
environment variable to the SID for the ASM instance. For example:
SET ORACLE_SID=+ASM
Start SQL*Plus and connect to the ASM instance as the SYS
user:
SQLPLUS SYS/sys_password AS SYSDBA
Enter the following command to determine whether any Oracle database instance is using the ASM instance:
SQL> SELECT INSTANCE_NAME FROM V$ASM_CLIENT;
This command lists all of the database instances that are using this ASM instance. This command only lists database instances that are running. It is possible that other instances are associated with the ASM instance, but they are not currently running.
If you removed a database from this Oracle home but the output from the command shows that this ASM instance is supporting a database instance in another Oracle home, do not remove the ASM instance or the Oracle home.
If there are no database instances associated with this ASM instance, drop the disk group associated with this instance.
Note: Dropping the ASM disk group makes the disk device available for use with another ASM instance if required. However, all data in the disk group is lost. Make sure that no other database instance requires any data from this disk group before you drop it. |
Identify the disk groups associated with the ASM instance:
SQL> SELECT NAME FROM V$ASM_DISKGROUP;
For each disk group that you want to delete, enter a command similar to the following:
SQL> DROP DISKGROUP disk_group_name INCLUDING CONTENTS;
Shut down the ASM instance and exit SQL*Plus:
SQL> SHUTDOWN SQL> EXIT
At the command prompt, enter the following command to remove the ASM service:
ORADIM -DELETE -ASMSID +ASM
Oracle Universal Installer creates Windows services for Oracle components during installation but it does not delete all the services created by Oracle Net Configuration Assistant and Database Configuration Assistant during deinstallation. In addition, Oracle Universal Installer does not delete several other registry keys. You need to remove any existing registry keys manually by following the instructions in one of the following sections:
Caution: Use Microsoft Registry Editor at your own risk. Incorrectly using the Registry Editor can cause serious problems and may require reinstallation of your operating system. |
To remove only the Oracle Net Service registry entry (if it exists):
Log in as a member of the Administrators group.
Ensure that you first follow the instructions in "Stopping Oracle Services".
Start the registry editor at the command prompt:
C:\> regedt32
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
and delete the Oracle
HOME_NAME
TNSListener
registry entry. Oracle Universal Installer automatically deletes all other Oracle Net services.
Exit the registry editor.
Restart your computer.
To remove all Oracle registry keys from a computer (if any exist):
Log in as a member of the Administrators group.
Ensure that you first follow the instructions in "Stopping Oracle Services".
Start the registry editor at the command prompt:
C:\> regedt32
Go to HKEY_CLASSES_ROOT
.
Delete keys that begin with Ora
, Oracle
, Orcl
, or EnumOra
. This collection of keys includes those that begin with EnumOraHomes
, OracleConfig
, OracleDatabase
, OracleHome
, OracleInProcServer
, OracleProcess
, ORADC
, ORAMMCCFG10
, ORAMMCPMON10
, OraOLEDB
, OraPerfMon
, ORCLMMC, and ORCLSSO
.
Go to HKEY_LOCAL_MACHINE\SOFTWARE
.
Delete the ORACLE
Group
key.
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
.
Delete all keys under this branch that begin with Oracle
.
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services \Eventlog\Application
.
Delete all keys under this branch that begin with Oracle
.
Go to HKEY_CURRENT_USER
.
Delete the ORACLE
key.
Go to HKEY_CURRENT_USER\Software
.
Delete all Oracle keys, including Oracle-
HOME_NAME
entries under: Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\Programs
.
Exit the registry editor.
Restart your computer.
Check the Path
environmental variable and remove any Oracle entries.
Choose Start >
Settings >
Control Panel >
System >
Advanced tab >
Environment Variables. You can use the Windows key + the Pause/Break key to display the System properties from the control panel.
Select the system variable Path
and edit the Path
variable to remove any Oracle entries.
For example, remove Oracle entries that contain ORACLE_BASE
\
ORACLE_HOME
in the Path
variable. You may see a Path
variable that contains entries similar to the following:
C:\oracle\products\10.1.0\db_1\bin;C:\oracle\products\10.1.0\db_1\jre\1.4.2\bin\client;C:\oracle\products\10.1.0\db_1\jre\1.4.2\bin
Save any changes and then exit the Control Panel.
Check the Start menu for any Oracle entries and remove them.
On Windows NT, perform the following:
Using My Computer or Windows Explorer, navigate to the SYSTEM_DRIVE
:\WINNT\Profiles\All
Users\Start
Menu\Programs
folder.
Delete the Oracle - HOME_NAME folder.
On Windows 2000 and Windows XP computers, perform the following:
Using My Computer or Windows Explorer, navigate to the SYSTEM
_
DRIVE
:\Document
and
Settings\All
Users\Start
Menu\Programs
folder.
Delete the Oracle - HOME_NAME folder.
You can also remove Oracle menu entries with the following instructions:
Right click the Start button to display the pop-up menu.
Select the Explore All Users option.
Expand the \Start
Menu\Programs
folder if necessary.
Delete the Oracle - HOME_NAME folder.
After removing all Oracle registry keys and restarting the computer, delete any existing Oracle directories and files.
Using My Computer or Windows Explorer, delete the SYSTEM
_
DRIVE
:\program
files\oracle
directory.
Using My Computer or Windows Explorer, delete all ORACLE
_
BASE
directories on your hard drive.