1. 程式人生 > >Windows不能在本地計算機啟動OracleDBConsoleorcl.錯誤程式碼2的解決方法

Windows不能在本地計算機啟動OracleDBConsoleorcl.錯誤程式碼2的解決方法

    現象:

  Windows 不能在 本地計算機 啟動 OracleDBConsoleorcl。有關更多資訊,查閱系統事件日誌。如果這是非 Microsoft 服務,請與服務廠商聯絡,並參考特定服務錯誤程式碼 2。

      系統事件日誌 報錯誤"Agent process exited abnormally during initialization."

出現情況:原來正常,計算機名更改或IP地址變了後就不能啟動,

解決步驟如下:

  1、開始-》執行cmd

  2、執行 emctl start dbconsole

  C:\Documents and Settings\xcl>emctl start dbconsole

  Environment variable ORACLE_SID not defined. Please define it.

  提示:環境變數 ORACLE_SID 未定義,請定義。

  3、設定 ORACLE_SID =ORCL (orcl是我的例項名,也是服務名)

  C:\Documents and Settings\xcl>set oracle_sid=orcl

  4、再次執行emctl start dbconsole

  C:\Documents and Settings\xcl>emctl start dbconsole

  OC4J Configuration issue. E:\oracle\product\10.2.0\db_1/oc4j/j2ee/OC4J_DBConsole_china-d9e3f7d07_orcl not found.

  提示:無法找到“E:\oracle\product\10.2.0\db_1/oc4j/j2ee/OC4J_DBConsole_china-d9e3f7d07_orcl “

  注:china-d9e3f7d07 是我的計算機名

  複製該目錄下的“OC4J_DBConsole_localhost_orcl”資料夾放在同一目錄下,且把名稱改成“OC4J_DBConsole_china-d9e3f7d07_orcl”。

  5、再次執行emctl start dbconsole

  C:\Documents and Settings\xcl>emctl start dbconsole

  EM Configuration issue. E:\oracle\product\10.2.0\db_1/china-d9e3f7d07_orcl not found.

  提示:無法找到 “E:\oracle\product\10.2.0\db_1/china-d9e3f7d07_orcl ”

  複製該目錄下的“localhost_orcl”資料夾放在同一目錄下,且把名稱改成“china-d9e3f7d07_orcl”。

  6、再次執行emctl start dbconsole

  C:\Documents and Settings\xcl>emctl start dbconsole

  Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0

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

  http://localhost:1158/em/

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

  服務正在啟動

  ..............................

  OracleDBConsoleorcl 服務已經啟動成功