建立一個EM資料庫
emca -repos create
重建一個EM資料庫
emca -repos recreate
刪除一個EM資料庫
emca -repos drop
設定資料庫的 Database Control
emca -config dbcontrol db
刪除資料庫的 Database Control配置
emca -deconfig dbcontrol db
重新設定db control的連接埠,預設連接埠在1158
emca -reconfig ports
emca -reconfig ports -dbcontrol_http_port 1160
emca -reconfig ports -agent_port 3940
先設定ORACLE_SID環境變數後,啟動EM console服務
emctl start dbconsole
先設定ORACLE_SID環境變數後,停止EM console服務
emctl stop dbconsole
先設定ORACLE_SID環境變數後,查看EM console服務的狀態
emctl status dbconsole
配置dbconsole的步驟
emca -repos create
emca -config dbcontrol db
emctl start dbconsole
重新設定dbconsole的步驟
emca -repos drop
emca -repos create
emca -config dbcontrol db
emctl start dbconsole
,可以通過EM dbconsole訪問資料庫了
原因主要還是更改了主機名稱導致的問題,更改了相應的檔案名稱:D:/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_colin
重新命名為D:/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_RX-01-07_orcl
然後重新設定下dbconsole就Ok了
emca -config dbcontrol db
輸入以下資訊:
資料庫 SID: orcl
已為資料庫 orcl 配置了 Database Control
您已選擇配置 Database Control, 以便管理資料庫 orcl
此操作將移去現有配置和預設設定, 並重新執行配置
是否繼續? [yes(Y)/no(N)]: y
監聽程式連接埠號碼: 1521
SYS 使用者的口令:
DBSNMP 使用者的口令:
SYSMAN 使用者的口令:
SYSMAN 使用者的口令: 通知的電子郵件地址 (可選):
通知的發件 (SMTP) 伺服器 (可選):已指定以下設定
資料庫 ORACLE_HOME ................ D:/oracle/product/10.2.0/db_1
資料庫主機名稱 ................ RX-01-07
監聽程式連接埠號碼 ................ 1521
資料庫 SID ................ ora10g
通知的電子郵件地址 ...............
通知的發件 (SMTP) 伺服器 ...............
-----------------------------------------------------------------
是否繼續? [yes(Y)/no(N)]: y
----------------------------------------------------------------------------------------------------------------
2007-4-6 10:59:17 oracle.sysman.emcp.EMConfig perform
資訊: 正在將此操作記錄到 D:/oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emc
a_2007-04-06_10-57-52-上午.log。
2007-4-6 10:59:20 oracle.sysman.emcp.util.DBControlUtil stopOMS
資訊: 正在停止 Database Control (此操作可能需要一段時間)...
2007-4-6 10:59:32 oracle.sysman.emcp.util.DBControlUtil startOMS
資訊: 正在啟動 Database Control (此操作可能需要一段時間)...
2007-4-6 11:00:12 oracle.sysman.emcp.EMDBPostConfig performConfiguration
資訊: 已成功啟動 Database Control
2007-4-6 11:00:12 oracle.sysman.emcp.EMDBPostConfig performConfiguration
警告: 無法建立 Database Control 捷徑
2007-4-6 11:00:12 oracle.sysman.emcp.EMDBPostConfig performConfiguration
資訊: >>>>>>>>>>> Database Control URL 為 http://RX-01-07:1158/em <<<<<<<<<<<
已成功完成 Enterprise Manager 的配置
EMCA 結束於 2007-4-6 11:00:12
http://RX-01-07:1158/em OK了
select owner,segment_name,bytes from dba_segments where tablespace_name='資料表空間名';