Professional Documents
Culture Documents
Contents
1. Overview
2. Create Database Console
3. Drop Database Console
4. Recreate Database Console
5. Using EMCA with Real Application Clusters
6. Troubleshooting EMCA
7. Further Reading
Overview
This article provides steps-by-step details on how to create, drop and recreate the
Database Control Repository and configuration files in a 10g R2 database.
To create the configuration files and repository for Database Console, run:
$ emca -config dbcontrol db -repos create
1
STARTED EMCA at Jul 24, 2006 9:59:39 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 24, 2006 10:00:12 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/TESTDB/emca_2006-
07-24_09-59-39-PM.log.
Jul 24, 2006 10:00:15 PM oracle.sysman.emcp.EMReposConfig
createRepository
INFO: Creating the EM repository (this may take a while) ...
Jul 24, 2006 10:05:51 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jul 24, 2006 10:06:01 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 24, 2006 10:07:49 PM oracle.sysman.emcp.EMDBPostConfig
performConfiguration
INFO: Database Control started successfully
Jul 24, 2006 10:07:49 PM oracle.sysman.emcp.EMDBPostConfig
performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://linux3:1158/em
<<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 24, 2006 10:07:49 PM
To drop (remove) the configuration files and repository for Database Console, run:
2
$ emca -deconfig dbcontrol db -repos drop
To recreate the configuration files and repository for Database Console, run:
$ emca -config dbcontrol db -repos recreate
3
You have specified the following settings
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 24, 2006 10:08:50 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/TESTDB/emca_2006-
07-24_10-08-20-PM.log.
Jul 24, 2006 10:08:53 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jul 24, 2006 10:09:29 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Jul 24, 2006 10:11:23 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Jul 24, 2006 10:11:23 PM oracle.sysman.emcp.EMReposConfig
createRepository
INFO: Creating the EM repository (this may take a while) ...
Jul 24, 2006 10:15:09 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jul 24, 2006 10:15:18 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 24, 2006 10:17:21 PM oracle.sysman.emcp.EMDBPostConfig
performConfiguration
INFO: Database Control started successfully
Jul 24, 2006 10:17:22 PM oracle.sysman.emcp.EMDBPostConfig
performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://linux3:1158/em
<<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 24, 2006 10:17:22 PM
In this section, I will be using two Database Control consoles running; one on linux1
and the other on linux2. From either of these consoles, you can manage and monitor all
targets in the cluster.
For information on the current cluster configuration, you can run:
$ emca -displayConfig dbcontrol -cluster
STARTED EMCA at Jul 24, 2006 10:30:52 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
4
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database unique name: orcl
Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 24, 2006 10:31:32 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_200
6-07-24_10-30-51-PM.log.
Jul 24, 2006 10:31:52 PM oracle.sysman.emcp.EMDBPostConfig
showClusterDBCAgentMessage
INFO:
**************** Current Configuration ****************
INSTANCE NODE DBCONTROL_UPLOAD_HOST
---------- ---------- ---------------------
orcl1 linux1 linux1
orcl2 linux2 linux1
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 24, 2006 10:31:52 PM
The above command prompts for the database unique name for the cluster
database. This will print the current configuration onto the screen, indicating the
nodes that have consoles running on them and the consoles where each agent is
uploading.
5
ASM user password:
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................
/u01/app/oracle/product/10.2.0/db_1
Database instance hostname ................ linux1
Listener port number ................ 1521
Cluster name ................ crs
Database unique name ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
ASM ORACLE_HOME ................
/u01/app/oracle/product/10.2.0/db_1
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ SYS
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 12, 2007 11:08:54 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_200
7-06-12_11-07-56-AM.log.
Jun 12, 2007 11:08:57 AM oracle.sysman.emcp.EMReposConfig
createRepository
INFO: Creating the EM repository (this may take a while) ...
Jun 12, 2007 11:17:58 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jun 12, 2007 11:18:07 AM oracle.sysman.emcp.EMDBCConfig
instantiateOC4JConfigFiles
INFO: Propagating
/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_linux
1_orcl1 to remote nodes ...
Jun 12, 2007 11:18:08 AM oracle.sysman.emcp.EMDBCConfig
instantiateOC4JConfigFiles
INFO: Propagating
/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_linux
2_orcl2 to remote nodes ...
Jun 12, 2007 11:18:12 AM oracle.sysman.emcp.EMAgentConfig
deployStateDirs
INFO: Propagating /u01/app/oracle/product/10.2.0/db_1/linux1_orcl1
to remote nodes ...
Jun 12, 2007 11:18:14 AM oracle.sysman.emcp.EMAgentConfig
deployStateDirs
INFO: Propagating /u01/app/oracle/product/10.2.0/db_1/linux2_orcl2
to remote nodes ...
Jun 12, 2007 11:18:15 AM oracle.sysman.emcp.util.DBControlUtil
startOMS
6
INFO: Starting Database Control (this may take a while) ...
Jun 12, 2007 11:20:25 AM oracle.sysman.emcp.EMDBPostConfig
performConfiguration
INFO: Database Control started successfully
Jun 12, 2007 11:20:25 AM oracle.sysman.emcp.EMDBPostConfig
performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is
http://linux1:1158/em <<<<<<<<<<<
Jun 12, 2007 11:20:25 AM oracle.sysman.emcp.EMDBPostConfig
showClusterDBCAgentMessage
INFO:
**************** Current Configuration ****************
INSTANCE NODE DBCONTROL_UPLOAD_HOST
---------- ---------- ---------------------
orcl1 linux1 linux1
orcl2 linux2 linux1
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 12, 2007 11:20:26 AM
Drop Database Console
$ emca -deconfig dbcontrol db -repos drop -cluster
STARTED EMCA at Jun 12, 2007 10:53:57 AM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database unique name: orcl
Listener port number: 1521
Password for SYS user: change_on_install
Password for SYSMAN user: manager
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 12, 2007 10:54:16 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_200
7-06-12_10-53-57-AM.log.
Jun 12, 2007 10:54:19 AM oracle.sysman.emcp.util.DBControlUtil
stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jun 12, 2007 10:54:34 AM oracle.sysman.emcp.EMReposConfig
dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Jun 12, 2007 11:02:10 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 12, 2007 11:02:11 AM
7
Troubleshooting EMCA
If you have any problems when running emca, check the log file under:
ORACLE_HOME/cfgtoollogs/emca/<ORACLE_SID>/