ITPub博客

首页 > Linux操作系统 > Linux操作系统 > emca -config dbcontrol db (四) for rac

emca -config dbcontrol db (四) for rac

原创 Linux操作系统 作者:zhanglei_itput 时间:2009-08-06 18:20:11 0 删除 编辑


   前段时间做了一次重建dbcontrol和EM 资料档案库的测试,今天做了一下只重建dbcontrol的测试:
  
   1. Delete DB Control Configuration Files using EMCA scripts
      $ /bin/emca -deconfig dbcontrol db
      Important Note: the option -deconfig removes the EM jobs from Scheduling before the DB Control is deconfigured.
      Otherwise the repository, which is not dropped, could be corrupted or inconsistent if EM jobs were scheduled as the time the DB Control is dropped. It could also cause some errors during the DB Control deletion.
     
   2. Delete DB Control Configuration Files and Repository Objects using EMCA
      $ /bin/emca -deconfig dbcontrol db -repos drop
      Warning: this command puts the database in Quiesce Mode.
      Please consult the Note 375946.1 Running EMCA Results in Database quiesce And No New Connections or Operations Can Be Performed During the DB Control Repository Creation
     
   3. Create the DB Control Configuration Files
      $ /bin/emca -config dbcontrol db
      create only the DB Control configuration files, skipping the repository creation
     
   4. Create the DB Control Repository Objects and Configuration Files
      $ bin/emca -config dbcontrol db -repos create
      Warning: this command puts the database in Quiesce Mode.
      Please consult the Note 375946.1 Running EMCA Results in Database quiesce And No New Connections or Operations Can Be Performed During the DB Control Repository Creation
     
   5. Recreate the DB Control Configuration Files only (leave Repository intact)
      $ /bin/emca -config dbcontrol db
      Note: EMCA commands can be used to reconfigure the existing installs without removing them first.

   6. Recreate the DB Control Configuration Files and Repository 
      $ /bin/'emca -config dbcontrol db -repos recreate      Warning: this command puts the database in Quiesce Mode.
      Please consult the Note 375946.1 Running EMCA Results in Database quiesce And No New Connections or Operations Can Be Performed During the DB Control Repository Creation
            
   NOTE: When running 'emca -config dbcontrol db -repos recreate' or 'emca -deconfig dbcontrol db -repos drop' to recreate or drop the Enterprise Manager Database Control configuration files and repository the operation hangs and at the same time users are not able to login to the database.
   切忌:当运行重建资料档案库的命令的时候,数据库会hang住,新用户不能连接数据库。
         when recreating or dropping the repository, requires the database to be quiesced.  This means that, temporarily, no operations are possible on the database and new users cannot login, active sessions on the database at the time the quiesce operation will hang pending their completion.
        
         Therefore it is important to understand that running these commands may/will cause the database to be unavailable during the time that the repository is being dropped and should not be run on a production database unless you are fully aware of the possible impact to database availability and have planned for this eventuality

         Solution:
         To implement the solution, please execute the following steps:
         1. Kill the emca command
         2. Connect to the database with SYS account through SQL*Plus
            SQL > alter system unquiesce;
            Run the emca command at a time when there is low system usage.

      e.g. 重建dbconsole,不重建资料库的操作步骤如下
      a. Display dbcontrol删除前的状态
      [oracle@rac2 ~]$ emca -displayConfig dbcontrol -cluster
      
      STARTED EMCA at Aug 6, 2009 4:54:33 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: devdb
      Do you wish to continue? [yes(Y)/no(N)]: y
      Aug 6, 2009 4:54:37 PM oracle.sysman.emcp.EMConfig perform
      INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/devdb/emca_2009-08-06_04-54-33-PM.log.
      Aug 6, 2009 4:54:49 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
      INFO:
      ****************  Current Configuration  ****************
       INSTANCE            NODE           DBCONTROL_UPLOAD_HOST
      ----------        ----------        ---------------------      
      devdb1            rac1              rac1.domain.com
      devdb2            rac2              rac1.domain.com
      Enterprise Manager configuration completed successfully
      FINISHED EMCA at Aug 6, 2009 4:54:49 PM

     
     
     
      b. 删除dbconsole , 资料库不重建
     
      [oracle@rac1 ~]$ emca -config dbcontrol db -cluster
      
      STARTED EMCA at Aug 6, 2009 4:51:25 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: devdb
      The database devdb is already being monitored by central agent(s)
      Database Control is already configured for the database devdb
      You have chosen to configure Database Control for managing the database devdb
      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
      Cluster name: crs
      Password for SYS user: 
      Password for DBSNMP user: 
      Password for SYSMAN user: 
      Password for SYSMAN user: Email address for notifications (optional):
      Outgoing Mail (SMTP) server for notifications (optional):
      ASM ORACLE_HOME [ /u01/app/oracle/product/10.2.0/db_1 ]:
      ASM port [ 1521 ]:
      ASM user role [ SYSDBA ]:
      ASM username [ SYS ]:
      ASM user password: 
      ASM user password: -----------------------------------------------------------------
      You have specified the following settings
      Database ORACLE_HOME ................ /u01/app/oracle/product/10.2.0/db_1
      Database instance hostname ................ rac1.domain.com
      Listener port number ................ 1521
      Cluster name ................ crs
      Database unique name ................ devdb
      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
      Aug 6, 2009 4:58:05 PM oracle.sysman.emcp.EMConfig perform
      INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/devdb/emca_2009-08-06_04-51-24-PM.log.
      Aug 6, 2009 4:58:22 PM oracle.sysman.emcp.util.PortManager isPortInUse
      WARNING: Specified port 5540 is already in use.
      Aug 6, 2009 4:58:22 PM oracle.sysman.emcp.util.PortManager isPortInUse
      WARNING: Specified port 5520 is already in use.
      Aug 6, 2009 4:58:22 PM oracle.sysman.emcp.util.PortManager isPortInUse
      WARNING: Specified port 1158 is already in use.
      Aug 6, 2009 4:58:22 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
      INFO: Stopping Database Control (this may take a while) ...
      Aug 6, 2009 5:00:09 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
      INFO: Propagating /u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_rac1_devdb1 to remote nodes ...
      Aug 6, 2009 5:00:13 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
      INFO: Propagating /u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_rac2_devdb2 to remote nodes ...
      Aug 6, 2009 5:00:17 PM oracle.sysman.emcp.util.CentralAgentUtil unregisterFromCentralAgents
      INFO: Unregistering target(s) with central agent(s) (this may take a while)...
      Aug 6, 2009 5:03:34 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
      INFO: Propagating /u01/app/oracle/product/10.2.0/db_1/rac1_devdb1 to remote nodes ...
      Aug 6, 2009 5:04:13 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
      INFO: Propagating /u01/app/oracle/product/10.2.0/db_1/rac2_devdb2 to remote nodes ...
      Aug 6, 2009 5:04:19 PM oracle.sysman.emcp.util.CentralAgentUtil registerWithCentralAgents
      INFO: Registering target(s) with central agent(s) (this may take a while)...
      Aug 6, 2009 5:08:10 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
      INFO: Securing Database Control (this may take a while) ...
      Aug 6, 2009 5:13:13 PM oracle.sysman.emcp.util.DBControlUtil startOMS
      INFO: Starting Database Control (this may take a while) ...
      Aug 6, 2009 5:16:50 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
      INFO: Database Control started successfully
      Aug 6, 2009 5:16:50 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
      INFO: >>>>>>>>>>> The Database Control URL is
