国产日韩欧美一区二区三区三州_亚洲少妇熟女av_久久久久亚洲av国产精品_波多野结衣网站一区二区_亚洲欧美色片在线91_国产亚洲精品精品国产优播av_日本一区二区三区波多野结衣 _久久国产av不卡

?

Oracle中Enterprise Manager的配置和常用命令

2016-02-22 16:29:41李留亮
現(xiàn)代食品 2016年20期
關(guān)鍵詞:檔案庫端口號資料庫

◎ 劉 波,李留亮

(中糧工程科技(鄭州)有限公司,河南 鄭州 450053)

在某糧庫管理信息系統(tǒng)的開發(fā)過程中,Oracle數(shù)據(jù)庫常會因各種情況出現(xiàn)Enterprise Manager配置失敗的問題。本文主要論述該問題的解決辦法和在Enterprise Manager配置過程中常用的命令。

1 Enterprise Manager配置失敗的解決辦法

在本項目中,服務(wù)器的操作系統(tǒng)為Windows 2008 X64 Server SP2標準版,數(shù)據(jù)庫的版本為Oracle 10.2.0.1.0。在對數(shù)據(jù)庫的安裝和管理過程中經(jīng)常會出現(xiàn)以下錯誤信息:

“由于以下錯誤,Enterprise Manager配置失敗

啟動Database Control時出錯

有關(guān)詳細資料,請參閱D:oracleproduct10.2.0db_1cfgtoollogsdbcaoradbemConfig.log中的日志文件

您可以以后通過手動運行D:oracleproduct10.2.0db_1inemca腳本,重新使用Enterprise Manager配置此數(shù)據(jù)庫。”

查詢關(guān)于此問題的解決,并多次給Oracle技術(shù)支持打電話溝通,確定是由于Enterprise Manager Database Control組件和CA證書授權(quán)造成的,當(dāng)安裝此版本的數(shù)據(jù)庫的時間超過CA證書的授權(quán)日期時都會出現(xiàn)該問題,官方的解決方案是打補丁Patch 8350262。具體操作步驟如下。

1.1 檢查創(chuàng)建的數(shù)據(jù)庫是否完全打開

首先要檢查創(chuàng)建的數(shù)據(jù)庫是否完全打開,步驟如下:

(1)執(zhí)行以下命令: sqlplus / as sysdba,會看到如下顯示:

連接到:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

如果能登陸數(shù)據(jù)庫,再執(zhí)行以下命令:startup,會看到下面的顯示:

SQL> startup

ORA-01081: 無法啟動已在運行的 ORACLE - 請首先關(guān)閉它

(2)再執(zhí)行以下命令:select * from dual; 會看到下面的顯示:

SQL> select * from dual;

D

X

此時表示數(shù)據(jù)庫能正常訪問。

1.2 關(guān)閉防火墻

要關(guān)閉電腦上的防火墻,包括Windows防火墻和安裝的其他防火墻。

1.3 停止服務(wù)

然后要停止所有服務(wù),步驟如下:

(1)運行以下命令:emctl stop dbconsole

(2)如果報錯或顯示服務(wù)未運行,在windows任務(wù)管理器中找到進程“java.exe”,選定該進程,并點“結(jié)束進程”按鈕來終止該進程。

按名稱排序,如果有多個java.exe,則全部要終止。

1.4 重建Em repository

重建Em repository的步驟如下:

(1)emca -deconfig dbcontrol db

不管成功還是失敗,都可以。如果是失敗可能表示在之前配置信息已被刪除。

(2)emca -repos drop

會看到以下信息:

EMCA 開始于 2013-5-12 11:49:46

EM Configuration Assistant, 10.2.0.1.0 正式版

版權(quán)所有 (c) 2003, 2005, Oracle。保留所有權(quán)利。

再輸入以下信息:

數(shù)據(jù)庫 SID:(輸入你要創(chuàng)建數(shù)據(jù)庫的SID)

