二、今天机器死机了,然后OracleDBConsoleORCL服务就起不来了,在一阵瞎搞后,还终于被我找到了解决办法,方法如下:
运行Database Configuration Assistant程序,选择“配置数据库选项”重新配置Database Control 配置工具,配置完后端口号会变(我原来是1158,后来被改为5500),可以在.\oracle\product\10.2.0\db_1\cfgtoollogs\emca\orcl\文件夹下,最后生成的一个日志文件下找到新的Database Control 的URL;运行即可。
********************************************************************************************************
(原来经常改IP会导致OracleDBConsoleORCL无法启动,)一下是正规的解决方案:
修改你的主机参数文件
修改一下:
C:\WINDOWS\system32\drivers\etc下的host文件.
如果没有的话就自己加一个IP和你的计算机名对应,如果已有了就把你的IP地址和你的计算机名对应起来.
如:
# copyright (c) 1993-1999 microsoft corp.
#
# this is a sample hosts file used by microsoft tcp/ip for windows.
#
# this file contains the mappings of ip addresses to host names. each
# entry should be kept on an individual line. the ip address should
# be placed in the first column followed by the corresponding host name.
# the ip address and the host name should be separated by at least one
# space.
#
# additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# for example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
192.168.1.104 wang-decjedi4h9
三、手工从cmd命令行启动:C:\Documents and Settings\wangnc>emctl start dbconsole
Environment variable ORACLE_SID not defined. Please define it.
设置Oracle_sid环境变量:
C:\Documents and Settings\wangnc>set oracle_sid=orcl
C:\Documents and Settings\wangnc>emctl start dbconsole
OC4J Configuration issue. C:\oracle\product\10.2.0\db_1/oc4j/j2ee/OC4J_DBConsole_WWW-D79AC60CC61_orcl_orcl not found.
还是不行,到目录 C:\oracle\product\10.2.0\db_1\oc4j\j2ee 下发现只有OC4J_DBConsole_localhost_orcl目录,并没有OC4J_DBConsole_sz-wangncD.cn.linecom.com_orcl这样的目录
复制目录改成系统提示的文件夹名,再运行emctl start dbconsole
又会报一个类似的错误提示,另一个目录,同样处理。重启后服务终于可以正常启动了。
访问 http://127.0.0.1:1158/em/ ok!
四
OracleDBConsoleorcl 服务无法启动
C:>set oracle_sid=orcl
C:>emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://JX02:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ...OracleDBConsoleorcl
服务正在启动 .
OracleDBConsoleorcl 服务无法启动。
系统出错。
系统发生 3 错误。
系统找不到指定的路径。
////以上是启动时的错误 ,我的数据库是oracle10.2.0.1.0 的版本
解决方法:
在命令行输入
$ emca –config dbcontrol db
输入以下信息:
SID:XXXX
Listener port number: 1521
Sys 口令:******
……
好了,再次emctl start dbconsole EM就可以正常运行了!