1. 首页
  2. IT资讯

emca 指令

http://www.idevelopment.info/data/Oracle/DBA_tips/Enterprise_Manager/OEM_4.shtml

thanks a lot for my qq friends

http://forums.oracle.com/forums/thread.jspa?threadID=234631&start=15&tstart=0

and other static link…

http://www.itpub.net/viewthread.php?tid=1035159

[@more@]

How to Recreate the Database Control Repository – (Oracle10g R2)

by Jeff Hunter, Sr. Database Administrator


Contents

  1. Overview


Overview Create Database Console Drop Database Console Recreate Database Console Using EMCA with Real Application Clusters Troubleshooting EMCA Further Reading http://download-east.oracle.com/docs/cd/B19306_01/em.102/b16242.pdf.

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    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


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


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


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


If you have any problems when running emca, check the log file under:

ORACLE_HOME/cfgtoollogs/emca//


Additional information on emca command-line options can be found in the Oracle Enterprise Manager 10g Advanced Configuration Guide. This guide is available from OTN at the following address

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/450962/viewspace-1026785/,如需转载,请注明出处,否则将追究法律责任。

主题测试文章,只做测试使用。发布者:布吉卡,转转请注明出处:http://www.cxybcw.com/194686.html

联系我们

13687733322

在线咨询:点击这里给我发消息

邮件:1877088071@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

QR code