Skip Headers
Oracle® Database Administrator's Guide
11g Release 2 (11.2)

Part Number E17120-11
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

Deleting and Creating Database Control Objects

This section discusses the process of deleting and creating Database Control objects, and how to re-create configuration files and a repository in Database Control.

Deleting Database Control Objects

This section describes the steps required to delete database control objects. There are six possible options to use when deleting Database Control objects:

Option 1: Deleting Database Control Configuration Files Using EMCA Scripts

To delete Database Control configuration files using EMCA scripts, run one of the following commands:

For a single-instance database:

$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db

For an Oracle RAC database:

$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db –cluster

The -deconfig option removes the Enterprise Manager jobs from Scheduling before Database Control is deconfigured. Otherwise the repository, which is not dropped, could be corrupted or inconsistent if Enterprise Manager jobs were scheduled at the time Database Control is dropped. It could also cause errors during the Database Control deletion.

Option 2: Deleting Database Control Configuration Files and Repository Objects Using An EMCA Script

You can delete Database Control configuration files and repository objects using an EMCA script. Both configuration files and repository objects can be deleted using a single command.

Run the following command for a single-instance database:

$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop

Run the following command for an Oracle RAC database:

$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop –cluster

Note:

This command places the database in Quiesce Mode.

Option 3: Deleting A Database Control Repository Using EMCA Scripts

You can delete a Database Control repository using EMCA scripts by using the commands listed below.

Run the following command for a single-instance database:

$ $ORACLE_HOME/bin/emca –repos drop

Run the following command for an Oracle RAC database:

$ $ORACLE_HOME/bin/emca -repos drop -cluster

Note:

This command places the database in Quiesce Mode.

Option 4: Deleting Database Control Configuration Files Manually

In addition to using EMCA scripts to delete Database Control objects, you can delete objects manually, as follows:

Remove the following directories from your file system:

$ $ORACLE_HOME/hostname_sid

$ $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_hostname_sid

On Windows, you also need to delete the Database Control service, as follows:

  1. Run regedit.

  2. Navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services.

  3. Locate the OracleDBConsolesid entry and delete it.

Alternatively, on Windows XP and Windows Server 2003 you can run the following from the command line, where service_name is the Database Control service name (typically OracleDBConsolesid):

sc delete service_name

Also available from Microsoft is The delsrv.exe executable is also available as a free download from Microsoft.

Option 5: Deleting the Database Control Repository Using RepManager

You can delete the Database Control repository using RepManager. This option is not as complete as the other options. You may find that dropping the repository using the command line options is a better solution. Also note that RepManager cannot be used to create a Database Control Repository.

Run the following command:

$ $ORACLE_HOME/sysman/admin/emdrep/bin/RepManager hostname listener_port sid -action drop

Note:

This command places the database in Quiesce Mode.

For more information about Quiesce Mode, see My Oracle Support Note 375946.1, "Running EMCA Results in Database Quiesce" and "No New Connections or Operations Can Be Performed During the DB Control Repository Creation".

Creating Database Control Objects

This section discusses the three options that you can use to create Database Control objects.

Option 1: Creating the DB Control Configuration Files

The first option that you can use to create Database Control objects is to create the Database Control configuration files. Use the following commands to create the files without going through the repository creation process.

Run the following command for a single-instance database:

$ $ORACLE_HOME/bin/emca -config dbcontrol db

Run the following command for an Oracle RAC database:

$ $ORACLE_HOME/bin/emca -config dbcontrol db -cluster

Option 2: Creating the Database Control Repository Objects and Configuration Files

The second option you can use to create Database Control objects is to create the Database Control repository objects and configuration files.

Run the following command for a single-instance database:

$ $ORACLE_HOME/bin/emca -config dbcontrol db -repos create

Run the following command for an Oracle RAC database:

$ $ORACLE_HOME/bin/emca -config dbcontrol db -repos create –cluster

Option 3: Creating the Database Control Repository Objects and Configuration Files For a Cloned Database Home

The third option you can use to create Database Control objects is to create the Database Control repository objects and configuration files for a cloned database home, as follows:

Run the following command for a single-instance database:

$ $ORACLE_HOME/bin/emca -config dbcontrol db -repos recreate

Run the following command for an Oracle RAC database:

$ $ORACLE_HOME/bin/emca -config dbcontrol db -repos recreate -cluster

Re-Creating Or Reconfiguring Database Control

This section discusses the two options you can use to re-create or reconfigure Database Control.

Option 1: Re-Creating the Database Control Configuration Files Only (Leaving Repository Intact)

The first option you can use to re-create Database Control is to re-create only the Database Control configuration files, as follows:

Run the following command for a single-instance database:

$ $ORACLE_HOME/bin/emca -config dbcontrol db

Run the following command for an Oracle RAC database:

$ $ORACLE_HOME/bin/emca -config dbcontrol db -cluster

Option 2: Re-Creating the Database Control Configuration Files and Repository

The second option you can use to re-create Database Control is to re-create the Database Control configuration files and the repository.

Run the following command for a single-instance database:

$ $ORACLE_HOME/bin/emca -config dbcontrol db -repos recreate

Run the following command for an Oracle RAC database:

$ $ORACLE_HOME/bin/emca -config dbcontrol db -repos recreate -cluster

Note:

This command places the database in Quiesce Mode.