ITPub博客

首页 > 数据库 > Oracle > 配置EM

配置EM

原创 Oracle 作者:q499311546 时间:2017-01-17 15:13:25 0 删除 编辑
楼主今天打算玩一下EM,参照官方文档,使用了emctl start dbconsole的命令,出现了一下错误。

点击(此处)折叠或打开

  1. [oracle@orcl ~]$ emctl start dbconsole
  2. Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
我的解决方法是在/home/oracle/bash_profile文件添加ORACLE_UNQNAME

点击(此处)折叠或打开

  1. vim .bash_profile
  2. export ORACLE_UNQNAME=$ORACLE_SID
然后再次运行emctl start dbconsole,上面的错误解决了,但是又有个新的错误。

点击(此处)折叠或打开

  1. [oracle@orcl ~]$ emctl start dbconsole
  2. OC4J Configuration issue. /u01/app/oracle/product/11.2.0.3/dbhome_1/oc4j/j2ee/OC4J_DBConsole_orcl_orcl not found.
原来是楼主安装oracle数据库的时候是选择不安装EM的。那我们就重新安装EM资料库吧。

点击(此处)折叠或打开

  1. [oracle@orcl ~]$ emca -repos recreate

  2. STARTED EMCA at Jan 16, 2017 9:01:21 PM
  3. EM Configuration Assistant, Version 11.2.0.3.0 Production
  4. Copyright (c) 2003, 2011, Oracle. All rights reserved.

  5. Enter the following information:
  6. Database SID: orcl
  7. Listener port number: 1521
  8. Password for SYS user:
  9. Password for SYSMAN user:

  10. ----------------------------------------------------------------------
  11. WARNING : While repository is dropped the database will be put in quiesce mode.
  12. ----------------------------------------------------------------------
  13. Do you wish to continue? [yes(Y)/no(N)]: y
  14. Jan 16, 2017 9:01:47 PM oracle.sysman.emcp.EMConfig perform
  15. INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2017_01_16_21_01_20.log.
  16. Jan 16, 2017 9:01:47 PM oracle.sysman.emcp.EMReposConfig invoke
  17. INFO: Dropping the EM repository (this may take a while) ...
  18. Jan 16, 2017 9:01:49 PM oracle.sysman.emcp.EMReposConfig invoke
  19. INFO: Repository successfully dropped
  20. Jan 16, 2017 9:01:49 PM oracle.sysman.emcp.EMReposConfig createRepository
  21. INFO: Creating the EM repository (this may take a while) ...
  22. Jan 16, 2017 9:05:39 PM oracle.sysman.emcp.EMReposConfig invoke
  23. INFO: Repository successfully created
  24. Enterprise Manager configuration completed successfully
  25. FINISHED EMCA at Jan 16, 2017 9:05:39 PM
EM资料库重建完就开始配置dbcontrol了。

点击(此处)折叠或打开

  1. [oracle@orcl ~]$ emca -config dbcontrol db

  2. STARTED EMCA at Jan 16, 2017 9:14:18 PM
  3. EM Configuration Assistant, Version 11.2.0.3.0 Production
  4. Copyright (c) 2003, 2011, Oracle. All rights reserved.

  5. Enter the following information:
  6. Database SID: orcl
  7. Listener port number: 1521
  8. Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0.3/dbhome_1 ]:
  9. Password for SYS user:
  10. Password for DBSNMP user:
  11. Jan 16, 2017 9:14:40 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
  12. WARNING: ORA-28000: the account is locked

  13. Password for SYSMAN user:
  14. Email address for notifications (optional):
  15. Outgoing Mail (SMTP) server for notifications (optional):
  16. -----------------------------------------------------------------

  17. You have specified the following settings

  18. Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0.3/dbhome_1

  19. Local hostname ................ orcl
  20. Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0.3/dbhome_1
  21. Listener port number ................ 1521
  22. Database SID ................ orcl
  23. Email address for notifications ...............
  24. Outgoing Mail (SMTP) server for notifications ...............

  25. -----------------------------------------------------------------
  26. Do you wish to continue? [yes(Y)/no(N)]: y
  27. Jan 16, 2017 9:15:14 PM oracle.sysman.emcp.EMConfig perform
  28. INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2017_01_16_21_14_18.log.
  29. Jan 16, 2017 9:15:18 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
  30. INFO: Uploading configuration data to EM repository (this may take a while) ...
  31. Jan 16, 2017 9:16:05 PM oracle.sysman.emcp.EMReposConfig invoke
  32. INFO: Uploaded configuration data successfully
  33. Jan 16, 2017 9:16:07 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
  34. INFO: Securing Database Control (this may take a while) ...
  35. Jan 16, 2017 9:16:55 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
  36. INFO: Database Control secured successfully.
  37. Jan 16, 2017 9:16:55 PM oracle.sysman.emcp.util.DBControlUtil startOMS
  38. INFO: Starting Database Control (this may take a while) ...
  39. Jan 16, 2017 9:17:38 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
  40. INFO: Database Control started successfully
  41. Jan 16, 2017 9:17:38 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
  42. INFO: >>>>>>>>>>> The Database Control URL is https://orcl:1158/em <<<<<<<<<<<
  43. Jan 16, 2017 9:17:45 PM oracle.sysman.emcp.EMDBPostConfig invoke
  44. WARNING:
  45. ************************ WARNING ************************

  46. Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted. The encryption key has been placed in the file: /u01/app/oracle/product/11.2.0.3/dbhome_1/orcl_orcl/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.

  47. ***********************************************************
  48. Enterprise Manager configuration completed successfully
  49. FINISHED EMCA at Jan 16, 2017 9:17:45 PM

现在就可以用浏览器打开EM了。

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

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

注册时间:2016-06-03

  • 博文量
    38
  • 访问量
    53166