設置環境變量: ORACLE_HOSTNAME=localhostsql
刪掉以前的服務,資料庫,輸入如下命令後按提示操做數據庫
emca -deconfig dbcontrol db -repos drop windows
從新建立資料庫,服務命令以下ide
emca -config dbcontrol db -repos create對象
經過以上兩步就能夠了, 輸入emca以後能夠看到更詳細的參數console
--=====================================--變量
修改DBSNMP密碼:配置
從新配置DBCONSOLE,須要輸入DBSNMP密碼,但任何密碼都會顯示錯誤,須要預先修改。密碼
sql>alter user dbsnmp identified by password;數據
刪除早期DBCONSOLE建立的用戶:
sql>drop role MGMT_USER;
sql>drop user MGMT_VIEW cascade;
sql>drop user sysman cascade;
刪除早期DBCONSOLE建立的對象:
sql>drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
sql>drop public synonym SETEMVIEWUSERCONTEXT;
從新建立DBCONSOLE:(若是是在windows下,要先到註冊表刪除DBCONSOLE的服務,重啓電腦)
$emca -config dbcontrol db -repos create
若是此命令仍是失敗,可直接利用重建命令:
$emca -config dbcontrol db -repos recreate
檢查狀態 emctl status dbconsole。
建立一個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