監(jiān)聽程序端口號:(輸入監(jiān)聽程序的端口號1521)

SYS 用戶的口令:(輸入你想創(chuàng)建的SYS用戶的口令)

SYSMAN 用戶的口令:(輸入你想創(chuàng)建的SYSMAN用戶的口令)

是否繼續(xù)? [是(Y)/否(N)]:輸入Y

2013-5-12 11:51:01 oracle.sysman.emcp. EMConfig perform

信息:正在將此操作記錄到 C:appandyzhangcfgtoollogsemcaTJMISemca_2013_05_111_49_43.log。

2013-5-12 11:51:03oracle.sysman.emcp.ParamsManager checkListenerStatusForDBCorol

警告:初始化 SQL 連接時出錯。無法執(zhí)行SQL操作

2013-5-12 11:51:03 oracle.sysman.emcp.EMReposConfig invoke

信息:正在刪除EM資料檔案庫(此操作可能需要一段時間)...

2013-5-12 11:51:22 oracle.sysman.emcp.EMReposConfig invoke

信息:已成功刪除資料檔案庫

已成功完成 Enterprise Manager 的配置

EMCA結(jié)束于2013-5-12 11:51:22

(3)檢查以下2個目錄及文件是否存在,如果存在進行手動刪除,以防止殘留文件:

%ORACLE_HOME%oc4jj2ee下是否有OC4J_DBConsole_localhost_TJMIS目錄

%ORACLE_HOME%下是否有MISServer2_TJMIS目錄

1.5 執(zhí)行emca命令

(1)執(zhí)行以下命令:emca -repos create,會看到以下信息:

EMCA開始于2013-5-12 11:52:15

EM Configuration Assistant, 10.2.0.1.0 正式版

版權(quán)所有(c) 2003, 2005, Oracle。保留所有權(quán)利。

輸入以下信息:

數(shù)據(jù)庫 SID:(輸入你要創(chuàng)建數(shù)據(jù)庫的SID)

監(jiān)聽程序端口號:(輸入監(jiān)聽程序的端口號1521)

SYS 用戶的口令:(輸入你想創(chuàng)建的SYS用戶的口令)

SYSMAN 用戶的口令:(輸入你想創(chuàng)建的SYSMAN用戶的口令)

是否繼續(xù)? [是(Y)/否(N)]:輸入Y

2013-5-12 11:52:29 oracle.sysman.emcp.EMConfig perform

信息: 正在將此操作記錄到C:appandyzhangcfgtoollogsemcaTJMISemca_2013_05_12_11_52_14.log。

2013-5-12 11:52:30 oracle.sysman.emcp.EMReposConfig createRepository

信息:正在創(chuàng)建 EM 資料檔案庫(此操作可能需要一段時間)...

2013-5-12 12:02:15 oracle.sysman.emcp.EMReposConfig invoke

信息:已成功創(chuàng)建資料檔案庫

已成功完成Enterprise Manager的配置

EMCA 結(jié)束于 2013-5-12 12:02:16

(2)執(zhí)行以下命令:emca -config dbcontrol db

這步很關(guān)鍵,因此命令一定要執(zhí)行成功,并且會看到以下信息:

EMCA開始于2013-5-12 12:02:49

EM Configuration Assistant, 10.2.0.1.0正式版

版權(quán)所有(c)2003, 2005, Oracle。保留所有權(quán)利。

輸入以下信息:

數(shù)據(jù)庫SID:(輸入你要創(chuàng)建數(shù)據(jù)庫的SID)

監(jiān)聽程序端口號:(輸入監(jiān)聽程序的端口號1521)

SYS 用戶的口令:(輸入你想創(chuàng)建的SYS用戶的口令)

DBSNMP 用戶的口令:(輸入你想創(chuàng)建的DBSNMP用戶的口令)

SYSMAN 用戶的口令:(輸入你想創(chuàng)建的SYSMAN用戶的口令)

