Oracle® Database Administrator's Guide 11g Release 2 (11.2) Part Number E25494-02 |
|
|
PDF · Mobi · ePub |
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.
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
Option 2: Deleting Database Control Configuration Files and Repository Objects Using An EMCA Script
Option 3: Deleting A Database Control Repository Using EMCA Scripts
Option 4: Deleting Database Control Configuration Files Manually
Option 5: Deleting the Database Control Repository Using RepManager
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.
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.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.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:
Run regedit
.
Navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services
.
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 OracleDBConsole
sid
):
sc delete service_name
Also available from Microsoft is The delsrv.exe
executable is also available as a free download from Microsoft.
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".
This section discusses the three options that you can use to create Database Control objects.
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
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
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
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)
Option 2: Re-Creating the Database Control Configuration Files and Repository
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
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.