想啟動(dòng)Oracle的OEM服務(wù),運(yùn)行emctl start dbconsole,結(jié)果出現(xiàn)如下報(bào)錯(cuò)信息:
/u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_wjq.comsys.com_OraDB11g
not found。要想打開(kāi)OEM的web管理程序,必須先啟動(dòng)Database listener,再啟動(dòng)Datebase Control端口監(jiān)控程序,但是碰到下面的問(wèn)題:

米林網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)!從網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站建設(shè)、微信開(kāi)發(fā)、APP開(kāi)發(fā)、成都響應(yīng)式網(wǎng)站建設(shè)公司等網(wǎng)站項(xiàng)目制作,到程序開(kāi)發(fā),運(yùn)營(yíng)維護(hù)。創(chuàng)新互聯(lián)于2013年創(chuàng)立到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來(lái)保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)。
[oracle@wjq ~]$ emctl start dbconsole
OC4J Configuration issue. /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_wjq.comsys.com_OraDB11g not found.
其實(shí)產(chǎn)生的這樣的情況,可能是em資料庫(kù)配置不正確或者是dbcotrol沒(méi)有配置好。
解決方法:
①重建em資料
[oracle@wjq ~]$ emca -repos recreate
STARTED EMCA at Nov 3, 2017 4:35:17 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.
Enter the following information:
Database SID: seiang11g
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Nov 3, 2017 4:35:34 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/OraDB11g/emca_2017_11_03_16_35_16.log.
Nov 3, 2017 4:35:34 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Nov 3, 2017 4:36:47 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Nov 3, 2017 4:36:47 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Nov 3, 2017 4:40:32 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Nov 3, 2017 4:40:32 PM
②配置dbcontrol
[oracle@wjq ~]$ emca -config dbcontrol db
STARTED EMCA at Nov 3, 2017 2:29:41 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.
Enter the following information:
Database SID: seiang11g
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1
Local hostname ................ wjq.comsys.com
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1
Listener port number ................ 1521
Database SID ................ seiang11g
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y^H
Nov 3, 2017 2:30:36 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/OraDB11g/emca_2017_11_03_14_29_40.log.
Nov 3, 2017 2:30:39 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Nov 3, 2017 2:32:36 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Nov 3, 2017 2:32:38 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Nov 3, 2017 2:32:53 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -host wjq.comsys.com -sid OraDB11g
Nov 3, 2017 2:32:53 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
WARNING: Error securing Database control.
Nov 3, 2017 2:32:53 PM oracle.sysman.emcp.EMDBPostConfig setWarnMsg
INFO: Error securing Database Control. Database Control has been brought-up in non-secure mode. To secure the Database Control execute the following command(s):
1) Set the environment variable ORACLE_UNQNAME to Database unique name
2) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl stop dbconsole
3) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
4) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
5) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole
To secure Em Key, run /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >
Nov 3, 2017 2:32:53 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Nov 3, 2017 2:32:58 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Nov 3, 2017 2:32:58 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://wjq.comsys.com:5500/em <<<<<<<<<<<
Error securing Database Control. Database Control has been brought-up in non-secure mode. To secure the Database Control execute the following command(s):
1) Set the environment variable ORACLE_UNQNAME to Database unique name
2) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl stop dbconsole
3) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
4) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
5) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole
To secure Em Key, run /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >
然后直接進(jìn)入http://wjq.comsys.com:5500/em/,輸入賬戶sys和密碼******,選擇sysdba權(quán)限,就能正常看到基于WEB的EM了。
Oracle11G的EM采用了web方式,并且分成了2個(gè)產(chǎn)品,database control和grid control。Grid control需要下載單獨(dú)的光盤安裝。在用DBCA建庫(kù)的時(shí)候,可以選擇是否啟用dbcontrol,啟用的話需要在數(shù)據(jù)庫(kù)中建立一個(gè)sysman的 schema,用于保存EM的一些數(shù)據(jù),這個(gè)就是EM的資料庫(kù)(repository)。使用命令行工具emca可以創(chuàng)建,修改,重建或者刪除 dbcontrol的配置。
emca
-repos create: 創(chuàng)建新的 Database Control資料檔案庫(kù)
emca -repos drop:刪除當(dāng)前的 Database Control資料檔案庫(kù)
emca -repos recreate:刪除當(dāng)前的 Database Control資料檔案庫(kù)并重新創(chuàng)建一個(gè)
emca -config dbcontrol db:配置數(shù)據(jù)庫(kù)的 Database Control
emca -deconfig dbcontrol db:取消數(shù)據(jù)庫(kù)的 Database Control
特別注意:
(1)如果服務(wù)器上存在多個(gè)數(shù)據(jù)庫(kù),必須在啟動(dòng)Database control之前設(shè)置ORACLE_SID環(huán)境變量
(2)最好使用靜態(tài)IP地址來(lái)配置服務(wù)器
常用的命令語(yǔ)法:
emca -repos create創(chuàng)建一個(gè)EM資料庫(kù)
emca -repos recreate重建一個(gè)EM資料庫(kù)
emca -repos drop刪除一個(gè)EM資料庫(kù)
emca -config dbcontrol db配置數(shù)據(jù)庫(kù)的 Database Control
emca -deconfig dbcontrol db刪除數(shù)據(jù)庫(kù)的 Database Control配置
emca -reconfig ports 重新配置db control和agent的端口
emctl start console啟動(dòng)EM console服務(wù),使用前需要先設(shè)置ORACLE_SID環(huán)境變量
emctl stop console停止EM console服務(wù),使用前需要先設(shè)置ORACLE_SID環(huán)境變量
注:通過(guò)查看$ORACLE_HOME/install/portlist.ini文件可以知道當(dāng)前dbcontrol正在使用的端口,默認(rèn)dbcontrol http端口1158,agent端口3938。如果要重新配置端口,可以使用如下命令:
emca -reconfig ports -dbcontrol_http_port 1159
emca -reconfig ports -agent_port 3939
使用命令行工具emctl可以啟動(dòng)/停止console服務(wù),察看服務(wù)狀態(tài)等。
作者:SEian.G(苦練七十二變,笑對(duì)八十一難)
分享題目:emctlstartdbconsole遇到錯(cuò)誤:OC4J_DBConsole_XXX_XXXnotfound.
鏈接URL:http://chinadenli.net/article26/gghdjg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信小程序、建站公司、云服務(wù)器、網(wǎng)頁(yè)設(shè)計(jì)公司、網(wǎng)站建設(shè)、網(wǎng)站收錄
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)