通知的電子郵件地址(可選):

通知的發(fā)件(SMTP)服務(wù)器(可選):

已指定以下設(shè)置

數(shù)據(jù)庫ORACLE_HOME ................ D:oracleproduct10.2.0db_1

本地主機名 ................ localhost

監(jiān)聽程序 ORACLE_HOME ................ D:oracleproduct10.2.0db_1

監(jiān)聽程序端口號 ................ 1521

數(shù)據(jù)庫 SID ................ TJMIS

通知的電子郵件地址 ...............

通知的發(fā)件 (SMTP) 服務(wù)器 ...............

是否繼續(xù)? [是(Y)/否(N)]:輸入Y

2013-5-12 12:03:12 oracle.sysman.emcp.EMConfig perform

信息:正在將此操作記錄到D:oracleproduct10.2.0db_1cfgtoollogsemcaTJMISemca_2013_05_12_02_48.log。

2013-5-12 12:03:28 oracle.sysman.emcp.EMRepos Config uploadConfigDataToRepository

信息:正在將配置數(shù)據(jù)上載到 EM 資料檔案庫 (此操作可能需要一段時間)...

2013-5-12 12:04:57 oracle.sysman.emcp.EMReposConfig invoke

信息:已成功上載配置數(shù)據(jù)

2013-5-12 12:05:20 oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib

信息:軟件庫已配置成功。

2013-5-12 12:05:20 oracle.sysman.emcp.EMDBPost Config configureSoftwareLibrary

信息:正在部署預(yù)配檔案...

2013-5-12 12:07:20 oracle.sysman.emcp.EMDBPost Config configureSoftwareLibrary

信息:預(yù)配檔案部署成功。

2013-5-12 12:07:20 oracle.sysman.emcp.util.DBControlUtil secureDBConsole

信息:正在保護 Database Control (此操作可能需要一段時間)...

2013-5-12 12:07:44 oracle.sysman.emcp.util.DBControlUtil secureDBConsole

信息:已成功保護 Database Control。

2013-5-12 12:07:44 oracle.sysman.emcp.util.DBControlUtil startOMS

信息:正在啟動 Database Control (此操作可能需要一段時間)...

2013-5-12 12:12:03 oracle.sysman.emcp.EMDBPost Config performConfiguration

信息:已成功啟動 Database Control

2013-5-12 12:12:07 oracle.sysman.emcp.EMDBPost Config performConfiguration

信息 ! : >>>>>>> Database Control URL 為 https://localhost:1158/em <<<<<<<<

2013-5-12 12:12:30 oracle.sysman.emcp.EMDBPost Config invoke

警告:

************************ WARNING************************

管理資料檔案庫已置于安全模式下, 在此模式下將對 Enterprise Manager 數(shù)據(jù)進行加密。

加密密鑰已放置在文件D:oracleproduct10.2.0db_1localhost_TJMIS/sysman/config/emkey.ora 中。請務(wù)必備份此文件,因為如果此文件丟失,則加密數(shù)據(jù)將不可用。

***********************************************************

已成功完成Enterprise Manager的配置

EMCA結(jié)束于2013-5-12 12:12:30

1.6 檢查是否安裝成功

檢查是否安裝成功,查看%ORACLE_HOME%oc4jj2ee下是否有OC4J_DBConsole_localhost_TJMIS目錄,執(zhí)行以下命令:

cd %ORACLE_HOME%oc4jj2ee

dir OC4J_DBConsole_localhost_TJMIS

應(yīng)該看到以下信息:

驅(qū)動器C中的卷是System

卷的序列號是3C9A-7D79

D:oracleproduct10.2.0db_1oc4jj2eeOC4J_DBConsole_localhost_ TJMIS 的目錄

2013-05-12 12:05

.

2013-05-12 12:05

..

2013-05-12 12:05

applib

2013-05-12 12:08

applicationdeployments

2013-05-12 12:07

