Writing About Our Experiences With Oracle Databases
Friday July 30th 2010

Latest Topics

DBMS_SCHEDULER jobs not running?

I came across this posting on OTN which lists down things to check in case your scheduler job is not . This is quite [Read More]

‘Metric execution timed out’ error reported by Grid

We use 10.2 Enterprise Manager Grid control  to monitor our oracle database environments . Apart from the normal [Read More]

Downloading Oracle Software directly to Server

Downloading Oracle Software directly to Server

This article is based on Pythian’s aricle DOWNLOADING FROM OTN DIRECTLY TO YOUR DATABASE SERVER. Article [Read More]

11gR2 Silent Install errors with [SEVERE] – Invalid My Oracle Support credentials

While performing  11gR2 RAC Database Software installation with response file (silent mode), I got this error. - [Read More]

opmnctl start fails when ORA_NLS10 parameter is set

I got into this issue , where in while starting Grid Control components, opmnctl command failed with following errors [Read More]

Upgrading Oracle RAC Database -10g

Continuing my experiments with our 2 Node 10g RAC Test system, I carried out upgrade of Oracle Clusterware and Oracle RAC Database from 10.2.0.1 to 10.2.0.4. I have tried to document the steps for upgrading Oracle Clusterware(Rolling Upgrade) and RAC Database upgrade in this post. In case you observe any mistakes, please let me know

First step is to download the 10.2.0.4 Patchset from metalink. In our case ,we downloaded Patch 6810189 (10g Release 2 (10.2.0.4) Patch Set 3 for Linux x86). You can follow Patch Readme for detailed steps.

We will be doing Rolling upgrade for Oracle Clusterware i.e we will only bring one node down for patching while other node will be available and accepting database connections. Before you start the process, take backup of following so as to restore it in case of failed upgrade

a) Full OS backup (as some binaries are present in /etc ,etc)

b) Full Database Backup (Cold or hot backup)

c) Backup of OCR and voting disk

Let’s begin it

1)Shutdown the DBconsole and Isqlplus

$ emctl stop dbconsole
$ isqlplusctl stop

2) Shutdown the associated service on the node

[oracle@blrraclnx1 ~]$ srvctl stop service -d orcl -s orcl_taf -i orcl1

3) Shutdown Database Instance and ASM instance on node (if present)

[oracle@blrraclnx1 ~]$  srvctl stop instance -d orcl -i orcl1

To stop ASM, use following command

[oracle@blrraclnx1 ~]$ srvctl stop asm -n blrraclnx1

4)Next step is to stop Nodeapps services on the node

[oracle@blrraclnx1 ~]$ srvctl stop nodeapps -n blrraclnx1

Before proceeding to installing Oracle Clusterware Patch, let’s confirm if services have been stopped

HA Resource                                   Target     State
-----------                                   ------     -----
ora.blrraclnx1.ASM1.asm                       OFFLINE    OFFLINE
ora.blrraclnx1.LISTENER1_BLRRACLNX1.lsnr      OFFLINE    OFFLINE
ora.blrraclnx1.gsd                            OFFLINE    OFFLINE
ora.blrraclnx1.ons                            OFFLINE    OFFLINE
ora.blrraclnx1.vip                            OFFLINE    OFFLINE
ora.blrraclnx2.ASM2.asm                       ONLINE     ONLINE on blrraclnx2
ora.blrraclnx2.LISTENER1_BLRRACLNX2.lsnr      ONLINE     ONLINE on blrraclnx2
ora.blrraclnx2.gsd                            ONLINE     ONLINE on blrraclnx2
ora.blrraclnx2.ons                            ONLINE     ONLINE on blrraclnx2
ora.blrraclnx2.vip                            ONLINE     ONLINE on blrraclnx2
ora.orcl.db                                   ONLINE     ONLINE on blrraclnx2
ora.orcl.orcl1.inst                           OFFLINE    OFFLINE
ora.orcl.orcl2.inst                           ONLINE     ONLINE on blrraclnx2
ora.orcl.orcl_taf.cs                          ONLINE     ONLINE on blrraclnx2
ora.orcl.orcl_taf.orcl1.srv                   OFFLINE    OFFLINE
ora.orcl.orcl_taf.orcl2.srv                   ONLINE     ONLINE on blrraclnx2

5)Set DISPLAY variable and execute runinstaller from Patch Directory

[oracle@blrraclnx1 Disk1]$ ./runInstaller

This will open OUI screen. Select Oracle Clusterware Home for Patching. Find below screenshot for same

crs10204patch
crs10204patch

This will automatically select all the nodes available in cluster and propogate patch binaries to the other node.

10204patch2
10204patch2


6) On the Summary screen, click Install.OUI will prompt you now to run, following two scripts as Root which will upgrade Oracle Clusterware

# $ORA_CRS_home/bin/crsctl stop crs
# $ORA_CRS_home/install/root102.sh

Now we need to repeat the steps 1-4 and step 6 on Node 2. Step 5 is not required as binaries have been already copied over to node 2.

RAC Database Patching cannot be done in a rolling fashion and requires Database to be shutdown.

1)Shutdown the DBconsole and Isqlplus

$ emctl stop dbconsole
$ isqlplusctl stop

2) Shutdown the associated service for database

[oracle@blrraclnx1 ~]$ srvctl stop service -d orcl 

3) Shutdown Database Instance and ASM instance on node (if present)

[oracle@blrraclnx1 ~]$  srvctl stop database -d orcl

