2012年12月3日 星期一

安裝Oracle 10g R2最後Database Control(Web EM)配置失敗的解決方式2

因為客戶的資料庫通常也有Oracle,當我們在support SQL Server的問題就需要有Oracle的LAB來進行測試,最近重新安裝了一台Oracle 10g R2發生了一些問題是安裝Oracle 11g沒有出現的,所以只要想辦法解決,以下是問題說明與解決方法,希望能幫助到遇到相同問題的朋友。

官方網站的解釋是憑證到期,導致EM(Enterprise Manager Database Control)配置失敗且無法啟動

In Enterprise Manager Database Control with Oracle Database 10.2.0.4 and 10.2.0.5, the root certificate used to secure communications via the Secure Socket Layer (SSL) protocol will expire on 31-Dec-2010 00:00:00. The certificate expiration will cause errors if you attempt to configure Database Control on or after 31-Dec-2010. Existing Database Control configurations are not affected by this issue.

If you plan to configure Database Control with either of these Oracle Database releases, Oracle strongly recommends that you apply Patch 8350262 to your Oracle Home installations before you configure Database Control. Configuration of Database Control is typically done when you create or upgrade Oracle Database, or if you run Enterprise Manager Configuration Assistant (EMCA) in standalone mode.


[解決方法]
1.下載p8350262_10204_Generic.zip

2.使用Opatch安裝Patch 8350262
  (1)Set the ORACLE_HOME and ORACLE_SID environment variables.
      預設

      ORACLE_HOME=c:\oracle\product\10.2.0\db_1
      ORACLE_SID=orcl

  (2)將p8350262_10204_Generic.zip解壓縮到目錄,執行opatch apply
       例如
       c:\Temp\p8350262\opatch apply
       PS.c:\oracle\product\10.2.0\db_1\OPatch必須在path的環境變數裡
       或

       c:\Temp\p8350262\>c:\oracle\product\10.2.0\db_1\OPatch\opatch apply


      PS.如果遇到Java could not be located. OPatch cannot proceed錯誤,則加上這個參數
       c:\Temp\p8350262\opatch apply -jre c:\oracle\product\10.2.0\db_1\jdk
   

3. Re-secure Database Control with the following command:
      /bin/emctl secure dbconsole -reset

4. Re-start Database Control with the following command:
      /bin/emctl start dbconsole

[由於我是安裝一台新的Oracle所以我的作法是]
1.將Windows系統時間調整到31-Dec-2010之前,例如2009-10-10
2.安裝Oracle 10g R2 10.2.0.4,就可以順利安裝
3.安裝完成後確認Oracle Enterprise Manager database control服務已經正常啟動且使用瀏覽器可以連線到Enterprise Manager Database Control
 https://hostname:1158/em
4.將Oracle Enterprise Manager database control服務停止,依照上面的[解決方法]開始套用patch 8350262

5.再將Oracle Enterprise Manager database control服務啟動,確認可以正常啟動
6.將Windows系統時間調整回正常時間,並重新開機
7.此時Oracle Enterprise Manager database control服務已經可以正常啟動了
8.如果此時Oracle Enterprise Manager database control服務還是無法正常啟動,則使用命令將DB control移除重建
emca -deconfig dbcontrol db -repos drop
emca -config dbcontrol db -repos create

可以參考這篇
http://www.aixchina.net/home/space.php?uid=20260&do=blog&id=28358

沒有留言:

SQL Server Database Mirroring 資料庫鏡像

SQL Server Database Mirroring 資料庫鏡像