Chinaunix首页 | 论坛 | 博客
  • 博客访问: 175296
  • 博文数量: 46
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 490
  • 用 户 组: 普通用户
  • 注册时间: 2017-03-26 14:22
个人简介

做最Low逼的DBA

文章分类

全部博文(46)

文章存档

2017年(46)

我的朋友

分类: Oracle

2017-05-06 17:27:27

Basic Enterprise Manager Troubleshooting


 基于web的企业管理工具是在Oracle 10g中引入的,并且在以前的版本中有显著的功能改进。即便如此,似乎没有一天没有人问如何解决企业管理器配置问题,因此本文将解释应该关注的第一个问题


?  确保“/etc/hosts”文件中含至少Loopback地址,最好是机器名也定义

127.0.0.1       localhost.localdomain  localhost

192.168.0.181   myserver.localdomain   myserver


?  如果使用的是11 g,确保ORACLE_HOSTNAMEORACLE_UNQNAME环境变量设置正确

ORACLE_HOSTNAME=myserver.localdomain; export ORACLE_HOSTNAME

ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME


?  检查监听是否正确运行

lsnrctl status


?  使用emctl 启动企业管理器

$ emctl start dbconsole


  假设控制台已经在运行,或者无法启动,接下来要做的事情就是重新配置企业管理器

  这是通过使用企业管理器配置助理(EMCA)

  对于第一次尝试,运行以下命令

$ emca -config dbcontrol db -repos recreate


如果顺利,可能会看到如下输出

$ emca -config dbcontrol db -repos recreate

 

STARTED EMCA at Mar 13, 2009 11:32:35 AM

EM Configuration Assistant, Version 11.1.0.7.0 Production

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

 

Enter the following information:

Database SID: DB11G

Database Control is already configured for the database DB11G

You have chosen to configure Database Control for managing the database DB11G

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: 

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 ................ /u01/app/oracle/product/11.1.0/db_1

 

Local hostname ................ oel5-11g.localdomain

Listener port number ................ 1521

Database SID ................ DB11G

Email address for notifications ...............

Outgoing Mail (SMTP) server for notifications ...............

 

-----------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: Y

Mar 13, 2009 11:33:19 AM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_2009_03_13_11_32_35.log.

Mar 13, 2009 11:33:20 AM oracle.sysman.emcp.util.PortManager isPortInUse

WARNING: Specified port 5540 is already in use.

Mar 13, 2009 11:33:20 AM oracle.sysman.emcp.util.PortManager isPortInUse

WARNING: Specified port 5520 is already in use.

Mar 13, 2009 11:33:20 AM oracle.sysman.emcp.util.PortManager isPortInUse

WARNING: Specified port 1158 is already in use.

Mar 13, 2009 11:33:20 AM oracle.sysman.emcp.util.PortManager isPortInUse

WARNING: Specified port 3938 is already in use.

Mar 13, 2009 11:33:20 AM oracle.sysman.emcp.util.DBControlUtil stopOMS

INFO: Stopping Database Control (this may take a while) ...

Mar 13, 2009 11:33:22 AM oracle.sysman.emcp.EMReposConfig invoke

INFO: Dropping the EM repository (this may take a while) ...

Mar 13, 2009 11:35:12 AM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully dropped

Mar 13, 2009 11:35:12 AM oracle.sysman.emcp.EMReposConfig createRepository

INFO: Creating the EM repository (this may take a while) ...

Mar 13, 2009 11:40:06 AM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully created

Mar 13, 2009 11:40:11 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository

INFO: Uploading configuration data to EM repository (this may take a while) ...

Mar 13, 2009 11:41:01 AM oracle.sysman.emcp.EMReposConfig invoke

INFO: Uploaded configuration data successfully

Mar 13, 2009 11:41:07 AM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib

INFO: Software library configured successfully.

Mar 13, 2009 11:41:07 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary

INFO: Deploying Provisioning archives ...

Mar 13, 2009 11:41:16 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary

INFO: Provisioning archives deployed successfully.

Mar 13, 2009 11:41:16 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Securing Database Control (this may take a while) ...

