ORACLE 10G 配置OEM/DB CONSOLE

简介:

    下面是测试一下10g中怎么配置DB CONSOLE,EM这个东西平时用得太多了,一点不熟悉

     测试环境:OS:SOLARIS 10,DB :10.2.0.1

     1,EMCA创建

 
 
  1. $ emca -config dbcontrol db -repos create 
  2.  
  3. STARTED EMCA at Dec 22, 2012 12:30:09 PM 
  4. EM Configuration Assistant, Version 10.2.0.1.0 Production 
  5. Copyright (c) 2003, 2005, Oracle.  All rights reserved. 
  6.  
  7. Enter the following information: 
  8. Database SID: htz 
  9. Listener port number: 1521 
  10. Password for SYS user:   
  11. Password for DBSNMP user:   
  12. Password for SYSMAN user:   
  13. Email address for notifications (optional):  
  14. Outgoing Mail (SMTP) server for notifications (optional):  
  15. ----------------------------------------------------------------- 
  16.  
  17. You have specified the following settings 
  18.  
  19. Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1 
  20.  
  21. Database hostname ................ 10rac1 
  22. Listener port number ................ 1521 
  23. Database SID ................ htz 
  24. Email address for notifications ...............  
  25. Outgoing Mail (SMTP) server for notifications ...............  
  26.  
  27. ----------------------------------------------------------------- 
  28. Do you wish to continue? [yes(Y)/no(N)]: Y 
  29. Dec 22, 2012 12:31:12 PM oracle.sysman.emcp.EMConfig perform 
  30. INFO: This operation is being logged at /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/emca/htz/emca_2012-12-22_12-30-09-PM.log. 
  31. Dec 22, 2012 12:31:13 PM oracle.sysman.emcp.EMReposConfig createRepository 
  32. INFO: Creating the EM repository (this may take a while) ... 
  33. Dec 22, 2012 12:31:13 PM oracle.sysman.emcp.EMReposConfig invoke 
  34. SEVERE: Error creating the repository 
  35. Dec 22, 2012 12:31:13 PM oracle.sysman.emcp.EMReposConfig invoke 
  36. INFO: Refer to the log file at /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/emca/htz/emca_repos_create_<date>.log for more details. 
  37. Dec 22, 2012 12:31:13 PM oracle.sysman.emcp.EMConfig perform 
  38. SEVERE: Error creating the repository 
  39. Refer to the log file at /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/emca/htz/emca_2012-12-22_12-30-09-PM.log for more details. 
  40. Could not complete the configuration. Refer to the log file at /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/emca/htz/emca_2012-12-22_12-30-09-PM.log for more details 

   晕,报错了,数据库是新创建的,查看一下原因。

 2,日志查看

 
 
  1. $ cd $ORACLE_HOME/cfgtool*/ 
  2. $ ls 
  3. cfgfw                  configToolAllCommands  dbca                   emca                   netca                  oui 
  4. $ cd emca/htz 
  5. $ vi  emca_2012-12-22_12-30-09-PM.log 
  6. CONFIG: No value was set for the parameter SYS_PWD. 
  7. Dec 22, 2012 12:31:01 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine 
  8. CONFIG: SQLEngine connecting with SID: htz, oracleHome: /u01/app/oracle/product/11.2.0/db_1, and user
  9. Dec 22, 2012 12:31:01 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine 
  10. CONFIG: SQLEngine created successfully and connected 
  11. Dec 22, 2012 12:31:01 PM oracle.sysman.emcp.ParamsManager setFlag 
  12. CONFIG: Flag 'asm_db' set to false 
  13. Dec 22, 2012 12:31:01 PM oracle.sysman.emcp.ParamsManager setFlag 
  14. CONFIG: Flag 'asm_db' set to false 
  15. Dec 22, 2012 12:31:03 PM oracle.sysman.emcp.ParamsManager setParam 
  16. CONFIG: Setting param: PORT value: 1521 
  17. Dec 22, 2012 12:31:05 PM oracle.sysman.emcp.ParamsManager getParam 
  18. CONFIG: No value was set for the parameter SYS_PWD. 
  19. Dec 22, 2012 12:31:05 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine 
  20. CONFIG: SQLEngine connecting with SID: htz, oracleHome: /u01/app/oracle/product/11.2.0/db_1, and user: SYS 
  21. Dec 22, 2012 12:31:05 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine 
  22. CONFIG: SQLEngine created successfully and connected 
  23. "emca_2012-12-22_12-30-09-PM.log" 370 lines, 26004 characters 
  24.         at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeScript(SQLEngine.java:841) 
  25.         at oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java:265) 
  26.         at oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java:306) 
  27.         at oracle.sysman.emcp.EMReposConfig.createRepository(EMReposConfig.java:360) 
  28.         at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:182) 
  29.         at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:124) 
  30.         at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:142) 
  31.         at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:479) 
  32.         at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1123) 
  33.         at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:463) 
  34.         at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:412) 
  35. Dec 22, 2012 12:31:13 PM oracle.sysman.emcp.EMReposConfig invoke 
  36. SEVERE: Error creating the repository 
  37. Dec 22, 2012 12:31:13 PM oracle.sysman.emcp.EMReposConfig invoke 
  38. INFO: Refer to the log file at /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/emca/htz/emca_repos_create_<date>.log for more details. 
  39. Dec 22, 2012 12:31:13 PM oracle.sysman.emcp.EMConfig perform 
  40. SEVERE: Error creating the repository 
  41. Refer to the log file at /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/emca/htz/emca_2012-12-22_12-30-09-PM.log for more details. 
  42. Dec 22, 2012 12:31:13 PM oracle.sysman.emcp.EMConfig perform 
  43. CONFIG: Stack Trace: 
  44. oracle.sysman.emcp.exception.EMConfigException: Error creating the repository 
  45.         at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:194) 
  46.         at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:124) 
  47.         at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:142) 
  48.         at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:479) 
  49.         at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1123) 
  50.         at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:463) 
  51.         at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:412) 
  52.  
  53. 再看另一个日志 
  54.  
  55. $ vi  emca_repos_create_2012-12-22_12-31-13-PM.log 
  56. "emca_repos_create_2012-12-22_12-31-13-PM.log" 21 lines, 911 characters  
  57.  
  58. Check if repos user already exists. 
  59.  
  60. old   6:    WHERE username=UPPER('&EM_REPOS_USER'); 
  61. new   6:    WHERE username=UPPER('SYSMAN'); 
  62. old   8:   IF ( '&EM_CHECK_TYPE' = 'EXISTS'THEN 
  63. new   8:   IF ( 'NOT_EXISTS' = 'EXISTS'THEN 
  64. old  11:       raise_application_error(-20000, '&EM_REPOS_USER does not exists..'); 
  65. new  11:       raise_application_error(-20000, 'SYSMAN does not exists..'); 
  66. old  14:   ELSIF ( '&EM_CHECK_TYPE' = 'NOT_EXISTS' ) THEN 
  67. new  14:   ELSIF ( 'NOT_EXISTS' = 'NOT_EXISTS' ) THEN 
  68. old  17:       raise_application_error(-20001, '&EM_REPOS_USER already exists..'); 
  69. new  17:       raise_application_error(-20001, 'SYSMAN already exists..'); 
  70. old  21:       raise_application_error(-20002, 'Invalid Check type &EM_CHECK_TYPE'); 
  71. new  21:       raise_application_error(-20002, 'Invalid Check type NOT_EXISTS'); 
  72. DECLARE 
  73. ERROR at line 1: 
  74. ORA-20001: SYSMAN already exists.. 
  75. ORA-06512: at line 17 
  76.  
  77. 报用户已经存在,原来没有创建过EM,DBCA创建数据库的时候也没有勾上。 

3,删除相关的用户

 
 
  1. $ sqlplus / as sysdba 
  2.  
  3. SQL*Plus: Release 10.2.0.1.0 - Production on Sat Dec 22 12:35:14 2012 
  4.  
  5. Copyright (c) 1982, 2005, Oracle.  All rights reserved. 
  6.  
  7.  
  8. Connected to
  9. Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production 
  10. With the Partitioning, OLAP and Data Mining options 
  11.  
  12. SQL> drop user sysman cascade
  13.  
  14. User dropped. 
  15.  
  16. SQL> drop role MGMT_USER; 
  17.  
  18. Role dropped. 
  19.  
  20. SQL> drop user MGMT_VIEW cascade
  21.  
  22. User dropped. 
  23.  
  24. SQL> drop public synonym MGMT_TARGET_BLACKOUTS; 
  25.  
  26. Synonym dropped. 
  27.  
  28. SQL> drop public synonym SETEMVIEWUSERCONTEXT; 
  29.  
  30. Synonym dropped. 

4,再次测试DB CONSOLE

 
 
  1. $ emca -config dbcontrol db -repos create                       
  2.  
  3. STARTED EMCA at Dec 22, 2012 12:38:06 PM 
  4. EM Configuration Assistant, Version 10.2.0.1.0 Production 
  5. Copyright (c) 2003, 2005, Oracle.  All rights reserved. 
  6.  
  7. Enter the following information: 
  8. Database SID: htz 
  9. Listener port number: 1521 
  10. Password for SYS user:   
  11. Password for DBSNMP user:   
  12. Password for SYSMAN user:   
  13. Email address for notifications (optional):  
  14. Outgoing Mail (SMTP) server for notifications (optional):  
  15. ----------------------------------------------------------------- 
  16.  
  17. You have specified the following settings 
  18.  
  19. Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1 
  20.  
  21. Database hostname ................ 10rac1 
  22. Listener port number ................ 1521 
  23. Database SID ................ htz 
  24. Email address for notifications ...............  
  25. Outgoing Mail (SMTP) server for notifications ...............  
  26.  
  27. ----------------------------------------------------------------- 
  28. Do you wish to continue? [yes(Y)/no(N)]: Y 
  29. Dec 22, 2012 12:38:18 PM oracle.sysman.emcp.EMConfig perform 
  30. INFO: This operation is being logged at /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/emca/htz/emca_2012-12-22_12-38-06-PM.log. 
  31. Dec 22, 2012 12:38:18 PM oracle.sysman.emcp.EMReposConfig createRepository 
  32. INFO: Creating the EM repository (this may take a while) ... 
  33.         Dec 22, 2012 12:39:55 PM oracle.sysman.emcp.EMReposConfig invoke 
  34. INFO: Repository successfully created 
  35. Dec 22, 2012 12:39:57 PM oracle.sysman.emcp.util.DBControlUtil startOMS 
  36. INFO: Starting Database Control (this may take a while) ... 
  37. Dec 22, 2012 12:41:31 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration 
  38. INFO: Database Control started successfully 
  39. Dec 22, 2012 12:41:31 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration 
  40. INFO: >>>>>>>>>>> The Database Control URL is http://10rac1:1158/em <<<<<<<<<<< 
  41. Enterprise Manager configuration completed successfully 
  42. FINISHED EMCA at Dec 22, 2012 12:41:31 PM 
  43. $        

5,测试是否成功

 
 
  1. $ emctl status dbconsole 
  2. Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0   
  3. Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved. 
  4. http://10rac1:1158/em/console/aboutApplication 
  5. Oracle Enterprise Manager 10g is running.  
  6. ------------------------------------------------------------------ 
  7. Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/10rac1_htz/sysman/log  

6,通过http访问,一切正常






     本文转自7343696 51CTO博客,原文链接:http://blog.51cto.com/luoping/1096788,如需转载请自行联系原作者


相关文章
|
10月前
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——Dept实体类和对应的配置信息
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——Dept实体类和对应的配置信息
百度搜索:蓝易云【docker部署并配置oracle12c的cdb和pdb教程!】
以上是使用Docker部署和配置Oracle 12c CDB和PDB的简要教程。请注意,这只是一个概述,并且可能需要根据你的实际情况进行适当的调整和配置。建议参考Oracle官方文档和相关资源,以获得更详细和全面的指导。
167 2
【YashanDB知识库】如何配置jdbc驱动使getDatabaseProductName()返回Oracle
【YashanDB知识库】如何配置jdbc驱动使getDatabaseProductName()返回Oracle
如何在 Oracle 中配置和使用 SQL Profiles 来优化查询性能?
在 Oracle 数据库中,SQL Profiles 是优化查询性能的工具,通过提供额外统计信息帮助生成更有效的执行计划。配置和使用步骤包括:1. 启用自动 SQL 调优;2. 手动创建 SQL Profile,涉及收集、执行调优任务、查看报告及应用建议;3. 验证效果;4. 使用 `DBA_SQL_PROFILES` 视图管理 Profile。
Oracle VM VirtualBox之Ubuntu 22.04LTS双网卡网络模式配置
这篇文章是关于如何在Oracle VM VirtualBox中配置Ubuntu 22.04LTS虚拟机双网卡网络模式的详细指南,包括VirtualBox网络概述、双网卡网络模式的配置步骤以及Ubuntu系统网络配置。
663 3
ORACLE Apex: EBS多组织结构 理解与配置
【8月更文挑战第11天】在Oracle Apex中理解和配置与EBS多组织结构相关内容需掌握:1) EBS多组织结构概念及组成部分,如法律实体、业务单位与库存组织;2) Oracle Apex与EBS集成的目的与方式,包括提供友好界面及自定义业务流程;3) 在Apex中配置多组织结构应用,涉及数据访问控制、页面报表设计及业务流程集成。整体而言,需精通EBS架构与Apex开发技术,以实现高效灵活的企业解决方案。
169 2
Oracle21C + PLSQL Developer 15 + Oracle客户端21安装配置完整图文版
Oracle21C + PLSQL Developer 15 + Oracle客户端21安装配置完整图文版
712 0
实时计算 Flink版产品使用合集之可以通过配置Oracle数据库的schema注册表来监测表结构的变化吗
实时计算Flink版作为一种强大的流处理和批处理统一的计算框架,广泛应用于各种需要实时数据处理和分析的场景。实时计算Flink版通常结合SQL接口、DataStream API、以及与上下游数据源和存储系统的丰富连接器,提供了一套全面的解决方案,以应对各种实时计算需求。其低延迟、高吞吐、容错性强的特点,使其成为众多企业和组织实时数据处理首选的技术平台。以下是实时计算Flink版的一些典型使用合集。
76 1

热门文章

最新文章

推荐镜像

更多