https://rac1.domain.com:1158/em <<<<<<<<<<<
      Aug 6, 2009 5:16:56 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
      INFO:
      ****************  Current Configuration  ****************
       INSTANCE            NODE           DBCONTROL_UPLOAD_HOST
      ----------        ----------        ---------------------
      
      devdb1            rac1              rac1.domain.com
      devdb2            rac2              rac1.domain.com      
      Enterprise Manager configuration completed successfully
      FINISHED EMCA at Aug 6, 2009 5:16:57 PM
     
      c. 查看dbconsole的状态
      [oracle@rac1 ~]$ emctl status dbconsole
      TZ set to PRC
      Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0 
      Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
     
https://rac1.domain.com:1158/em/console/aboutApplication
      Oracle Enterprise Manager 10g is running.
      ------------------------------------------------------------------
      Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/rac1_devdb1/sysman/log
 
 
      参考文献:
      1. Subject:  How To Drop, Create And Recreate DB Control In A 10g Database
         Doc ID:  278100.1 Type:  BULLETIN
         Modified Date :  08-SEP-2008 Status:  PUBLISHED
        
      2. Subject:  Running EMCA Results in Database quiesce And No New Connections or Operations Can Be Performed During the DB Control Repository Creation
         Doc ID:  375946.1 Type:  PROBLEM
         Modified Date :  24-SEP-2008 Status:  PUBLISHED

 

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

请登录后发表评论 登录
全部评论

注册时间:2009-02-10

  • 博文量
    400
  • 访问量
    1224651