oracle 10g rac升級
參考http://lymrg.blog.51cto.com/1551327/1152855
1. 環境描述:
Suse 10,oracle和cluster均是 10.2.0.4.0,voting和ocr放在裸裝置上,其他資料庫檔案放在ASM上
# cat /etc/issue
Welcome to SUSE Linux Enterprise Server 10 SP1 (i586) - Kernel \r (\l).
node2:/opt/oracle # uname -a
Linux node2 2.6.16.46-0.12-default #1 Thu May 17 14:00:09 UTC 2007 i686 i686 i386 GNU/Linux
SQL> select banner from v$version; //查詢oracle版本
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
node2:~ # crsctl query crs softwareversion node1 //查詢cluster 版本
CRS software version on node [node1] is [10.2.0.4.0]
node2:~ # crsctl query crs softwareversion node2
CRS software version on node [node2] is [10.2.0.4.0]
一般oracle和cluster版本保持一致
2. 升級前先備份oracle資料和voting、ocr(其他文件有講述)
3. 下載oracle rac的安裝補丁p8202632_10205_Linux-x86-64.zip,clusterware和database的補丁都包含在這裡面
4. 升級clusterware軟體包
1) 停止所有資源 //不建議使用crs_stop -all來停止
oracle@node1:~> srvctl stop nodeapps -n node1
oracle@node1:~> srvctl stop nodeapps -n node2
如果db和asm等資源還沒offline
> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application OFFLINE OFFLINE
ora.node1.gsd application OFFLINE OFFLINE
ora.node1.ons application OFFLINE OFFLINE
ora.node1.vip application OFFLINE OFFLINE
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application OFFLINE OFFLINE
ora.node2.gsd application OFFLINE OFFLINE
ora.node2.ons application OFFLINE OFFLINE
ora.node2.vip application OFFLINE OFFLINE
ora.ossdb.db application ONLINE ONLINE node2
ora....b1.inst application ONLINE ONLINE node1
ora....b2.inst application ONLINE ONLINE node2
解決辦法:
分別進入2個節點,關閉資料庫和ASM例項
2) 檢視狀態
oracle@node1:~> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application OFFLINE OFFLINE
ora....E1.lsnr application OFFLINE OFFLINE
ora.node1.gsd application OFFLINE OFFLINE
ora.node1.ons application OFFLINE OFFLINE
ora.node1.vip application OFFLINE OFFLINE
ora....SM2.asm application OFFLINE OFFLINE
ora....E2.lsnr application OFFLINE OFFLINE
ora.node2.gsd application OFFLINE OFFLINE
ora.node2.ons application OFFLINE OFFLINE
ora.node2.vip application OFFLINE OFFLINE
ora.ossdb.db application OFFLINE OFFLINE
ora....b1.inst application OFFLINE OFFLINE
ora....b2.inst application OFFLINE OFFLINE
3) 將補丁檔案上傳到節點1上,解壓縮,賦予使用者屬性
#unzip p8202632_10205_LINUX.zip
# chown -R oracle:oinstall Disk1/
4) 先升級cluster補丁
#su - oracle
執行runinstaller
和第一次安裝保持一致,選擇crs
按照提示執行指令碼,先在第一個節點執行再在第二個節點執行:
node1:~ # /opt/oracle/product/crs/bin/crsctl stop crs
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
node1:~ # /opt/oracle/product/crs/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /opt/oracle/product/crs
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING: directory '/opt/oracle/product' is not owned by root
WARNING: directory '/opt/oracle' 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.
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: node1 node1-priv node1
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully
Creating '/opt/oracle/product/crs/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /opt/oracle/product/crs/install/paramfile.crs
node2:/opt/oracle # /opt/oracle/product/crs/bin/crsctl stop crs
Stopping resources. This could take several minutes.
Resource or relatives are currently involved in another operation. Retrying stop resources.
Resource or relatives are currently involved in another operation. Retrying stop resources.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
node2:/opt/oracle # /opt/oracle/product/crs/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /opt/oracle/product/crs
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING: directory '/opt/oracle/product' is not owned by root
WARNING: directory '/opt/oracle' 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.
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: node2 node2-priv node2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully
Creating '/opt/oracle/product/crs/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /opt/oracle/product/crs/install/paramfile.crs
檢視狀態
node1:~ # crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application ONLINE ONLINE node1
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora.node2.gsd application ONLINE ONLINE node2
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
ora.ossdb.db application ONLINE ONLINE node1
ora....b1.inst application ONLINE ONLINE node1
ora....b2.inst application ONLINE ONLINE node2
5) 資料庫升級
1. 停止服務和例項
node1:~ # srvctl stop nodeapps -n node1
node2: # srvctl stop nodeapps -n node2
如果ASM和資料庫例項沒關閉,手動關閉
crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application OFFLINE OFFLINE
ora....E1.lsnr application OFFLINE OFFLINE
ora.node1.gsd application OFFLINE OFFLINE
ora.node1.ons application OFFLINE OFFLINE
ora.node1.vip application OFFLINE OFFLINE
ora....SM2.asm application OFFLINE OFFLINE
ora....E2.lsnr application OFFLINE OFFLINE
ora.node2.gsd application OFFLINE OFFLINE
ora.node2.ons application OFFLINE OFFLINE
ora.node2.vip application OFFLINE OFFLINE
ora.ossdb.db application OFFLINE OFFLINE
ora....b1.inst application OFFLINE OFFLINE
ora....b2.inst application OFFLINE OFFLINE
2. 然後開啟安裝程式,選擇安裝目錄
./runInstaller
目錄保持一致
在2個節點分別執行以下指令碼
node1:~ # /opt/oracle/product/database/root.sh
Running Oracle 10g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /opt/oracle/product/database
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
node2:/opt/oracle # /opt/oracle/product/database/root.sh
Running Oracle 10g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /opt/oracle/product/database
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
6) 升級資料庫dbua
l 先啟動listener和asm資源
node1:~ # srvctl start listener -n node1
node1:~ # srvctl start listener -n node2
node1:~ # srvctl start asm -n node1
node1:~ # srvctl start asm -n node2
node1:~ # crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application OFFLINE OFFLINE
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora.node2.gsd application OFFLINE OFFLINE
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
ora.ossdb.db application OFFLINE OFFLINE
ora....b1.inst application OFFLINE OFFLINE
ora....b2.inst application OFFLINE OFFLINE
l 執行dbua
啟動dbua工具後,會提示選擇升級ASM還是資料庫,這裡是從10.2.0.4的基礎上升級,不需要升級ASM,直接跳過,如低於10.2.0.1版本而是必須先升級ASM。
如果選擇升級ASM,會彈出ASM是最新版本的提示
升級資料庫
輸入密碼manager
如果提示資料庫不是open狀態,再點選嘗試
是DBCA時沒選擇 Oracle Text ,所以這裡忽略這個錯誤即可
升級完後,檢查crs
# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application ONLINE ONLINE node1
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora.node2.gsd application ONLINE ONLINE node2
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
ora.ossdb.db application ONLINE ONLINE node1
ora....b1.inst application ONLINE ONLINE node1
ora....b2.inst application ONLINE ONLINE node2
SQL> select banner from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 – Production
node1:~ # crsctl query crs softwareversion node1
CRS software version on node [node1] is [10.2.0.5.0]
node1:~ # crsctl query crs softwareversion node2
CRS software version on node [node2] is [10.2.0.5.0]
升級完成
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26217983/viewspace-1122499/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORACLE 10G RAC 升級補丁Oracle 10g
- 升級oracle 10g clusterware 和 racOracle 10g
- Oracle 10g rac升級(10.2.0.1 Rac到10.2.0.4)Oracle 10g
- Oracle 10g rac升級需要注意的事項Oracle 10g
- ORACLE 10G 升級Oracle 10g
- 滾動升級(rolling upgrade) Oracle 10g RACOracle 10g
- ORACLE RAC 的滾動升級Oracle
- AIX上安裝、升級Oracle 10g RAC的情況總結AIOracle 10g
- oracle 10 rac 升級 10.2.0.1升級到10.2.0.5Oracle
- oracle 10.2.0.1 rac 升級到10.2.0.4 rac時,dbua升級的元件列表Oracle元件
- linux 上 10g rac 升級到10.2.0.4Linux
- 升級Oracle 10g 到10.2.0.4Oracle 10g
- Oracle RAC 11.2.0.3.2 升級 11.2.0.3.4Oracle
- Oracle RAC 手動升級 11.2.0.3.4Oracle
- Oracle 資料庫 升級為 RACOracle資料庫
- oracle 10.2.0.4 rac 升級到oracle 10.2.0.5 rac步驟Oracle
- oracle rac 10.2.0.1 升級到 oracle 10.2.0.4Oracle
- ORACLE 10G data guard 升級步驟Oracle 10g
- ORACLE9I升級到10GOracle
- oracle rac 11.2.0.3 升級到11.2.0.4Oracle
- Oracle:Oracle RAC 11.2.0.4 升級為 19cOracle
- ORACLE9I升級到10G(zt)Oracle
- ORACLE 從10G 單機 並升級到11G RAC時報錯分析處理Oracle
- IBM aix下oracle 9.2.0.5 rac 升級到oracle 9.2.0.8IBMAIOracle
- ORACLE 10gR2 RAC升級至10.2.0.4Oracle 10g
- Oracle RAC 10.2.0.1 升級 10.2.0.4 簡單描述Oracle
- Oracle 10g RAC NFSOracle 10gNFS
- Oracle 10g RAC TAFOracle 10g
- rac 升級crs 升級資料庫軟體,升級資料庫資料庫
- Oracle 10g/11g 升級psu步驟Oracle 10g
- Windows 下 oracle 10g升級到10.2.0.4的方法WindowsOracle 10g
- HP UNIX - oracle rac 10.2.0.3 升級10.2.0.4問題Oracle
- Oracle10g RAC : 10.2.0.1 升級到 10.2.0.4Oracle
- 10g rac升級crs,執行root102.sh報錯
- Oracle9.2.0.7 RAC在udump下產生很多trc檔案,只有升級到10g才能解決?Oracle
- 【RAC】Oracle 10g RAC 重建控制檔案Oracle 10g
- oracle 10g 之RAC 搭建Oracle 10g
- Oracle10g RAC 資料庫升級為10.2.0.4 ,clusterware需要升級到10.2.0.4 ?Oracle資料庫