A. Delete DB Control Objects:
Option 1. Delete DB Control Configuration Files using EMCA scripts
Option 2. Delete DB Control Configuration Files Manually:
Option 3. Delete DB Control Configuration Files and Repository Objects using EMCA
Option 1. Delete DB Control Configuration Files using EMCA scripts:
For DB Control 10.1.x, run the command: <ORACLE_HOME>/bin/emca -x <sid>
For DB Control 10.2.x, run the command: <ORACLE_HOME>bin/emca -deconfig dbcontrol db
Important Note: the option -deconfig removes the EM jobs from Scheduling before the DB Control is deconfigured. Otherwise the repository, which is not dropped, could be corrupted or inconsistent if EM jobs were scheduled as the time the DB Control is dropped. It could also cause some errors during the DB Control deletion.
Option 2. Delete DB Control Configuration Files Manually:
Remove the following directories from your filesystem:
<ORACLE_HOME>/<hostname_sid>
<ORACLE_HOME>/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>
NOTE:
On Windows you also need to delete the DB Console service:
– run regedit
– navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services
– locate the OracleDBConsole<sid> entry and delete it
Alternatively on Windows XP and Windows Server 2003 you can run the following from the command line:
‘sc delete <service_name>’
– where <service_name> is the DB Control service name (typically: OracleDBConsole<sid>)
Option 3. Delete DB Control Configuration Files and Repository Objects using EMCA
For DB Control 10.1.x, dropping both the configuration files and the repository objects is a two step process. Run the following two commands:
<ORACLE_HOME>/bin/emca -x <sid>
<ORACLE_HOME>/sysman/admin/emdrep/bin/RepManager <hostname> <listener_port> <sid> -action drop
For DB Control 10.2.x, both configuration files and repository objects can be deleted with a single command. Run the command:
<ORACLE_HOME>/bin/emca -deconfig dbcontrol db -repos drop
B. Create DB Control Objects
Option 1. Create the DB Control Configuration Files
Option 2. Create the DB Control Repository Objects and Configuration Files
Option 1. Create the DB Control Configuration Files
To create only the DB Control configuration files, skipping the repository creation (this would be done for instance if you dropped only the files and left the repository in place):
For DB Control 10.1.x, run the command: <ORACLE_HOME>/bin/emca -r
For DB Control 10.2.x, run the command: <ORACLE_HOME>/bin/emca -config dbcontrol db
Option 2. Create the DB Control Repository Objects and Configuration Files
For DB Control 10.1.x, run the command: <ORACLE_HOME>/bin/emca
For DB Control 10.2.x, run the command: <ORACLE_HOME>bin/emca -config dbcontrol db -repos create
Warning: this command puts the database in Quiesce Mode.
C. Recreate/ReConfig DB Control
In 10.2, the EMCA commands can be used to reconfigure the existing installs without removing them first.
Option 1. Recreate the DB Control Configuration Files only (leave Repository intact):
For DB Control 10.2.x, run the command:
<ORACLE_HOME>/bin/emca -config dbcontrol db
Option 2. Recreate the DB Control Configuration Files and Repository
For DB Control 10.2.x, run the command:
<ORACLE_HOME>/bin/emca -config dbcontrol db -repos recreate
Warning: this command puts the database in Quiesce Mode.