Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2111315
  • 博文数量: 195
  • 博客积分: 4378
  • 博客等级: 上校
  • 技术积分: 4046
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-09 11:37
个人简介

白天和黑夜只交替没交换无法想像对方的世界

文章分类

全部博文(195)

文章存档

2014年(3)

2013年(20)

2012年(18)

2011年(107)

2010年(17)

2009年(5)

2008年(20)

2007年(5)

分类: Oracle

2010-07-06 12:29:43

要想打开OEM的管理程序,必须先启动Database listener,再启动Datebase Control端口监控程序,但是碰到下面的情况
     
  问题:
    [oracle@localhost OC4J_DBConsole]$ emctl start dbconsole
    TZ set to PRC
    OC4J Configuration issue. /u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_localhost.localdomain_orcl not   found.
   
    其实产生的这样的情况,可能是em资料库配置不正确或者是dbcotrol没有配置好。
  
  解决:  
  ①重建em资料
    [oracle@localhost OC4J_DBConsole]$ emca -repos recreate
    ...
    Enter the following information:
    Database SID: orcl
    Listener port number: 1521
    Password for SYS user:
    Password for SYSMAN user: oracle
    Do you wish to continue? [yes(Y)/no(N)]: y
    ...
    INFO: Repository successfully created
 
  ②配置dbcontrol
   [oracle@localhost OC4J_DBConsole]$ emca -config dbcontrol db
   EMCA 开始于 2009-6-8 21:50:28
   EM Configuration Assistant 10.2.0.1.0 正式版
   版权所有 (c) 2003, 2005, Oracle。保留所有权利。

   输入以下信息:
   SID: orcl
   监听程序端口号: 1521
   SYS 用户的口令:     (口令是看不到的)
   DBSNMP 用户的口令:   (口令是看不到的)
   SYSMAN 用户的口令:    (口令是看不到的)
   通知的电子邮件地址 (可选):
   通知的发件 (SMTP) 服务器 (可选):
   -----------------------------------------------------------------

   已指定以下设置

   数据库 ORACLE_HOME ................ /u01/app/oracle/product/10.2.0/db_1

   数据库主机名 ................ localhost.localdomain
   监听程序端口号 ................ 1521
   数据库 SID ................ orcl
   通知的电子邮件地址 ............... 
   通知的发件 (SMTP) 服务器 ...............

   -----------------------------------------------------------------
   是否继续? [yes(Y)/no(N)]: y
   2009-6-8 21:50:58 oracle.sysman.emcp.EMConfig perform
   信息: 正在将此操作记录到 /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2009-06-08_09-50-27-下午.log。
   2009-6-8 21:50:59 oracle.sysman.emcp.DatabaseChecks performReposChecks
   警告: 'shared_pool_size' 必须大于等于 80 MB。 
   2009-6-8 21:51:13 oracle.sysman.emcp.util.DBControlUtil startOMS
   信息: 正在启动 Database Control (此操作可能需要一段时间)...
   2009-6-8 21:52:57 oracle.sysman.emcp.EMDBPostConfig performConfiguration
   信息: 已成功启动 Database Control
   2009-6-8 21:52:57 oracle.sysman.emcp.EMDBPostConfig performConfiguration
   信息: >>>>>>>>>>> Database Control URL 为<<<<<<<<<<<
   已成功完成 Enterprise Manager 的配置
   EMCA 结束于 2009-6-8 21:52:57
  
   然后直接进入,输入账户sys和密码******,选择sysdba权限,就能正常看到基于WEB的EM了。
  
    Oracle10G的EM采用了web方式,并且分成了2个产品,database control和grid control。Grid control需要下载单独的光盘安装。在用DBCA建库的时候,可以选择是否启用dbcontrol,启用的话需要在数据库中建立一个sysman的 schema,用于保存EM的一些数据,这个就是EM的资料库(repository)。使用命令行工具emca可以创建,修改,重建或者删除 dbcontrol的配置。
  
    emca -repos create: 创建新的 Database Control 资料档案库
    emca -repos drop: 删除当前的 Database Control 资料档案库
    emca -repos recreate: 删除当前的 Database Control 资料档案库并重新创建一个
   
    emca -config dbcontrol db:配置数据库的 Database Control
    emca -deconfig dbcontrol db:取消数据库的 Database Control

    注:(1)如果服务器上存在多个数据库,必须在启动Database control之前设置ORACLE_SID环境变量
        (2)最好使用静态IP地址来配置服务器

 

重启控制台服务后也没有效果:

$ emctl status dbconsole
$ emctl stop dbconsole       
$ emctl start dbconsole

可能时原先监听未成功启动过,或者由于我修改过监听端口(1521改成1528)造成的。

重建em资料库:

$ emctl stop dbconsole
$ emca -repos recreate
...
Enter the following information:
Database SID: orcl10
Listener port number: 1528
Password for SYS user: oracle10
Password for SYSMAN user: oracle10
Do you wish to continue? [yes(Y)/no(N)]: y
...
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Apr 19, 2007 6:20:22 PM

配置dbcontrol:

$ emca -config dbcontrol db
Enter the following information:
Database SID: orcl10
Database Control is already
configured for the database orcl10
You have chosen to configure
Database Control for managing
the database orcl10
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: 1528
Password for SYS user: oracle10
Password for DBSNMP user: oracle10 
Password for SYSMAN user: oracle10
Email address for notifications (optional):
Outgoing Mail (SMTP) server for
notifications (optional):
...
Do you wish to continue? [yes(Y)/no(N)]: y
...
Enterprise Manager configuration
completed successfully
FINISHED EMCA at Apr 19, 2007 6:27:44 PM

然后再进入查看正常了。

Oracle10G的EM采用了web方式,并且分成了2个产品,database control和grid control。Grid control需要下载单独的光盘安装。在用DBCA建库的时候,可以选择是否启用dbcontrol,启用的话需要在数据库中建立一个sysman的schema,用于保存EM的一些数据,这个就是EM的资料库(repository)。使用命令行工具emca可以创建,修改,重建或者删除dbcontrol的配置。

由于要在数据库中建EM资料库,数据库和监听都必须已经启动并正常。

emca -repos create 创建一个EM资料库
emca -repos recreate 重建一个EM资料库
emca -repos drop 删除一个EM资料库
emca -config dbcontrol db
配置数据库的 Database Control
emca -deconfig dbcontrol db
删除数据库的 Database Control配置
emca -reconfig ports
重新配置db control和agent的端口
emctl start console
启动EM console服务,使用前需要先
设置ORACLE_SID变量
emctl stop console 停止EM console服务,
使用前需要先设置ORACLE_SID变量
注:通过查看$ORACLE_HOME/install/portlist.ini
文件可以知道当前dbcontrol正在使用的端口,
默认dbcontrol http端口1158,agent端口3938。
如果要重新配置端口,可以使用如下命令:
emca -reconfig ports -dbcontrol_http_port 1159
emca -reconfig ports -agent_port 3939

使用命令行工具emctl可以启动/停止console服务,察看服务状态等。

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