ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 主机名改名后oracle database control 无法启动的问题

主机名改名后oracle database control 无法启动的问题

原创 Linux操作系统 作者:msdnchina 时间:2008-11-23 12:13:33 0 删除 编辑

一、简介:

1.概念

Oracle10G的EM(企业管理器)采用了web方式,也就是直接打开ie浏览器,输入网址就可以访问oracle,进而可以管理oracle.

Oracle10G的EM 分成了2个产品,database control(用于一个database的)和grid contro(用于多个database的)。这里遇到的问题是在database control(用于一个database的)。Grid control据说需要下载单独的光盘安装,这一点也我只是看到其他高手这么说的,我并没有做过。

下面一段话摘自http://www.cublog.cn/u/25565/showart_268270.html,十分感谢这位高手。

在用DBCA建库的时候,可以选择是否启用dbcontrol,启用的话需要在数据库中建立一个sysman的schema,用于保存EM的一些数据,这个就是EM的资料库(repository)。

---摘录完毕。

2.本机的环境

装oralce 10g之前,忘记了改主机名,这样一来,是在装完oracle后,去改的主机名,改完主机名后,还需要去改E:\oracle\product\10.2.0\db_1\network\admin\listener.ora  这个文件,将其中的老主机名改为新主机名。这是个老问题了,不知道oracle为什么不解决呢?呵呵。

二、解决过程:

Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>emctl
Environment variable ORACLE_SID not defined. Please define it.

C:\Documents and Settings\Administrator>set oracle_sid=oracle

C:\Documents and Settings\Administrator>emctl
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Invalid arguments

Unknown command option
Usage::
   Oracle Enterprise Manager 10g Database Control commands:
       emctl start| stop| status| setpasswd dbconsole
       emctl secure

       emctl set ssl test|off|on em
       emctl set ldap
emctl blackout options can be listed by typing "emctl blackout"
emctl config options can be listed by typing "emctl config"
emctl secure options can be listed by typing "emctl secure"
emctl ilint  options can be listed by typing "emctl ilint"
emctl deploy  options can be listed by typing "emctl deploy"

C:\Documents and Settings\Administrator>emctl start dbconsole
Unable to determine local host from URL REPOSITORY_URL=http://shleiyanliang:%EM_
UPLOAD_PORT%/em/upload/
 .

C:\Documents and Settings\Administrator>emca -config dbcontrol db

EMCA 开始于 2008-11-23 12:07:02
EM Configuration Assistant 10.2.0.1.0 正式版
版权所有 (c) 2003, 2005, Oracle。保留所有权利。

输入以下信息:
数据库 SID: oracle
已为数据库 oracle 配置了 Database Control
您已选择配置 Database Control, 以便管理数据库 oracle
此操作将移去现有配置和默认设置, 并重新执行配置
是否继续? [yes(Y)/no(N)]: y
监听程序端口号: 1521
SYS 用户的口令:
DBSNMP 用户的口令:
SYSMAN 用户的口令:
SYSMAN 用户的口令: 通知的电子邮件地址 (可选):
leiyanliang@inspur.com
通知的发件 (SMTP) 服务器 (可选):
-----------------------------------------------------------------

已指定以下设置

数据库 ORACLE_HOME ................ E:\oracle\product\10.2.0\db_1

数据库主机名 ................ shleiyanliang
监听程序端口号 ................ 1521
数据库 SID ................ oracle
通知的电子邮件地址 ...............
leiyanliang@inspur.com
通知的发件 (SMTP) 服务器 ...............

-----------------------------------------------------------------
是否继续? [yes(Y)/no(N)]: y
2008-11-23 12:07:43 oracle.sysman.emcp.EMConfig perform
信息: 正在将此操作记录到 E:\oracle\product\10.2.0\db_1\cfgtoollogs\emca\oracle\e
mca_2008-11-23_12-07-01-下午.log。
2008-11-23 12:07:47 oracle.sysman.emcp.util.DBControlUtil stopOMS
信息: 正在停止 Database Control (此操作可能需要一段时间)...
2008-11-23 12:07:56 oracle.sysman.emcp.util.DBControlUtil startOMS
信息: 正在启动 Database Control (此操作可能需要一段时间)...
2008-11-23 12:08:36 oracle.sysman.emcp.EMDBPostConfig performConfiguration
信息: 已成功启动 Database Control
2008-11-23 12:08:36 oracle.sysman.emcp.EMDBPostConfig performConfiguration
警告: 无法创建 Database Control 快捷方式
2008-11-23 12:08:36 oracle.sysman.emcp.EMDBPostConfig performConfiguration
信息: >>>>>>>>>>> Database Control URL 为
http://shleiyanliang:1158/em <<<<<<<<<
<<
已成功完成 Enterprise Manager 的配置
EMCA 结束于 2008-11-23 12:08:36

C:\Documents and Settings\Administrator>emctl status dbconcole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Invalid arguments

Unknown command option status
Usage::
   Oracle Enterprise Manager 10g Database Control commands:
       emctl start| stop| status| setpasswd dbconsole
       emctl secure

       emctl set ssl test|off|on em
       emctl set ldap
emctl blackout options can be listed by typing "emctl blackout"
emctl config options can be listed by typing "emctl config"
emctl secure options can be listed by typing "emctl secure"
emctl ilint  options can be listed by typing "emctl ilint"
emctl deploy  options can be listed by typing "emctl deploy"

C:\Documents and Settings\Administrator>emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://shleiyanliang:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory E:\oracle\product\10.2.0\db_1/shleiyanliang_oracle/sysman/log

C:\Documents and Settings\Administrator>

------------------到此完毕!------------------

最后一句话:

Logs are generated in directory E:\oracle\product\10.2.0\db_1/shleiyanliang_oracle/sysman/log

应该可以理解成database control的日志文件的所在位置吧?呵呵

 

这个完成之后,当时我写的邮箱:leiyanliang@inspur.com马上就收到到邮件了,邮件主题如下:
EM_预警:_严重:_shleiyanliang_-_Filesystem_C:\_has_only_3.35%_available...
邮件内容如下:

shleiyanliang
 类型=Host
 主机=shleiyanliang
 度量=Filesystem Space Available (%)
 Mount Point=C:\
 时间戳=2008-11-23 下午12时23分23秒 CST
 严重性=严重
 消息=Filesystem C:\ has only 3.35% available space
 规则名=Host Availability and Critical States
 规则所有者=SYSMAN

实话说,这一点倒是挺好的,可以实时收到oracle自动监控的警告信息。

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

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

注册时间:2008-07-30

  • 博文量
    498
  • 访问量
    1437816