Mar 13, 2009 11:41:28 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Database Control secured successfully.

Mar 13, 2009 11:41:28 AM oracle.sysman.emcp.util.DBControlUtil startOMS

INFO: Starting Database Control (this may take a while) ...

Mar 13, 2009 11:42:31 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: Database Control started successfully

Mar 13, 2009 11:42:34 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: >>>>>> The Database Control URL is <<<<<<

Mar 13, 2009 11:42:48 AM 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: /u01/app/oracle/product/11.1.0/db_1/oel5-11g.localdomain_DB11G/sysman/config/emkey.ora.   Please 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 Mar 13, 2009 11:42:48 AM

$


如果此操作失败,则删除配置和创建企业管理器配置

emca -deconfig dbcontrol db -repos drop

emca -config dbcontrol db -repos create


?  执行输入如下

$ emca -deconfig dbcontrol db -repos drop

 

STARTED EMCA at Mar 13, 2009 12:09:48 PM

EM Configuration Assistant, Version 11.1.0.7.0 Production

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

 

Enter the following information:

Database SID: DB11G

Listener port number: 1521

Password for SYS user: 

Password for SYSMAN user: 

 

Do you wish to continue? [yes(Y)/no(N)]: Y

Mar 13, 2009 12:10:07 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_2009_03_13_12_09_47.log.

Mar 13, 2009 12:10:08 PM oracle.sysman.emcp.util.DBControlUtil stopOMS

INFO: Stopping Database Control (this may take a while) ...

Mar 13, 2009 12:10:31 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Dropping the EM repository (this may take a while) ...

Mar 13, 2009 12:11:56 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully dropped

Enterprise Manager configuration completed successfully

FINISHED EMCA at Mar 13, 2009 12:12:02 PM

$


执行配置如下

$ emca -config dbcontrol db -repos create

 

STARTED EMCA at Mar 13, 2009 12:37:27 PM

EM Configuration Assistant, Version 11.1.0.7.0 Production

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

 

Enter the following information:

Database SID: DB11G

Listener port number: 1521

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

-----------------------------------------------------------------

 

You have specified the following settings

 

Database ORACLE_HOME ................ /u01/app/oracle/product/11.1.0/db_1

 

Local hostname ................ oel5-11g.localdomain

Listener port number ................ 1521

Database SID ................ DB11G

Email address for notifications ...............

Outgoing Mail (SMTP) server for notifications ...............

 

-----------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: Y

Mar 13, 2009 12:37:54 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_2009_03_13_12_37_27.log.

Mar 13, 2009 12:37:55 PM oracle.sysman.emcp.EMReposConfig createRepository

INFO: Creating the EM repository (this may take a while) ...

Mar 13, 2009 12:42:03 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully created

Mar 13, 2009 12:42:07 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository

INFO: Uploading configuration data to EM repository (this may take a while) ...

Mar 13, 2009 12:42:57 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Uploaded configuration data successfully

Mar 13, 2009 12:42:59 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib

INFO: Software library configured successfully.

Mar 13, 2009 12:42:59 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary

INFO: Deploying Provisioning archives ...

Mar 13, 2009 12:43:07 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary

INFO: Provisioning archives deployed successfully.

Mar 13, 2009 12:43:07 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Securing Database Control (this may take a while) ...

Mar 13, 2009 12:43:20 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Database Control secured successfully.

Mar 13, 2009 12:43:20 PM oracle.sysman.emcp.util.DBControlUtil startOMS

INFO: Starting Database Control (this may take a while) ...

Mar 13, 2009 12:44:17 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: Database Control started successfully

Mar 13, 2009 12:44:17 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: >>>>>> The Database Control URL is <<<<<<

Mar 13, 2009 12:44:21 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: /u01/app/oracle/product/11.1.0/db_1/oel5-11g.localdomain_DB11G/sysman/config/emkey.ora.   Please 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 Mar 13, 2009 12:44:21 PM

$

  对于遇到的绝大多数情况,这些步骤都能解决问题






























阅读(1619) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~