一. 說明
在官網看到一篇ASM 升級的文檔,如下:
How To Upgrade ASM from 10.2 to 11.1 (RAC)
Unable To Open Database After ASM Upgrade From Release 11.1 To Release 11.2
RAC 下資料庫的升級參考:
RedHat 5.4 Orcle RAC 資料庫 從10.2.0.1升級到 10.2.0.4
幾點說明:
1. Clusterware的版本必須要和DB 或者 ASM 的版本一致。 如果說要升級ASM 或者DB,那麼就必須先要升級clusterware。
Either the release version of Oracle Clusterware must be equal to the ASM release to which you want to upgrade, or you must first upgrade Oracle Clusterware. For example, you can upgrade ASM release 11.1.0.6 to 11.1.0.7 if Oracle Clusterware on your system is release 11.1.0.7, but you cannot do this if Oracle Clusterware is 11.1.0.6 or an earlier release.
2. 可以把ASM 和 DB 一起升級,如果只升級ASM 執行個體的話,就像官網裡提供的方法:
(1)將新版本的ASM 安裝到其他目錄。 即安裝資料庫軟體。
(2)用舊版本的ASM 啟動執行個體執行個體。
(3)另開一個視窗,重新指定ORACLE_HOME,PATH等參數,指定到新版本的ORACLE軟體目錄。
(4)在這個視窗運行dbua,選擇ASM 執行個體進行升級。
3. 在這個實驗中,我們將DB 和 ASM 一起進行升級。 就不在分開升級。 因為虛擬機器的空間不夠折騰。 瞭解這個思路就可以了。
二. 查看RAC 資訊
2.1 DB 版本資訊
[oracle@rac1 ~]$ export ORACLE_SID=dave1
[oracle@rac1 ~]$ sqlplus / as sysdba;
SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 12 15:08:44 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SYS@dave1(rac1)>select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SYS@dave1(rac1)>
2.2 ASM 執行個體版本
[oracle@rac1 ~]$ export ORACLE_SID=+ASM1
[oracle@rac1 ~]$ sqlplus / as sysdba;
SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 12 18:19:29 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SYS@+ASM1(rac1)>
2.3 RAC 進程資訊
[oracle@rac1 ~]$ cd /u01
[oracle@rac1 u01]$ sh crs_stat.sh
Name Target State Host
------------------------------ ---------- --------- -------
ora.dave.dave1.inst ONLINE ONLINE rac1
ora.dave.dave2.inst ONLINE ONLINE rac2
ora.dave.db ONLINE ONLINE rac1
ora.dave.taf.cs ONLINE ONLINE rac1
ora.dave.taf.dave1.srv ONLINE ONLINE rac1
ora.dave.taf.dave2.srv ONLINE ONLINE rac2
ora.rac1.ASM1.asm ONLINE ONLINE rac1
ora.rac1.LISTENER_RAC1.lsnr ONLINE ONLINE rac1
ora.rac1.gsd ONLINE ONLINE rac1
ora.rac1.ons ONLINE ONLINE rac1
ora.rac1.vip ONLINE ONLINE rac1
ora.rac2.ASM2.asm ONLINE ONLINE rac2
ora.rac2.LISTENER_RAC2.lsnr ONLINE ONLINE rac2
ora.rac2.gsd ONLINE ONLINE rac2
ora.rac2.ons ONLINE ONLINE rac2
ora.rac2.vip ONLINE ONLINE rac2
三. 升級Clusterware
10.2.0.4的patch number 是:p6810189。
3.1 將升級包mout到linux系統
我的Patch 下到的本地的作業系統,網路又被網管限了速,所以直接就mount到linux上。
用root使用者登陸系統,執行如下命令:
mount -o username=administrator,password=12345678 //192.168.3.115/Software /mnt
mount -o username=administrator,password=bailing520 //192.168.3.115/Software /mnt
3.2 停止相關的進程
3.2.1每個節點分別停止 EM和 isqlplus
[oracle@rac1 bin]$ emctl stop dbconsole
[oracle@rac1 bin]$ isqlplusctl stop
3.2.2 停止相關進程
這個可以用srvctl 命令來一個一個進行,也可以用crs_stop -all 進行。
這部分內容參考Blog:
Oracle RAC 啟動與關閉
[oracle@rac1 u01]$ sh crs_stat.sh
Name Target State Host
------------------------------ ---------- --------- -------
ora.dave.dave1.inst OFFLINE OFFLINE
ora.dave.dave2.inst OFFLINE OFFLINE
ora.dave.db OFFLINE OFFLINE
ora.dave.taf.cs OFFLINE OFFLINE
ora.dave.taf.dave1.srv OFFLINE OFFLINE
ora.dave.taf.dave2.srv OFFLINE OFFLINE
ora.rac1.ASM1.asm OFFLINE OFFLINE
ora.rac1.LISTENER_RAC1.lsnr OFFLINE OFFLINE
ora.rac1.gsd OFFLINE OFFLINE
ora.rac1.ons OFFLINE OFFLINE
ora.rac1.vip OFFLINE OFFLINE
ora.rac2.ASM2.asm OFFLINE OFFLINE
ora.rac2.LISTENER_RAC2.lsnr OFFLINE OFFLINE
ora.rac2.gsd OFFLINE OFFLINE
ora.rac2.ons OFFLINE OFFLINE
ora.rac2.vip OFFLINE OFFLINE