轉載自: http://www.cnblogs.com/sopost/archive/2010/08/14/2190098.html
用emca配置em
emca是一個命令提示符,使用格式和方法在命令提示符下輸入emca,屏幕上會出現(xiàn)emca使用幫助。
命令幫助如下:
emca [操作] [模式] [數(shù)據(jù)庫類型] [標記] [參數(shù)]
常用以下兩個命令:
emca -config dbcontrol db -repos create 創(chuàng)建em資料庫并同時配制Database Control
emca -deconfig dbcontrol db -repos drop 刪除Database Control并同時刪除em資料庫
[操作] 對應到-config和-deconfig 意思是配制意思。注意"-"不能少
[模式] 對應到dbcontrol,意思是Database Control
[數(shù)據(jù)庫類型] 對應到 db ,意思是數(shù)據(jù)庫,對數(shù)據(jù)庫 (包括使用 ASM 的數(shù)據(jù)庫) 執(zhí)行配置操作
[標記] 這里沒有。
[參數(shù)] 對應到-repos create和-repos drop,意思創(chuàng)建em資料庫和刪除當前em資料庫
如果我們沒有配制過Database Control也沒有em資料庫,我們輸入如下命令
emca -config dbcontrol db -repos create
數(shù)據(jù)庫 SID: orcl
監(jiān)聽程序端口號: 1521
SYS 用戶的口令:
DBSNMP 用戶的口令:
SYSMAN 用戶的口令:
SYSMAN 用戶的口令: 通知的電子郵件地址 (可選):
通知的發(fā)件 (SMTP) 服務器 (可選):
是否繼續(xù)? [yes(Y)/no(N)]: y
如果成功,并同時啟動dbcontrol,出現(xiàn)如下啟動信息:
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://IP:port/em
/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ...OracleDBConsoleorcl
服務正在啟動 ........................
OracleDBConsoleorcl 服務已經(jīng)啟動成功。
打網(wǎng)瀏覽器,輸入 http://IP:port/em/ 就可以看到啟動信息了。
?
如果原來em資料庫已經(jīng)創(chuàng)建好,可以配制Database Control
emca -config dbcontrol db
如果需要刪除Database Control配制,但不刪除em資料庫
emca -deconfig dbcontrol db
如果需要全部刪除,輸入如下命令:(注!dbca是沒有刪除em資料庫和取消Database Control配制)
emca -deconfig dbcontrol db -repos drop
刪除一個EM資料庫,但如果Database Control配制好,已經(jīng)不能使用,而且需要DBConsole服務停止才能使用。
emca -repos drop
創(chuàng)建一個EM資料庫,如果Database Control配制好,但發(fā)現(xiàn)em資料庫不存在,可以用如下命令創(chuàng)建。
emca -repos create
重建一個EM資料庫
emca -repos recreate
如果我們數(shù)據(jù)庫沒有配制過任何信息,就用一條語句就把配制好
emca -config dbcontrol db -repos create
需要全部刪除em資料庫用
emca -deconfig dbcontrol db -repos drop
但我們也可以一步步配制,或在em出問題,我們就需要用到分開命令來處理了。
命令總結:
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 先設置ORACLE_SID環(huán)境變量后,啟動EM console服務
emctl stop dbconsole 先設置ORACLE_SID環(huán)境變量后,停止EM console服務
emctl status dbconsole 先設置ORACLE_SID環(huán)境變量后,查看EM console服務的狀態(tài)
優(yōu)點:能在dbca不能完成em配制場合完成配制,也能刪除em。
缺點:復雜,命令參數(shù)不選擇正確,經(jīng)常會報錯。
由于在命令下面經(jīng)常會發(fā)生錯誤,發(fā)生錯誤要根據(jù)錯誤提示和日志去分析錯誤原因,然后在根據(jù)錯誤原因去解決錯誤的方法,才能把問題解決掉。
注:如果登錄出現(xiàn)亂碼,問題在于安裝時DK/jre 字符集的自動選擇,在$ORALCE_HOME/jdk/jre/lib 目錄下有多種字符集,
????? 選擇一種合適的字符集替換缺省文件
????? cp font.properties.zh_CN.Redhat font.properties
????? 替換后需要清理一下Cache,重啟EM即可。Cache路徑通常位于??????
????? $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs?清除所有的gif即可?????
注:手工配置EM的時候,注意檢查dba_users 中sysman,dbsnmp用戶是否可用
??????? 否則進入EM時,無登錄選項和功能選項
更多文章、技術交流、商務合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯(lián)系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
