Oracle RAC ASM 例項 從10.2.0.1 升級到 10.2.0.4 說明

roominess發表於2012-05-08

說明

 

在官網看到一篇ASM 升級的文件,如下:

       How To Upgrade ASM from 10.2 to 11.1 (RAC)

       http://space.itpub.net/?uid-15880878-action-viewspace-itemid-723006

 

       Unable To Open Database After ASM Upgrade From Release 11.1 To Release 11.2

       http://space.itpub.net/?uid-15880878-action-viewspace-itemid-723007

 

RAC 下資料庫的升級參考:

       Redhat 5.4 Orcle RAC 資料庫 10.2.0.1升級到 10.2.0.4

       http://space.itpub.net/?uid-15880878-action-viewspace-itemid-723012

 

 

幾點說明:

       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_HOMEPATH等引數,指定到新版本的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.4patch number 是:p6810189

 

3.1 將升級包moutlinux系統

       我的Patch 下到的本地的作業系統,網路又被網管限了速,所以直接就mountlinux上。  

    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 啟動與關閉

           http://space.itpub.net/?uid-15880878-action-viewspace-itemid-723009

 

[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  

 

3.2.3 停止每個節點上的CRS

[root@rac1 ~]# /u01/app/oracle/product/crs/bin/crsctl stop crs

 

 

3.3 Nomachine工具執行runInstaller


 

 3.3.1進行升級包的目錄,執行runInstaller

 

    [oracle@rac1 p6810189_10204_Linux-x86]$ pwd

       /mnt/OracleSoftware/p6810189_10204_Linux-x86

    [oracle@rac1 p6810189_10204_Linux-x86]$ cd Disk1/

    [oracle@rac1 Disk1]$ ls

    10204_buglist.htm  install  patch_note.htm  response  runInstaller  stage

    [oracle@rac1 Disk1]$ ./runInstaller -ignoreSysPreReqs

       -- 因為我用的是redhat 5,所以忽略了版本檢查

       3.3.2 在視覺化的安裝視窗選擇CRS_HOME。看清楚,不要選錯了。然後一下步進行安裝。

 

       3.3.3 安裝結束會提示執行2個指令碼

    The installer has detected that your Cluster Ready Services (CRS) installation is shared amongst the following nodes:

    rac1

    rac2

Because of the shared nature of this installation, you cannot perform. a rolling upgrade of your CRS software.

 

To complete the installation of this patchset, you must perform. the following tasks:

 

    1.  On each node, do the following:

       a.  Log in as the root user.

       b.  As root, shutdown the CRS daemons on the node

           using the following command:

              /u01/app/oracle/product/crs/bin/crsctl stop crs

       Repeat this step until the CRS daemons on all the nodes are shutdown.

 

    2.  After all the CRS daemons on all the nodes are shutdown, run the shell script. located at:

           /u01/app/oracle/product/crs/install/root102.sh

       This script. will automatically start the CRS daemons on the patched node upon completion.

    3.  Wait until the script. finishes and then proceed to the next node and repeat step 2.

 

 

[root@rac1 ~]# /u01/app/oracle/product/crs/bin/crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

[root@rac1 ~]# /u01/app/oracle/product/crs/install/root102.sh

Creating pre-patch directory for saving pre-patch clusterware files

Completed patching clusterware files to /u01/app/oracle/product/crs

Relinking some shared libraries.

Relinking of patched files is complete.

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.

Waiting for the patched CRS daemons to start. This may take a while on some systems.

 

10204 patch successfully applied.

clscfg: EXISTING configuration version 3 detected.

clscfg: version 3 is 10G Release 2.

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.

node :

node 2: rac1 rac1-priv rac1

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

clscfg -upgrade completed successfully

 

 

升級資料庫軟體

    升級clusterware的時候,升級結束的時候會啟動CRS服務。 我們在升級資料庫的時候需要關閉這些服務。

 

4.1 停止相關程式

[oracle@rac1 u01]$ sh crs_stat.sh

Name                           Target     State      Host     

------------------------------ ---------- ---------  -------  

ora.dave.dave1.inst            ONLINE     OFFLINE             

ora.dave.dave2.inst            ONLINE     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              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     

[oracle@rac1 u01]$ crs_stop -all

Attempting to stop `ora.rac1.gsd` on member `rac1`

Attempting to stop `ora.rac2.gsd` on member `rac2`

Attempting to stop `ora.rac1.ons` on member `rac1`

Attempting to stop `ora.rac2.ons` on member `rac2`

Stop of `ora.rac1.ons` on member `rac1` succeeded.

Stop of `ora.rac2.gsd` on member `rac2` succeeded.

Stop of `ora.rac1.gsd` on member `rac1` succeeded.

Stop of `ora.rac2.ons` on member `rac2` succeeded.

Attempting to stop `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1`

Attempting to stop `ora.rac1.ASM1.asm` on member `rac1`

Attempting to stop `ora.rac2.ASM2.asm` on member `rac2`

Attempting to stop `ora.rac2.LISTENER_RAC2.lsnr` on member `rac2`

Stop of `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1` succeeded.

Stop of `ora.rac2.LISTENER_RAC2.lsnr` on member `rac2` succeeded.

Attempting to stop `ora.rac1.vip` on member `rac1`

Attempting to stop `ora.rac2.vip` on member `rac2`

Stop of `ora.rac1.vip` on member `rac1` succeeded.

Stop of `ora.rac2.vip` on member `rac2` succeeded.

Stop of `ora.rac1.ASM1.asm` on member `rac1` succeeded.

Stop of `ora.rac2.ASM2.asm` on member `rac2` succeeded.

[oracle@rac1 u01]$ sh crs_stat.sh

Name                           Target     State      Host     

------------------------------ ---------- ---------  -------  

ora.dave.dave1.inst            ONLINE     OFFLINE             

ora.dave.dave2.inst            ONLINE     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             

[oracle@rac1 u01]$

 

 

4.2Nomachine 工具連線上伺服器,進行升級包的目錄,執行runInstaller

 

    在視覺化的安裝視窗選擇ORACLE_HOME。看清楚,不要選錯了。然後一下步進行安裝。

 

 

4. 3  安裝結束會提示用root使用者在所有節點上執行一個指令碼

    /u01/app/oracle/product/10.2.0/db_1/root.sh

 

[root@rac1 ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh

Running Oracle10 root.sh script...

 

The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /u01/app/oracle/product/10.2.0/db_1

 

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.

 

 

.  升級ASM DB 例項

 

       在升級介面選擇升級ASM, 它會提示我們的ASM 已經是最新版本了。 因為我們前面已經升級過了Oracle 軟體,ASM 例項存在與ORACLE_HOME下。所以ASM 例項已經升級過了。

 

       所以,我們直接選擇升級DB 就好了。

       這個升級需要1個小時左右的時間。

 

 

.  升級完之後,在驗證下ASM  DB 版本

6.1  ASM 版本:

[oracle@rac1 u01]$ export ORACLE_SID=+ASM1

[oracle@rac1 u01]$ sqlplus / as sysdba;

 

SQL*Plus: Release 10.2.0.4.0 - Production on Thu May 12 22:04:53 2011

 

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

 

SYS@+ASM1(rac1)>

 

6.2  DB 版本

 

[oracle@rac1 u01]$ sqlplus / as sysdba;  

SQL*Plus: Release 10.2.0.4.0 - Production on Thu May 12 22:02:26 2011

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

 

SYS@dave1(rac1)>

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

相關文章