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 10 rac 升級 10.2.0.1升級到10.2.0.5Oracle
- oracle rac 11.2.0.3 升級到11.2.0.4Oracle
- Oracle:Oracle RAC 11.2.0.4 升級為 19cOracle
- ORACLE9I升級到10G(zt)Oracle
- Oracle 10g RAC故障處理Oracle 10g
- Oracle 10g RAC 資料儲存更換Oracle 10g
- 【Oracle19c】Oracle19c RAC 升級 ru:19.3-19.6Oracle
- Oracle從10g升級到11g詳細步驟Oracle
- AIX 5.3 Install Oracle 10g RAC 錯誤集錦AIOracle 10g
- 10g RAC on AIXAI
- 【kingsql分享】Oracle 18c RAC補丁升級實戰【DBRU】SQLOracle
- ORACLE windows和linux環境下 10g升級到11.2.0.4 並安裝11.2.0.4.19補丁OracleWindowsLinux
- 【DBA Part03】國產Linux上Oracle RAC安裝-升級-ADG-遷移LinuxOracle
- Oracle 10.2.0.5升級至11.2.0.4Oracle
- oracle RACOracle
- 【Oracle升級】Oracle指令碼升級11g to 19c non-CDBOracle指令碼
- Oracle RAC Cache Fusion 系列十七:Oracle RAC DRMOracle
- A Oracle Data Guard Broker 升級和降級Oracle
- 12. Oracle版本、補丁及升級——12.3. 升級Oracle
- Solaris 10下遷移10G RAC (六)
- Solaris 10下遷移10G RAC (八)
- Solaris 10下遷移10G RAC (四)
- Solaris 10下遷移10G RAC (二)
- Solaris 10下遷移10G RAC (七)
- Solaris 10下遷移10G RAC (三)
- Solaris 10下遷移10G RAC (一)
- Solaris 10下遷移10G RAC (五)
- Oracle 11.2 DataGuard RAC To RAC搭建Oracle
- oracle 10g flashback databaseOracle 10gDatabase
- 12.1.0.2 單機 升級 19.16 RAC步驟詳解
- Oracle 12c升級指南Oracle
- Oracle RAC CacheFusion 系列十五:Oracle RAC CRServer Part TwoOracleServer
- 靜默升級oracle 11g (從11.2.0.1升級到11.2.0.4)Oracle
- ORACLE RAC clusterwareOracle
- Oracle RAC Cache Fusion系列十八:Oracle RAC Statisticsand Wait EventsOracleAI
- Scheduler in Oracle Database 10g(轉)OracleDatabase
- Oracle 10g 下載地址Oracle 10g
- oracle 10G特性之awrOracle 10g
- Oracle database 升級(文件)to 10.2.0.4 from 10.2.0.1OracleDatabase