To stop ASM, use following command on both the nodes

[oracle@blrraclnx1 ~]$ srvctl stop asm -n blrraclnx1
[oracle@blrraclnx1 ~]$ srvctl stop asm -n blrraclnx2

4)Next step is to stop Listener on both the nodes

[oracle@blrraclnx1 ~]$ srvctl stop listener -n blrraclnx1 -l LISTENER1_BLRRACLNX1
[oracle@blrraclnx1 ~]$ srvctl stop listener -n blrraclnx2 -l LISTENER1_BLRRACLNX2

5)Set DISPLAY variable and execute runinstaller from Patch Directory

[oracle@blrraclnx1 Disk1]$ ./runInstaller

This will open OUI screen. Select Database Home for Patching.


6) On the Summary screen, click Install.When prompted, run the $ORACLE_HOME/root.sh script as the root
user on both the nodes. On completion of this , we need to perform post installation steps.

7)Start listener and ASM Instance on both the nodes

[oracle@blrraclnx1 ~]$ srvctl start listener -n blrraclnx1 -l LISTENER1_BLRRACLNX1
[oracle@blrraclnx1 ~]$ srvctl start listener -n blrraclnx2 -l LISTENER1_BLRRACLNX2
[oracle@blrraclnx1 ~]$ srvctl start asm -n blrraclnx1
[oracle@blrraclnx1 ~]$ srvctl start asm -n blrraclnx2

8)For Oracle RAC Installation, we need to set CLUSTER_DATABASE=FALSE before upgrading

[oracle@blrraclnx1 ~]sqlplus "/ as sysdba"
SQL>startup nomount
SQL> alter system set cluster_database=false scope=spfile;

System altered.
SQL>shutdown immediate;
SQL>startup upgrade
SQL>spool 10204patch.log
SQL>@?/rdbms/admin/catupgrd.sql
SQL>spool off

Log file needs to be reviewed for any errors. catupgrd.sql took 42 minutes on my system. In case CLUSTER_DATABASE parameter is not set to False, you will get following error while starting database in upgrade mode

ORA-39701: database must be mounted EXCLUSIVE for UPGRADE or DOWNGRADE

We need to Restart the database now and run utlrp.sql.

SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP
SQL> @?/rdbms/admin/utlrp.sql

Confirm whether Database has been upgraded successfully by querying DBA_REGISTRY;

select comp_name,version,status from dba_registry;

Now set Cluster_database parameter to TRUE and start Database

SQL>alter system set cluster_database=true scope=spfile;
SQL>Shutdown immediate;
[oracle@blrraclnx1 ~]$ srvctl start database -d orcl
[oracle@blrraclnx1 ~]$ srvctl start service -d orcl

To upgrade DBConsole, run following command

emca -upgrade db -cluster

This completes the upgrade process.

  • Share/Bookmark
Related Tags: , ,

9 Comments for “Upgrading Oracle RAC Database -10g”

  • Sandeep says:

    Fantastic Post Amit…keep up the good work !!!

  • Sandeep says:

    Btw ..are there O/S prerequisites for the upgrade?

  • Amit says:

    Sandeep,

    I would recommend reading patch readme for details..generally for applying patchsets we do not have OS pre-requisites as these are taken care at time of base installation.

    cheers
    Amit

  • Inder says:

    Why we need to stop the CRS on Node 1 which is initiating CRS. As per my knowledge, you don;t need to stop anything and at the very end we only need to stop crs on node basis to execute root102.sh

    • Amit says:

      Inder,

      I think I am also stopping the CRS only before running root102.sh (Step 6). Can you point the step where I have mentioned that we need to stop CRS on both nodes simultaneously.

      Regards
      Amit

  • vijay says:

    Hi,

    In clusterware upgradation, for node1 you did shutdown and then performed upgradation. After upgradation do we need to start up the node1 before shutting down the node2 for upgradation? or we require minimal downtime here?


Leave a Comment

Recent Comments

Deepak had this to say

Thanks a lot Amit. Very useful doc. Please update something more like this. Read the post

Amit had this to say

Upload the cookies.txt file in same directory from where you are running the wget command. Did you try downloading Read the post

inoideas had this to say

I tried but got the below error msg wget .load-cookies=cookies.txt --user-agent Mozilla/4.0 Read the post

Richard had this to say

Hello, Great this tip that you sent, you helped me so much. but take care when to use dd command. Regards, Read the post

Ram had this to say

This is very straight forward and clear.It has become easy when compared to referring the looong docs. Read the post

More from category

11gR2: CVU needs SCAN Listeners’ Manual Startup During Grid-Infrastructure Configuration

During configuration phase of Grid Infrastructure for cluster, CVU failed while performing post-checks. Following [Read More]

Cluvfy Reports CRS not Installed on Nodes

Before I start my post, I would like to wish all our readers a “Happy New Year”. While reviewing a 10gR2 [Read More]

Link:11gR2 RAC installation steps on OEL4

If you are looking for steps for 11gR2 RAC installation, you can refer to this article by Rajeev Ramdas at [Read More]

Link: Best practices for AIX RAC Database on OTN

A new whitepaper has been published on OTN which primarily discusses best practices for AIX 5.2,5.3 and 6.1 for RAC [Read More]

SRVCTL fails to start RAC resources:CRS-0215

After upgrading RAC database to 10204 and applying CRS bundle patch-1 for 10204 crs home, srvctl command fails to [Read More]