config

2013-05-12 12:04

connectors

2013-05-12 12:08

log

2013-05-12 12:05

META-INF

2013-05-12 12:08

persistence

2013-05-12 12:08

tldcache

0個文件 0字節(jié)

10個目錄167,630,336,000可用字節(jié)

1.7 安裝Patch

(1)把您的補丁解壓到%ORACLE_HOME%OPatch8350262目錄下

(2)進入到%ORACLE_HOME%OPatch8350262目錄

cd %ORACLE_HOME%OPatch8350262

執(zhí)行dir命令,大概會看到以下信息:

C:appandyzhangproduct11.2.0dbhome_1OPatch8350262>dir

驅(qū)動器C中的卷是System

卷的序列號是3C9A-7D79

D:oracleproduct10.2.0db_1OPatch8350262的目錄

2013-05-12&! nbsp; 12:06

.

2013-05-12 12:06

..

2013-05-12 12:06

etc

2013-05-12 12:06

files

2010-10-07 02:46 1,069 killDBConsole

2010-10-07 02:46 4,640 killDBConsole.pl

2010-10-05 07:57 3,278 README.txt

3個文件 8,987字節(jié)

4個目錄 167,824,171,008 可用字節(jié)

(3)先卸載您之前打過的補丁

%ORACLE_HOME%OPatchopatch rollback -id 8350262

(4)再重新安裝一遍

結(jié)束java.exe進程,并執(zhí)行命令:emctl stop dbconsole

然后運行:%ORACLE_HOME%OPatchopatch apply

會看到一些提示,提示安裝成功,請確認,如果有錯誤或警告,請屏幕拷貝或抓圖。

1.8 重置證書

執(zhí)行以下命令:emctl secure dbconsole –reset

會看到以下顯示:

Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0

Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.

https://myhost:5501/em/console/aboutApplication

Enter Enterprise Manager Root Password :

DBCONSOLE already stopped... Done.

Agent is already stopped... Done.

Securing dbconsole... Started.

Checking Repository... Done.

Checking Em Key... Done.

Checking Repository for an existing Enterprise Manager Root Key...

WARNING! An Enterprise Manager Root Key already exists in the Repository. This operation will replace your Enterprise Manager Root Key.

All existing Agents that use HTTPS will need to be reconfigured if you proceed. Do you wish to continue and overwrite your Root Key

(Y/N) ? 輸入Y

Are you sure ? Reset of the Enterprise Manager Root Key will mean that you will need to reconfigure each Agent that is associated with this OMS before they will be able to upload any data to it. Monitoring of Targets associated with these Agents wi! ll be unavailable until after they are reconfigured.

(Y/N) ? 輸入Y

Generating Enterprise Manager Root Key (this takes a minute)... Done.Fetching Root Certificate fromthe Repository... Done.

Updating HTTPS port in emoms. properties file...Done.

Generating Java Keystore... Done.

Securing OMS ... Done.

Generating Oracle Wallet Password for Agent.... Done.

Generating wallet for Agent ... Done.

Copying the wallet for agent use... Done.

Storing agent key in repository... Done.

Storing agent key for agent ... Done.

Configuring Agent...

Configuring Agent for HTTPS in DBCONSOLE mode...Done.

EMD_URL set in /myhost/myhost/sysman/config/emd.properties

Done.

Configuring Key store.. Done.

Securing dbconsole... Sucessful.

或是:

D:oracleproduct10.2.0db_1oc4jj2ee>emctl secure dbconsole -reset

Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0

Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.

https://localhost:1158/em/console/aboutApplication

Please enter repository password:

********

DBCONSOLE successfully stopped... Done.Agent is already stopped... Done.Securing dbconsole... Started.

Please enter repository schema password:Securing dbconsole... Sucessful.

DBCONSOLE successfully restarted... Done.

1.9 啟動Database Control服務(wù)

執(zhí)行以下命令,啟動Database Control服務(wù):emctl start dbconsole

