由于sysman 和dbsnmp用户的密码过期,重新更改密码后,em无法登陆,故选择重配,方法较为简单,过程如下:
1.关闭原有em 的dbconsole
oracle@ora03:~>emctl stop dbconsole .... stopped |
2.重新配置dbcontrol 同时重建repostory
oracle@ora03:~>$emca -config dbcontrol db -repos recreate STARTED EMCA at Oct 16, 2013 3:24:18 PM EM Configuration Assistant, Version 11.2.0.3.0 Production Copyright (c) 2003, 2011, Oracle. All rights reserved. Enter the following information: Database SID: test01 Database Control is already configured for the database test01 You have chosen to configure Database Control for managing the database cpcds01 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 ORACLE_HOME [ /ora/u01/oracle/product/11gR2/db ]: Password for SYS user: Password for DBSNMP user: Password for SYSMAN user: Email address for notifications (optional): Outgoing Mail (SMTP) server for notifications (optional): ----------------------------------------------------------------- You have specified the following settings Database ORACLE_HOME ................ /ora/u01/oracle/product/11gR2/db Local hostname ................ora03.aia.biz Listener ORACLE_HOME ................ /ora/u01/oracle/product/11gR2/db Listener port number ................ 1521 Database SID ................ cpcds01 Email address for notifications ............... Outgoing Mail (SMTP) server for notifications ............... ----------------------------------------------------------------- Do you wish to continue? [yes(Y)/no(N)]: Y Oct 16, 2013 3:24:59 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /ora/u01/oracle/cfgtoollogs/emca/cpcds01/emca_2013_10_16_15_24_18.log. Oct 16, 2013 3:25:00 PM oracle.sysman.emcp.util.DBControlUtil stopOMS INFO: Stopping Database Control (this may take a while) ... Oct 16, 2013 3:25:07 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository INFO: Uploading configuration data to EM repository (this may take a while) ... Oct 16, 2013 3:26:21 PM oracle.sysman.emcp.EMReposConfig invoke INFO: Uploaded configuration data successfully Oct 16, 2013 3:26:30 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Securing Database Control (this may take a while) ... Oct 16, 2013 3:26:45 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Database Control secured successfully. Oct 16, 2013 3:26:45 PM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ... Oct 16, 2013 3:27:09 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: Database Control started successfully Oct 16, 2013 3:27:10 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: >>>>>>>>>>> The Database Control URL is https://shadcpsora03.aia.biz:5500/em <<<<<<<<<<< Oct 16, 2013 3:27:13 PM oracle.sysman.emcp.EMDBPostConfig invoke WARNING: *********************** WARNING ************************ Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted. The encryption key has been placed in the file: /ora/u01/oracle/product/11gR2/db/shadcpsora03.aia.biz_cpcds01/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost. *********************************************************** Enterprise Manager configuration completed successfully FINISHED EMCA at Oct 16, 2013 3:27:13 PM |
3.查看EM状态
oracle@ora03:~> emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0 Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved. https://shadcpsora03.aia.biz:5500/em/console/aboutApplication Oracle Enterprise Manager 11g is running. ------------------------------------------------------------------ Logs are generated in directory /ora/u01/oracle/product/11gR2/db/shadcpsora03.aia.biz_cpcds01/sysman/log |
完成,并能正常登陆。
4.如在重建过程中,遇到报错,请按如下步骤重新执行:
drop user sysman cascade;
drop role MGMT_USER; drop user MGMT_VIEW cascade; drop public synonym MGMT_TARGET_BLACKOUTS; drop public synonym SETEMVIEWUSERCONTEXT; $emca -config dbcontrol db -repos recreate |