安装了10g数据库后,有个个数据库一直都不能从web访问,虽然应用也一直在用,没有什么问题,但是今天决定还是不能这样放任问题不解决。
是控制台没有启动,不知道为什么不是自动启动的,可能跟我建库的时候的选项有关,但是已经没有印象当时是怎么选的了。
这是网上有人提到:
安装10G数据库时如果选择使用db control 来管理数据库,安装完毕后输入 http://hostname: port/em(端口缺省是5500,可以修改) 就可以启动 db console,也就是你看到的web界面的管理工具;
[oracle@bj oracle]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.1.0.3.0
Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.
http://bj:5500/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control .............................. started.
------------------------------------------------------------------
Logs are generated in directory /home/oracle/product/10.1.0/db_1/bj_newadm/sysman/log
netstat -a
多了这两个端口:
tcp 0 0 *:5500 *:* LISTEN
tcp 0 0 *:5520 *:* LISTEN
ps -ef
多了这几个进程:
oracle 7673 1 0 10:31 pts/0 00:00:00 /home/oracle/product/10.1.0/db_1/perl/bin/perl /home/oracle/product/10.1.0/db_1/bin/
oracle 7683 7673 6 10:31 pts/0 00:00:37 /home/oracle/product/10.1.0/db_1/jdk/bin/java -server -Xmx512M -XX:MaxPermSize=64m -
oracle 8777 7673 0 10:32 pts/0 00:00:01 /home/oracle/product/10.1.0/db_1/bin/emagent
如果需要停止控制台进程:
[oracle@bj oracle]$ emctl stop dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.1.0.3.0
Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.
http://bj:5500/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.
启动以后,就可以用IE访问了,有关IE访问时出现乱码的解决方法:
打开你的IE浏览器, 选择'工具"-->"Internet选项"-->"常规", 选择 "语言", 默认只有 "中文", 选择 " 添加 ", 加入
"英语(美国)" , 调整顺序, 把“英语(美国)”移动到最上面。
OK ,确定。重新刷新一下就没有乱码了。
但是登陆后提示:
Database: *
The database status is currently unavailable. It is possible that the database is in mount or nomount state. Click 'Startup' to obtain the current status and open the database. If the database cannot be opened, click 'Perform Recovery' to perform an appropriate recovery operation.
/home/oracle/product/10.1.0/db_1/HOSTNAME_SID/sysman/log
[oracle@bj log]$ tail emoms.log
2005-03-16 11:20:24,421 [HttpRequestHandler-24223536] ERROR conn.ConnectionService verifyRepositoryEx.418 - Invalid Connection Pool. ERROR = ORA-28000: the account is locked
2005-03-16 11:20:24,454 [HttpRequestHandler-4948690] ERROR conn.ConnectionService verifyRepositoryEx.418 - Invalid Connection Pool. ERROR = ORA-28000: the account is locked
2005-03-16 11:20:28,637 [HttpRequestHandler-22669032] ERROR conn.ConnectionService verifyRepositoryEx.418 - Invalid Connection Pool. ERROR = ORA-28000: the account is locked
2005-03-16 11:20:28,670 [HttpRequestHandler-22669032] ERROR eml.OMSHandshake getParameterFromDB.402 - ORA-28000: the account is locked
2005-03-16 11:20:28,671 [HttpRequestHandler-22669032] ERROR eml.OMSHandshake processFailure.619 - OMSHandshake failed.(AGENT URL = http://bj:1830/emd/main)(ERROR = INTERNAL_ERROR)
[oracle@bj log]$ tail emoms.trc
2005-03-16 11:21:15,025 [HttpRequestHandler-22669032] ERROR conn.ConnectionService verifyRepositoryEx.418 - Invalid Connection Pool. ERROR = ORA-28000: the account is locked
2005-03-16 11:21:15,077 [HttpRequestHandler-22669032] ERROR eml.OMSHandshake getParameterFromDB.402 - ORA-28000: the account is locked
2005-03-16 11:21:15,078 [HttpRequestHandler-22669032] ERROR eml.OMSHandshake processFailure.619 - OMSHandshake failed.(AGENT URL = http://bj:1830/emd/main)(ERROR = INTERNAL_ERROR)
2005-03-16 11:21:16,782 [HttpRequestHandler-24223536] ERROR conn.ConnectionService verifyRepositoryEx.418 - Invalid Connection Pool. ERROR = ORA-28000: the account is locked
2005-03-16 11:21:16,826 [HttpRequestHandler-24223536] ERROR eml.OMSHandshake getParameterFromDB.402 - ORA-28000: the account is locked
2005-03-16 11:21:16,827 [HttpRequestHandler-24223536] ERROR eml.OMSHandshake processFailure.619 - OMSHandshake failed.(AGENT URL = http://bj:1830/emd/main)(ERROR = INTERNAL_ERROR)
[oracle@bj log]$ tail emagent.log
2004-11-03 11:09:45 Thread-3076432000 Starting Agent 10.1.0.2.0 from /home/oracle/product/10.1.0/db_1 (00701)
2004-11-03 11:09:46 Thread-3076432000 EMAgent started successfully (00702)
2005-03-16 10:32:36 Thread-3076423808 Starting Agent 10.1.0.3.0 from /home/oracle/product/10.1.0/db_1 (00701)
2005-03-16 10:32:38 Thread-3076423808 EMAgent started successfully (00702)
2005-03-16 10:43:23 Thread-3076423808 EMAgent normal shutdown (00703)
2005-03-16 10:48:12 Thread-3076427904 Starting Agent 10.1.0.3.0 from /home/oracle/product/10.1.0/db_1 (00701)
2005-03-16 10:48:12 Thread-3076427904 EMAgent started successfully (00702)
2005-03-16 11:18:34 Thread-3076427904 EMAgent normal shutdown (00703)
2005-03-16 11:20:14 Thread-3076427904 Starting Agent 10.1.0.3.0 from /home/oracle/product/10.1.0/db_1 (00701)
2005-03-16 11:20:14 Thread-3076427904 EMAgent started successfully (00702)
[oracle@bj log]$ tail emdctl.trc
2005-03-16 11:19:45 Thread-3076411520 WARN http: snmehl_connect: connect failed to (bj:1830): Connection refused (error = 111)
2005-03-16 11:19:48 Thread-3076427904 WARN http: snmehl_connect: connect failed to (bj:1830): Connection refused (error = 111)
2005-03-16 11:19:51 Thread-3076419712 WARN http: snmehl_connect: connect failed to (bj:1830): Connection refused (error = 111)
2005-03-16 11:19:54 Thread-3076419712 WARN http: snmehl_connect: connect failed to (bj:1830): Connection refused (error = 111)
2005-03-16 11:19:57 Thread-3076423808 WARN http: snmehl_connect: connect failed to (bj:1830): Connection refused (error = 111)
2005-03-16 11:20:00 Thread-3076423808 WARN http: snmehl_connect: connect failed to (bj:1830): Connection refused (error = 111)
2005-03-16 11:20:03 Thread-3076411520 WARN http: snmehl_connect: connect failed to (bj:1830): Connection refused (error = 111)
2005-03-16 11:20:06 Thread-3076411520 WARN http: snmehl_connect: connect failed to (bj:1830): Connection refused (error = 111)
2005-03-16 11:20:09 Thread-3076427904 WARN http: snmehl_connect: connect failed to (bj:1830): Connection refused (error = 111)
2005-03-16 11:20:11 Thread-3076411520 WARN http: snmehl_connect: connect failed to (bj:1830): Connection refused (error = 111)
已开始我企图登陆的时候提示IO exception :网络适配器没有建立连接
发现sysman帐号是锁定的,将该帐号解锁后,登陆成功。
但是仍然提示数据库没有启动,打算在中午应用不用的时候试着用startup按钮看看效果。
中午的时候试着点了startup按钮,提示录入操作系统用户口令和数据库用户口令以后,提示数据库已经open了,问是不是要shutdown immediate,晕倒。
按照metalink的提示,在listener.ora中增加以下部分,需要等到下班以后重启监听试试。
(SID_DESC =
(SID_NAME = newadm)
(ORACLE_HOME = /home/oracle/product/10.1.0/db_1)
(GLOBAL_DBNAME=newadm)
)
很多天都忘记重新启动监听,这个事情就被搁置了好几天,今天早上终于想起来了,重启了一下,发现不是监听的问题,按照界面上的提示重新启动数据库,仍然不能进入em的界面,提示帐号锁定。继续一筹莫展。
在metalink上看到有人提到应该执行 emca -r,察看oracle的文档:
-r When you use this option, EMCA configures the database so it uses the Database Control, but it does not create the Management Repository.
Use this option when the Management Repository has been created, but the Database Control has not been configured.
也就是当资料库已经存在的时候,用该参数不重新创建资料库,而只是重新配置database control。
执行emca -r,检查日志:
tail /home/oracle/product/10.1.0/db_1/cfgtoollogs/emca.log.0
。。。。。。
Mar 22, 2005 2:48:39 PM oracle.sysman.emcp.EMConfig unlockAccounts
CONFIG: Unlocking dbsnmp and sysman
Mar 22, 2005 2:48:39 PM oracle.sysman.emcp.EMConfig unlockAccounts
CONFIG: ORA-00988: missing or invalid password(s)
oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-00988: missing or invalid password(s)
at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1408)
at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeSql(SQLEngine.java:1649)
at oracle.sysman.emcp.EMConfig.unlockAccounts(EMConfig.java:1232)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:361)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:691)
at oracle.sysman.emcp.EMConfigAssistant.performSetup(EMConfigAssistant.java:640)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:339)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:179)
Mar 22, 2005 2:48:39 PM oracle.sysman.emcp.EMConfig unlockAccounts
CONFIG: Unlocked mgmt_view account
Mar 22, 2005 2:48:39 PM oracle.sysman.emcp.EMConfig perform
CONFIG: Failed to unlock all related EM accounts
前面没有什么错误,到了解锁帐号的时候,提示00988错误。
记得今天上午看到metalink上有人说这两个的口令不能是!,应该是数字或字母,于是修改dbsnmp和sysman口令成数字,但仍然是这样,再修改成字母的,这次就成功了:
[oracle@bj oracle]$ emca -r
STARTED EMCA at Tue Mar 22 15:11:02 CST 2005
Enter the following information about the database to be configured
Listener port number: 1521
Database SID: *
Service name: *
Email address for notification:
Email gateway for notification:
Password for dbsnmp:
Password for sysman:
Password for sys:
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /home/oracle/product/10.1.0/db_1
Enterprise Manager ORACLE_HOME ................ /home/oracle/product/10.1.0/db_1
Database host name ................ *
Listener port number ................ 1521
Database SID ................ *
Service name ................ *
Email address for notification ...............
Email gateway for notification ...............
-----------------------------------------------------------------
Do you wish to continue? [yes/no]: yes
DBConsole is already configured for the database newadm
Would you like to re-configure DBConsole for the specified database? [yes/no]: yes
Make sure that DBConsole has been shutdown
When you are ready to continue, press
Mar 22, 2005 3:13:04 PM oracle.sysman.emcp.EMConfig updateReposVars
INFO: Updating file /home/oracle/product/10.1.0/db_1/sysman/emdrep/config/repository.variables ...
Mar 22, 2005 3:13:05 PM oracle.sysman.emcp.EMConfig stopOMS
INFO: Stopping the DBConsole ...
Mar 22, 2005 3:13:07 PM oracle.sysman.emcp.EMConfig addPortEntries
INFO: Updating file /home/oracle/product/10.1.0/db_1/install/portlist.ini ...
Mar 22, 2005 3:13:07 PM oracle.sysman.emcp.EMConfig updateEmdProps
INFO: Updating file /home/oracle/product/10.1.0/db_1/sysman/config/emd.properties ...
Mar 22, 2005 3:13:14 PM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: targets.xml file is updated successfully
Mar 22, 2005 3:13:14 PM oracle.sysman.emcp.EMConfig updateEmomsProps
INFO: Updating file /home/oracle/product/10.1.0/db_1/sysman/config/emoms.properties ...
Mar 22, 2005 3:13:14 PM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: emoms.properties file is updated successfully
Mar 22, 2005 3:13:15 PM oracle.sysman.emcp.EMConfig startOMS
INFO: Starting the DBConsole ...
Mar 22, 2005 3:14:49 PM oracle.sysman.emcp.EMConfig perform
INFO: DBConsole is started successfully
Mar 22, 2005 3:14:49 PM oracle.sysman.emcp.EMConfig perform
INFO: >>>>>>>>>>> The Enterprise Manager URL is http://*:5501/em <<<<<<<<<<<
Enterprise Manager configuration is completed successfully
FINISHED EMCA at Tue Mar 22 15:14:49 CST 2005
嘿嘿,连接oem没有再报错,不过它修改了端口成5501了。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/51862/viewspace-180616/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/51862/viewspace-180616/