會看到以下顯示:

D:oracleproduct10.2.0db_1oc4jj2ee>emctl start dbconsole

Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0

Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.

https://localhost:1158/em/console/aboutApplication

Starting Oracle Enterprise Manager 11g Database Control ...OracleDBConsoleorcl

服務(wù)正在啟動..................

OracleDBConsoleorcl 服務(wù)已經(jīng)啟動成功。

1.10 確認是否成功

重新確認em頁面是否可以訪問:

https://localhost:1158/em/ 或者http://localhost:1158/em/

這時可以發(fā)現(xiàn)Enterprise Manager已經(jīng)配置成功,可進入OEM。

2 Enterprise Manager配置中常用的命令

通過解決Enterprise Manager配置失敗的問題,可以總結(jié)出在Enterprise Manager配置時常用的命令,如下:

emca -config dbcontrol db -repos create 創(chuàng)建em資料庫,并配制Database Control

emca -deconfig dbcontrol db -repos drop 取消配置Database Control,并刪除em資料庫

emca -repos create 創(chuàng)建一個EM資料庫

emca -repos recreate 重建一個EM資料庫

emca -repos drop 刪除一個EM資料庫

emca -config dbcontrol db 配置數(shù)據(jù)庫的 Database Control

emca -deconfig dbcontrol db 刪除數(shù)據(jù)庫的 Database Control配置

emctl start dbconsole 先設(shè)置ORACLE_SID環(huán)境變量后,啟動EM console服務(wù)

emctl stop dbconsole 先設(shè)置ORACLE_SID環(huán)境變量后,停止EM console服務(wù)

emctl status dbconsole 先設(shè)置ORACLE_SID環(huán)境變量后,查看EM console服務(wù)的狀態(tài)

3 結(jié)語

以上方法雖然操作較復(fù)雜,但最終可解決該問題。在用該方法配置時,輸入的命令參數(shù)不正確時常會報錯,且發(fā)生錯誤時要根據(jù)錯誤提示和日志分析錯誤原因,再根據(jù)錯誤原因解決錯誤,才能徹底解決問題。

參考文獻:

[1]路 川,胡欣杰.Oracle 10g寶典[M].北京:電子工業(yè)出版社,2010.

猜你喜歡
檔案庫端口號資料庫
基于內(nèi)容與協(xié)同過濾的GitHub學(xué)習(xí)資料庫推薦
國家社科基金重大項目“‘古今字’資料庫建設(shè)與相關(guān)專題研究”成果鑒定會順利召開
施工企業(yè)技術(shù)資料庫的建立與完善
天津科技(2020年5期)2020-01-08 12:27:35
在Docker容器中安裝應(yīng)用程序
電影膠片檔案庫的消防自動滅火系統(tǒng)
新形勢下加強黨務(wù)檔案管理工作探討
卷宗(2019年11期)2019-04-20 13:32:16
淺談以java為基礎(chǔ)的Socket通信簡介及實現(xiàn)
青春歲月(2017年5期)2017-04-20 18:34:23
福州某檔案庫恒溫恒濕空調(diào)設(shè)計
Winsock編程在《計算機網(wǎng)絡(luò)基礎(chǔ)》教學(xué)中的應(yīng)用
基于Android系統(tǒng)的互動展示APP的研究與設(shè)計
日土县| 天等县| 大足县| 乌审旗| 广汉市| 平利县| 梁河县| 白银市| 杭锦旗| 浦北县| 绥中县| 通许县| 当雄县| 石林| 富阳市| 饶河县| 钟山县| 达州市| 米泉市| 宣化县| 辽宁省| 双城市| 乌拉特后旗| 洛川县| 饶平县| 峡江县| 长岭县| 江永县| 榆树市| 英德市| 库车县| 开封县| 武冈市| 峨山| 乡宁县| 夏津县| 建宁县| 屯昌县| 赫章县| 苗栗县| 安新县|