Search This Blog

Monday, March 26, 2012

Oracle 10g dbconsole setup



How to see the status of dbconsole and the URL :

su - oracle
emctl status dbconsole

TZ set to Europe/Paris
Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0
Copyright (c) 1996, 2006 Oracle Corporation.  All rights reserved.
http://ora-stb:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/10.2.0/db64/ora-stb_URCL2/sysman/log


How to start the dbconsole :

su - oracle
emctl start dbconsole


How to stop the dbconsole :

su - oracle
emctl stop dbconsole


Recreate DbConsole online

The database will be placed in quiecse mode if you are using emca to drop and recreate. For example, the following commands will quiesce database:
emca -deconfig dbcontrol db -repos drop emca -config dbcontrol db -repos recreate
But "emca -config dbcontrol db -repos create" will not place the database in quiecse state.
So being said this, I would suggest you to manually drop the dbcontrol and then create it using emca which does not require downtime.
So you can do the following steps to recreate the database control which does not place the database in quiesce state:
Make sure that the database and the listener is up and running.
Logon SQLPLUS as user SYS and drop the sysman account and mangement objects:

drop user sysman cascade;
drop role MGMT_USER;
drop user MGMT_VIEW cascade;
drop public synonym MGMT_TARGET_BLACKOUTS;
drop public synonym SETEMVIEWUSERCONTEXT;
Manually remove the following folders:
ORACLE_HOME/host_sid/ ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_host_sid
For example if ORACLE_HOME is /u01/app/oracle and hostname is test.oracle.com and sid is db1, then the above mentioned folders would be:
/u01/app/oracle/oracle/test.oracle.com_db1 /u01/app/oracle/oc4j/j2ee/OC4J_DBConsole_test.oracle.com_db1

Set the ORACLE_HOME and ORACLE_SID
From $ORACLE_HOME/bin issue the following command:
emca -deconfig dbcontrol db -repos drop


Attention ! Database in quiesce mode

emca -config dbcontrol db -repos create


Reconfigure the Port


emca -reconfig ports -DBCONTROL_HTTP_PORT 5500
For more information see Metalink Doc: https://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=278100.1&blackframe=1

1 comment: