To create the configuration files and repository for Database Console, run:
$ emca -config dbcontrol db -repos create
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.
Enter the following information:
Database SID: TESTDB
Listener port number: 1521
Password for SYS user: change_on_install
Password for DBSNMP user: manager
Password for SYSMAN user: manager
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /u01/app/oracle/product/10.2.0/db_1
Database hostname ................ linux3
Listener port number ................ 1521
Database SID ................ TESTDB
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
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
Drop Database Console
To drop (remove) the configuration files and repository for Database Console, run:
$ emca -deconfig dbcontrol db -repos drop
STARTED EMCA at Jul 24, 2006 9:53:55 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: TESTDB
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
Jul 24, 2006 9:54:15 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-53-55-PM.log.
Jul 24, 2006 9:54:16 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jul 24, 2006 9:54:35 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Jul 24, 2006 9:56:48 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 24, 2006 9:56:48 PM
Recreate Database Console
To recreate the configuration files and repository for Database Console, run:
$ emca -config dbcontrol db -repos recreate
STARTED EMCA at Jul 24, 2006 10:08:20 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: TESTDB
Database Control is already configured for the database TESTDB
You have chosen to configure Database Control for managing the database TESTDB
This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: Y
Listener port number: 1521
Password for SYS user: change_on_install
Password for DBSNMP user: manager
Password for SYSMAN user: manager
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /u01/app/oracle/product/10.2.0/db_1
Database hostname ................ linux3
Listener port number ................ 1521
Database SID ................ TESTDB
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
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
Using EMCA with Real Application Clusters
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
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_2006-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.
* Create Database Console
$ emca -config dbcontrol db -repos create -cluster
STARTED EMCA at Jun 12, 2007 11:07:56 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
Cluster name: crs
Password for SYS user: change_on_install
Password for DBSNMP user: manager
Password for SYSMAN user: manager
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
ASM ORACLE_HOME [ /u01/app/oracle/product/10.2.0/db_1 ]: /u01/app/oracle/product/10.2.0/db_1
ASM port [ 1521 ]: 1521
ASM user role [ SYSDBA ]: SYSDBA
ASM username [ SYS ]: SYS
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_2007-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_linux1_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_linux2_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
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_2007-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
Troubleshooting EMCA
If you have any problems when running emca, check the log file under:
ORACLE_HOME/cfgtoollogs/emca/
No comments:
Post a Comment