首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式碼之家 >> 數據庫知識 >  >> Oracle 資料庫 >> Oracle 教學

Oracle 11g EM 配置重建:端口衝突、Repository 清理與端口變更完整步驟

     編輯:Oracle 教學

Oracle 11g Database Control (EM) 重建全流程:解決端口衝突與 Repository 殘留

EM 無法登錄、emca -config dbcontrol db 默認端口 1522 衝突、重建報 ORA-20001: SYSMAN already exists。本文提供標準化 4 步重建流程:NetCA 修復監聽 → 刪除舊 DB Control → 刪除 Repository → 重新創建,並說明端口從 1158 變為 5500 的原因。

一、故障現象

  • EM URL https://localhost:1158/em 無法訪問;
  • emca -config dbcontrol db 卡在端口 1522;
  • 嘗試重建報 ORA-20001: SYSMAN already exists。

二、標準化重建 4 步驟

  1. 修復監聽配置:
    Net Configuration Assistant → 監聽程序配置 → 重新配置
    # 核對每步參數:主機名、端口 1521、协议 TCP
  2. 刪除舊 DB Control 配置:
    emca -deconfig dbcontrol db
    # 提示輸入 SYS 密碼、SID、監聽端口,確認刪除
  3. 刪除 Repository (關鍵,否則 SYSMAN 殘留):
    emca -repos drop
    # 必須執行,清理 SYSMAN 用戶及底層對象
  4. 重新創建 EM:
    emca -config dbcontrol db -repos create
    # 全程輸入:SYS 密碼、SID、監聽端口、SYSMA 密碼、表空間、端口號 (如 5500)

三、端口變更說明

  • 舊版 EM Console 默認 1158 (HTTP) / 5500 (HTTPS);
  • 11gR2 後默認推薦 HTTPS 端口 5500,重建後訪問 https://localhost:5500/em;
  • 若需指定端口,重建時在 emca 交互或響應文件中設置 EM_HTTPS_PORT=5500。

四、驗證清單

  1. 開始菜單 → Oracle → Database Control - [SID] 點擊啟動;
  2. 瀏覽器訪問 https://localhost:5500/em 登錄 SYS/SYSMAN;
  3. emctl status dbconsole 顯示運行中;
  4. 檢查 $ORACLE_HOME/[hostname]_[SID]/sysman/log/emoms.log 無錯誤。
注意:12c/19c 已棄用 DB Control,統一使用 EM Cloud Control (独立安裝) 或 EM Express (內建輕量版),本文僅適用 10g/11g 環境。
  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式碼之家 All Rights Reserved