有關10g em登陸的問題總結

orchidllh發表於2005-03-22

安裝了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瀏覽器, 選擇'工具"--&gt"Internet選項"--&gt"常規", 選擇 "語言", 預設只有 "中文", 選擇 " 新增 ", 加入
"英語(美國)" , 調整順序, 把“英語(美國)”移動到最上面。

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章