Thursday, April 10, 2008

How To Drop, Create And Recreate DB Control In 10g Database

This topic is divided into three sections.

A.Delete DB Control Objects
B.Create DB Control Objects
C.Recreate/ReConfig DB Control

A.Delete DB Control Objects:
There are various ways to delete DB Control Objects.
1).Delete DB Control Configuration Files using EMCA scripts
2).Delete DB Control Configuration Files Manually:
3).Delete DB Control Repository Objects using RepManager
4).Delete DB Control Repository Objects Manually
5).Delete DB Control Configuration Files and Repository Objects using EMCA


1).Delete DB Control Configuration Files using EMCA scripts

In 10.1g run, $emca -x sid
In 10.2g run, $emca -deconfig dbcontrol db Then enter sid as prompt and then y.


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

On Windows you also need to delete the DB Console service:
- run regedit
- navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services
- locate the OracleDBConsolesid entry and delete it

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: OracleDBConsolesid)

3).Delete DB Control Repository using RepManager:

Invoke following command, RepManager hostname listener_port sid -action drop
But don't delete by RepManager. It puts the database in quiescence mode.

4).Delete DB Control Repository Objects Manually
In another post I will show it.

5).Delete DB Control Configuration Files and Repository Objects using EMCA

For 10.1,
>emca -x sid
>RepManager hostname listener_port sid -action drop


For 10.2,
>emca -deconfig dbcontrol db -repos drop


B.Create DB Control Objects
1)Create only DB Control configuration files:

on 10.1g ,>emca -r
On 10.2g, >emca -config dbcontrol db

2)Create both the DB Control Repository Objects and Configuration Files:

On 10.1g, >emca
On 10.2g, >emca -config dbcontrol db -repos create


C.Recreate/ReConfig DB Control:
1)Recreate only DB Control configuration files:
$ emca -config dbcontrol db

2)Recreate both the DB Control Repository Objects and Configuration Files:

$ emca -config dbcontrol db -repos recreate

Related Documents:

Troubleshooting Problems while Creating Repository using emca

1 comment:

  1. when create with 'emca -repos create'

    error occured: ora-06502

    have any suggestions?

    thanks

    ReplyDelete