Oracle10.2.0.1RAC 升級 Oracle10.2.0.5案例分享 -CRS篇

snowdba發表於2014-09-04
Oracle10.2.0.1RAC 升級 Oracle10.2.0.5案例分享 -CRS篇
這是一次資料庫升級的案例。原有的資料庫是Oracle9i 9.2.0.7 雙節點RAC,執行在AIX5.3.0.0作業系統上。由於應用程式的限制,只能升級到Oracle10g 10.2.0.5。 Oracle10g 10.2.0.5沒有獨立的安裝包,需要先安裝Oracle10.2.0.1在通過升級包來升級到該版本。在新伺服器上安裝和升級的好處是不需要升級資料字典,在完成叢集軟體和資料庫軟體的升級後直接使用dbca建立資料庫就可以了,省去一些步驟。

oracle10.2.0.5升級包解壓縮後是一個Disk1資料夾,並沒有區分叢集軟體和資料庫軟體。在我們手動安裝時根據輸入CRS_HOME和ORACLE_HOME來區分所升級的專案。

本次採用的介質如下
叢集軟體 :  10gr2_aix5l64_cluster.cpio.gz,
資料庫軟體:10gr2_aix5l64_database.cpio.gz,
升級包:      p8202632_10205_AIX64-5L_1of2.zip, p8202632_10205_AIX64-5L_2of2.zip

實施環境

Oracle10g RAC+ASM

AIX:5.3_X86_64

SQL> sqlplus / as sysdba
DB version:10.2.0.1

$ crsctl query crs softwareversion
CRS version:10.2.0.1

節點1:scgl1
         Instance:PROD1
         $ORACLE_HOME:/u01/app/oracle/product/10.2.0/db_1
         $CRS_HOME:/u01/app/oracle/product/10.2.0/crs_1

節點2:scgl2
         Instance:PROD2
         $ORACLE_HOME:/u01/app/oracle/product/10.2.0/db_1
         $CRS_HOME:/u01/app/oracle/product/10.2.0/crs_1


叢集軟體升級(10.2.0.1 - 10.2.0.5)

PATCH: p8202632_10205_AIX64-5L_1of2.zip, p8202632_10205_AIX64-5L_2of2.zip

1. 關閉crs資源

$ crs_stop -all

$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.scgl1.gsd  application    OFFLINE   OFFLINE
ora.scgl1.ons  application    OFFLINE   OFFLINE
ora.scgl1.vip  application    OFFLINE   OFFLINE
ora.scgl2.gsd  application    OFFLINE   OFFLINE
ora.scgl2.ons  application    OFFLINE   OFFLINE
ora.scgl2.vip  application    OFFLINE   OFFLINE

2. 解壓升級檔案

$ pwd
/backup/install/10205
unzip p8202632_10205_AIX64-5L_1of2.zip
unzip p8202632_10205_AIX64-5L_2of2.zip

3. 確保影像化正常啟動
cd Disk1
$ export DISKPLAY=10.67.224.26:0.0

4. 啟動升級
$ ./runInstaller

5. 開始影像介面升級


6. 先開始CRS的升級,注意Patch路徑選擇$ORA_CRS_HOME
可以點選Installed Products按鈕來檢視Name與Path的對應關係


7. 點選Next


8. 完成環境檢查,Next


9. 點選Install,開始真正的安裝


10. 等待進度條滿後,Next


11. 根據要求執行1. 2.兩步操作


節點scgl1
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
#
# /u01/app/oracle/product/10.2.0/crs_1/install/root102.sh
Error : Please change the CRS_ORACLE_USER id to have the following OS capabilities :
  < CAP_PROPAGATE CAP_BYPASS_RAC_VMM CAP_NUMA_ATTACH >
by running command then 'crsctl stop crs' and 'crsctl start crs'.
The CSS daemon, ocssd.bin, will not run in realtime without  this change
Oracle strongly recommends that the CSS daemon run realtime
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /u01/app/oracle/product/10.2.0/crs_1
Relinking some shared libraries.
Relinking of patched files is complete.
Copying opriproc to /etc/oracle/bin for AIX
WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/app/oracle/product' is not owned by root
WARNING: directory '/u01/app/oracle' is not owned by root
WARNING: directory '/u01/app' is not owned by root
WARNING: directory '/u01' is not owned by root
Preparing to recopy patched init and RC scripts.
Recopying init and RC scripts.
Startup will be queued to init within 30 seconds.
Starting up the CRS daemons.
Adding daemons to inittab
Waiting for the patched CRS daemons to start.
  This may take a while on some systems.
.
10205 patch successfully applied.
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully deleted 1 values from OCR.
Successfully deleted 1 keys from OCR.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: scgl1 scgl1_priv scgl1
Creating OCR keys for user 'root', privgrp 'system'..
Operation successful.
clscfg -upgrade completed successfully
Creating '/u01/app/oracle/product/10.2.0/crs_1/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /u01/app/oracle/product/10.2.0/crs_1/install/paramfile.crs


節點scgl2
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
#
# /u01/app/oracle/product/10.2.0/crs_1/install/root102.sh
Error : Please change the CRS_ORACLE_USER id to have the following OS capabilities :
  < CAP_PROPAGATE CAP_BYPASS_RAC_VMM CAP_NUMA_ATTACH >
by running command then 'crsctl stop crs' and 'crsctl start crs'.
The CSS daemon, ocssd.bin, will not run in realtime without  this change
Oracle strongly recommends that the CSS daemon run realtime
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /u01/app/oracle/product/10.2.0/crs_1
Relinking some shared libraries.
Relinking of patched files is complete.
Copying opriproc to /etc/oracle/bin for AIX
WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/app/oracle/product' is not owned by root
WARNING: directory '/u01/app/oracle' is not owned by root
WARNING: directory '/u01/app' is not owned by root
WARNING: directory '/u01' is not owned by root
Preparing to recopy patched init and RC scripts.
Recopying init and RC scripts.
Startup will be queued to init within 30 seconds.
Starting up the CRS daemons.
Adding daemons to inittab
Waiting for the patched CRS daemons to start.
  This may take a while on some systems.
.
10205 patch successfully applied.
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully deleted 1 values from OCR.
Successfully deleted 1 keys from OCR.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 2: scgl2 scgl2_priv scgl2
Creating OCR keys for user 'root', privgrp 'system'..
Operation successful.
clscfg -upgrade completed successfully
Creating '/u01/app/oracle/product/10.2.0/crs_1/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /u01/app/oracle/product/10.2.0/crs_1/install/paramfile.crs

指令碼執行結束後,crs及各項服務已經自動啟動了

12. 驗證版本資訊

節點scgl1
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl query crs softwareversion scgl1
CRS software version on node [scgl1] is [10.2.0.5.0]

節點scgl2

# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl query crs softwareversion scgl2
CRS software version on node [scgl2] is [10.2.0.5.0]

節點scgl1
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy

節點scgl2

# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy

# su - oracle
$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.scgl1.gsd  application    ONLINE    ONLINE    scgl1
ora.scgl1.ons  application    ONLINE    ONLINE    scgl1
ora.scgl1.vip  application    ONLINE    ONLINE    scgl1
ora.scgl2.gsd  application    ONLINE    ONLINE    scgl2
ora.scgl2.ons  application    ONLINE    ONLINE    scgl2
ora.scgl2.vip  application    ONLINE    ONLINE    scgl2

到此位置叢集軟體的升級結束,由於篇幅圖片編輯等限制資料庫升級再下一篇部落格中介紹。


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29047826/viewspace-1263381/,如需轉載,請註明出處,否則將追究法律責任。

相關文章