Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Upgrade 10gR2 RAC to 11gR2 RAC on Oracle Enterprise Linux 5

This tutorial  the step by step of upgrading database from 10gR2 RAC to 11gR2 RAC. I have chosen the below upgrade path which will allow me to upgrade 10gR2 Clusterware and ASM to 11gR2 Grid infrastructure. In this upgrade Path, the original 10gR2 CRS installation was made hidden as if there is no CRS existed. Then, the fresh installation of 11gR2 Grid Infrastructure was taken place and 10gR2 ASM diskgroups were moved and mounted using the new 11gR2 Grid HOME. At this stage, the original 10gR2 RAC database was managed by 11gR2 Grid HOME. At the end, the 11gR2 RAC database home was installed and the original 10gR2 RAC database was upgraded to 11gR2 RAC manually.

Existing 10gR2 RAC setup (Before Upgrade)
Target 11gR2 RAC Setup (After Upgrade)
Oracle 10gR2 Clusterware
Oracle 11gR2 Grid Infrastructure
ASM Binaries
10gR2 RAC
Oracle 11gR2 Grid Infrastructure
Cluster Name
Cluster Nodes
node1, node2, node3
node1, node2, node3
Clusterware Home
/u01/app/oracle/crs (CRS_HOME)
/u01/app/grid11201 (GRID_HOME)
Clusterware Owner
oracle:(oinstall, dba)
oracle:(oinstall, dba)
node1-vip, node2-vip, node3-vip
node1-vip, node2-vip, node3-vip
Scan VIPs Endpoint: (TCP:1525)
OCR and Voting Disks Storage Type
Raw Devices
OCR Disks
/dev/raw/raw1, /dev/raw/raw2
/dev/raw/raw3, /dev/raw/raw4, /dev/raw/raw5
oracle:(oinstall, dba)
oracle:(oinstall, dba)
ASMLib user:group

DB Binaries
Oracle 10gR2 RAC (
Oracle 11gR2 RAC (
oracle:(oinstall, dba)
oracle:(oinstall, dba)
DB Listener Host/port
node1-vip, node2-vip, node3-vip (port 1530)
node1-vip, node2-vip, node3-vip (port 1530)
DB Storage Type, File Management
ASM with OMFs
ASM with OMFs
ASM diskgroups for DB and FRA
OS Platform
Oracle Enterprise Linux 5.5 (32 bit)
Oracle Enterprise Linux 5.5 (32 bit)

HERE’s an existing 10gR2 RAC Setup in detail
The Upgrade Process is composed of below Stages:

·         Pre-Upgrade Tasks
·         Hide the 10gR2 Clusterware installation.
·         Install 11gR2 Grid Infrastructure.
·         Move 10gR2 ASM Diskgroups to 11gR2 Grid Infrastructure.
·         Register10gR2 RAC database and services to 11gR2 Grid Infrastructure.
·         Install 11gR2 RAC for database home.
·         Manually upgrade original 10gR2 RAC database to 11gR2 RAC.

Pre-Upgrade tasks:

·         Install/Upgrade RPMs required for 11gR2 RAC Installation
·         Add SCAN VIPs to the DNS
·         Setup of Network Time Protocol
·         Start the nscd on all the RAC nodes
·         Create 3 ASM Disks for 11gR2 OCR and Voting Disks.
·         Backing up 10gR2 existing HOMEs and database

Minimum Required RPMs for 11gR2 RAC on OEL 5.5 (All the 3 RAC Nodes):

Below command verifies whether the specified rpms are installed or not. Any missing rpms can be installed from the OEL Media Pack
rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static \
              gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel \
              libgcc libgomp libstdc++ libstdc++-devel make numactl-devel sysstat unixODBC unixODBC-devel

I had to install below RPM.

numactl-devel à Located on the 3rd CD of OEL 5.5 Media pack.

[root@node1 ~]# rpm -ivh numactl-devel-0.9.8-11.el5.i386.rpm
warning: numactl-devel-0.9.8-11.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:numactl-devel          ########################################### [100%]
[root@node1 ~]#

I had to upgrade the cvuqdisk RPM by removing and installing the same with higher version. This step is also taken care by rootupgrade.sh script.

cvuqdisk à Available on Grid Infrastructure Media (under rpm folder)

rpm -e cvuqdisk
export CVUQDISK_GRP=oinstall
rpm -ivh cvuqdisk-1.0.7-1.rpm


SCAN VIPS to configure in DNS which resolves to lab-scan.hingu.net:

HERE is the existing DNS setup. In that setup, the below two files were modified with the entry in RED to add these SCAN VIPs into the DNS.



$TTL    1d
hingu.net.  IN    SOA   lab-dns.hingu.net. root.hingu.net. (
    100        ; se = serial number
    8h         ; ref = refresh
    5m         ; ret = update retry
    3w         ; ex = expiry
    3h         ; min = minimum

    IN    NS    lab-dns.hingu.net.

; DNS server

lab-dns    IN    A

; RAC Nodes Public name

node1          IN    A
node2          IN    A
node3          IN    A

; RAC Nodes Public VIPs

node1-vip      IN    A
node2-vip      IN    A
node3-vip      IN    A


lab-scan       IN    A
lab-scan       IN    A
lab-scan       IN    A

; Storage Network

nas-server IN    A
node1-nas  IN    A
node2-nas  IN    A
node3-nas  IN    A


$TTL    1d
@   IN    SOA   lab-dns.hingu.net. root.hingu.net. (
    100        ; se = serial number
    8h         ; ref = refresh
    5m         ; ret = update retry
    3w         ; ex = expiry
    3h         ; min = minimum

    IN    NS    lab-dns.hingu.net.

; DNS machine name in reverse
200        IN    PTR lab-dns.hingu.net.

; RAC Nodes Public Name in Reverse

1          IN    PTR node1.hingu.net.
2          IN    PTR node2.hingu.net.
3          IN    PTR node3.hingu.net.

; RAC Nodes Public VIPs in Reverse

51          IN    PTR      node1-vip.hingu.net.
52          IN    PTR      node2-vip.hingu.net.
53          IN    PTR      node3-vip.hingu.net.

; RAC Nodes SCAN VIPs in Reverse

151         IN    PTR      lab-scan.hingu.net.
152         IN    PTR      lab-scan.hingu.net.
153         IN    PTR      lab-scan.hingu.net.

Restart the DNS Service (named):

service named restart

NOTE: nslookup for lab-scan should return names in random order every time.

Network Time Protocol Setting (On all the RAC Nodes):
Oracle Time Synchronization Service is chosen to be used over the Linux system provided ntpd. So, ntpd needs to be deactivated and deinstalled to avoid any possibility of it being conflicted with the Oracle’s Cluster Time Sync Service (ctss).

# /sbin/service ntpd stop
# chkconfig ntpd off
# mv /etc/ntp.conf /etc/ntp.conf.org

Also remove the following file:


Network Service Cache Daemon (all the RAC nodes)

The Network Service Cache Daemon was started on all the RAC nodes.

Service nscd start

Create ASM Disks for diskgroup GIS_FILES to store 11gR2 OCR and Voting Disks
#oracleasm createdisk GISDSK01 /dev/add1
#oracleasm createdisk GISDSK02 /dev/ade1
#oracleasm createdisk GISDSK03 /dev/adi1
#oracleasm listdisks

On the rest of the Nodes:

oracleasm scandisks

Backing Up ORACLE_HOMEs/database:

Steps I followed to take the Backup of ORACLE_HOMEs before the upgrade:

On node1:

mkdir backup
cd backup

dd if=/dev/dev/raw1  of=ocr_disk_10gr2.bkp
dd if=/dev/dev/raw3  of=voting_disk_10gr2.bkp

tar cvf node1_crs_10gr2.tar /u01/app/oracle/crs/*
tar cvf node1_asm_10gr2.tar /u01/app/oracle/asm/*
tar cvf node1_db_10gr2.tar /u01/app/oracle/db/*
tar cvf node1_etc_oracle /etc/oracle/*

cp /etc/inittab etc_inittab

mkdir etc_init_d
cd etc_init_d
cp /etc/init.d/init* .

On node2:

mkdir backup
cd backup

tar cvf node2_crs_10gr2.tar /u01/app/oracle/crs/*
tar cvf node2_asm_10gr2.tar /u01/app/oracle/asm/*
tar cvf node2_db_10gr2.tar /u01/app/oracle/db/*
tar cvf node2_etc_oracle /etc/oracle/*

cp /etc/inittab etc_inittab

mkdir etc_init_d
cd etc_init_d
cp /etc/init.d/init* .

On node3:

mkdir backup
cd backup

tar cvf node3_crs_10gr2.tar /u01/app/oracle/crs/*
tar cvf node3_asm_10gr2.tar /u01/app/oracle/asm/*
tar cvf node3_db_10gr2.tar /u01/app/oracle/db/*
tar cvf node3_etc_oracle /etc/oracle/*

cp /etc/inittab etc_inittab

mkdir etc_init_d
cd etc_init_d
cp /etc/init.d/init* .

RMAN full database backup was taken.

Hide the 10gR2 CRS:

In order to install 11gR2 GI, it is required to hide the existing 10gR2 CRS so that 11gR2 GI is installed without any conflict with 10gR2 CRS.

Shutdown CRS on all the RAC nodes

crsctl stop crs

renamed these files/Directories

mv /etc/oracle /etc/oracle_bkp
mkdir /etc/init.d/bkp
mv /etc/init.d/init* /etc/init.d/bkp

removed below lines from the /etc/inittab (the inittab was already backed up in Pre-Upgrade tasks as well)

h1:35:respawn:/etc/init.d/init.evmd run >/dev/null 2>&1 </dev/null
h2:35:respawn:/etc/init.d/init.cssd fatal >/dev/null 2>&1 </dev/null
h3:35:respawn:/etc/init.d/init.crsd run >/dev/null 2>&1 </dev/null

removed the network socket files:

rm -rf /tmp/.oracle
rm -rf /var/tmp/.oracle

rebooted all the RAC nodes at this stage


Install 11gR2 Grid Infrastructure:

Grid Infrastructure installation process:

Installation Option:
 Install and Configure Grid Infrastructure for a Cluster
Installation Type:
Advanced Installation
Product Language:
Grid Plug and Play:
Cluster Name: lab
SCAN Name: lab-scan.hingu.net
SCAN Port: 1525
Configure GNS: Unchecked
                Cluster Node Information:
Entered the Hostname and VIP names of the Cluster Nodes.
Checked the SSH connectivity
Network Interface Usage:
OUI picked up all the interfaces correctly. I did not have to make any changes here.
Storage Option:
Automatic Storage Management (ASM)
Create ASM Disk Group:
Disk Group Name: GIS_FILES
Redundancy: Normal
ASM Password:
Use Same Password for these accounts. (Ignored password warnings.)
Failure Isolation:
Do not use Intelligent Platform Management Interface (IPMI)
Operating System Groups:
ASM Database Administrator (OSDBA) Group: dba
ASM Instance Administrator Operator (OSOPER) Group: oinstall
ASM Instance Administrator (OSASM) Group: oinstall
Installation Location:
Oracle Base: /u01/app/oracle
Software Location: /u01/app/grid11201
Create Inventory:
Inventory Directory: /u01/app/oraInventory
Prerequisite Checks:
No issue/Errors
Summary Screen:
Verified the information here and pressed “Finish” to start installation.

At the End of the installation, the root.sh script needed to be executed as root user.


After the successful completion of this script, the 11g R2 High Availability Service (CRS, CSS and EVMD) started up and running.
Verified that the status of the installation using below set of commands.

crsctl check cluster –all
crs_stat –t –v
crsctl check ctss

The GSD and OC4J resources are by default disabled. Enabled GSD them as below.

srvctl enable nodeapps –g
srvctl start nodeapps –n node1
srvctl start nodeapps –n node2
srvctl start nodeapps –n node3
srvctl enable oc4j
srvctl start oc4j

Invoked netca from 11gR2 Grid Infrastructure Home to reconfigure the listener “LISTENER”


[root@node2 node2]# srvctl config listener -l listener
Network : 1, Owner: oracle
Home: <CRS home>
End points: TCP:1521

--checking Cluster status
[root@node2 node2]#crs_ctl -t

HERE’s the detailed Screen Shots of Installing 11gR2 Grid Infrastructure

Move 10gR2 ASM Diskgroups to 11gR2 Grid Infrastructure:

·         Invoked the asmca from the 11gR2 Grid Infrastructure HOME (/u01/app/grid11201).
·         Mount the FRA and DATA diskgroup using ASMCA. This way, asmca registered and moved the DATA and FRA diskgroups to the 11gR2 GI.



HERE’s the detailed Screen Shots of Migrating 10gR2 ASM Disk Groups to 11gR2 Grid Infrastructure

Start the 10gR2 RAC Database using SQLPLUS.

While Starting the 10gR2 RAC database, the below error was received. This is because, as per Oracle, 11gR2 has dynamic configuration of cluster and 11gR1 or older releases have static configuration.  So, in order to run older version databases in 11gR2, the cluster configuration needs to be made persistent by pinning the nodes.

[oracle@node1 ~]$ which sqlplus
[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release - Production on Thu Oct 20 01:39:58 2011

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

Connected to an idle instance.

SQL> startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/labdb/spfilelabdb.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/labdb/spfilelabdb.ora
ORA-15077: could not locate ASM instance serving a required diskgroup
ORA-29701: unable to connect to Cluster Manager

/u01/app/grid11201/bin/crsctl pin css –n node1 node2 node3

[root@node1 ~]# crsctl pin -n node1 node2 node3
[root@node1 ~]#olsnodes -t -n

The labdb database was then started using sqlplus from 10gR2 home after pinning the node. Then I had registered labdb to 11gR2 Grid using the 10gR2 srvctl (/u01/app/oracle/db/bin/srvctl and  ORACLE_HOME set to 10gR2) . The srvctl to manage 10gR2 RAC database needs to be invoked from 10gR2 home itself until it is upgraded to 11R2 RAC.
[oracle@node2 ~]$ srvctl add database -d labdb -o /u01/app/oracle/db -p +data/labdb/spfilelabdb.ora -m hingu.net -y AUTOMATIC
[oracle@node2 ~]$ srvctl add instance -d labdb1 -i labdb1 -n node1
[oracle@node2 ~]$ srvctl add instance -d labdb2 -i labdb1 -n node2
[oracle@node2 ~]$
[oracle@node2 ~]$ srvctl add instance -d labdb3 -i labdb1 -n node3
[oracle@node2 ~]$ crs_ctl -t


Upgrade 10gR2 RAC Database to 11gR2 RAC:

·         Install the 11gR2 RAC database software
·         Move the Listener LAB_LISTENER to 11gR2 RAC Home.
·         Start Manual Process to upgrade the original labdb database from 10gR2 RAC to 11gR2 RAC.

Start the runInstaller from 11gR2 Real Application Cluster (RAC) Software Location:


Real Application Cluster installation process:

Configure Security Updates:
 Email: bhavin@oracledba.org
Ignore the “Connection Failed” alert.
Installation Option:
Install database software only
Node Selection:
Select All the Nodes (node1,node2 and node3)
Product Language:
Database Edition:
Enterprise Edition
Installation Location:
Oracle Base: /u01/app/oracle
Software Location: /u01/app/oracle/db11201
Operating System Groups:
Database Administrator (OSDBA) Group: dba
Database Operator (OSOPER) Group: oinstall
Summary Screen:
Verified the information here and pressed “Finish” to start installation.

At the End of the installation, the below scripts needs to be executed on all the nodes as root user.


Move the Listener “LAB_LISTENER” from 10gR2 RAC DB Home to 11gR2 RAC database Home:

Invoked the netca from 11gR2 RAC home (/u01/app/oracle/db11201) and added the listener LAB_LISTENER (port TCP:1530) to newly installed 11gR2 RAC home.
Copy the tnsnames.ora files from 10gR2 DB home to 11gR2 RAC home on all the nodes.

ssh node1 cp /u01/app/oracle/db/network/admin/tnsnames.ora /u01/app/oracle/db11201/network/admin/tnsnames.ora
ssh node2 cp /u01/app/oracle/db/network/admin/tnsnames.ora /u01/app/oracle/db11201/network/admin/tnsnames.ora
ssh node3 cp /u01/app/oracle/db/network/admin/tnsnames.ora /u01/app/oracle/db11201/network/admin/tnsnames.ora

Upgrade the Database labdb Manually:

This Metalink Note (ID 837570.1) was followed for manually upgrading database from 10gR2 RAC to 11gR2 RAC.

·         Ran the /u01/app/oracle/db11201/rdbms/admin/utlu112i.sql
·         Fixed the warning returned from above script regarding absolute parameter
·         Ignored the warnings regarding TIMEZONE as no action is needed for timezone file version if DB is or higher.
·         Ignored the warning regarding stale statistics and EM.
·         Purged the recycle bin using PURGE DBA_RECYCLEBIN
·         Copied the instance specific init files and password files from 10gR2 HOME to 11gR2 RAC Home.
·         Set the cluster_database to false
·         Stopped the database labdb. S
·         Set the 11gR2 RAC HOME
·         Updated the /etc/oratab file and modify the labdb HOME to 11gR2 HOME
·         Started the instance labdb1 on node1 using UPGRADE option of start command.
·         Ran the catupgrd.sql from $ORACLE_HOME/rdbms/admin of 11gR2.

[oracle@node1 ~]$ export ORACLE_SID=labdb1
[oracle@node1 ~]$ export ORACLE_HOME=/u01/app/oracle/db11201
[oracle@node1 ~]$ export PATH=$PATH:$ORACLE_HOME/bin:.
[oracle@node1 ~]$ sqlplus / as sysdba
SQL>startup upgrade
SQL>spool upgrade.log

·         Started the database instance on node1.
·         Updated the cluster_database to true in spfile
·         Re-started the database instance on all the nodes.

Post Upgrade Steps:

·         Ran the utlu112s.sql to get the status of the upgrade of each component.

·   Ran the catuppst.sql to perform upgrade actions that do not require database in UPGRADE mode.
·   Ran the utlrp.sql to recompile any INVALID objects
·  Upgraded the database configuration from 10gR2 to 11gR2 into the OCR by removing the labdb database and adding it back
[oracle@node1 ~]$ srvctl add database -d labdb -m hingu.net -o /u01/app/oracle/db11201 -p +data/labdb/spfilelabdb.ora  -y AUTOMATIC -a DATA,FRA
[oracle@node1 ~]$ srvctl add instance -d labdb -i labdb1 -n node1
[oracle@node1 ~]$ srvctl add instance -d labdb -i labdb2 -n node2
[oracle@node1 ~]$ srvctl add instance -d labdb -i labdb3 -n node3

[oracle@node1 ~]$ srvctl config database -d labdb

·         Added the service oltp to the 11gR2 RAC database.
oracle@node1 ~]# srvctl add service -d labdb -S oltp -r labdb1,labdb2,labdb3 -P BASIC

oracle@node1 ~]# srvctl start service -d labdb -S oltp
oracle@node1 ~]# srvctl status service -d labdd

Final CRS Stack after the upgrade:
[oracle@node2 ~]$ crs_ctl -t

Rebooted all the 3 RAC nodes and verified that all the resources come up without any issues/errors.



Popular posts from this blog

rman interview and scenario based questions and answer and also rman(backup and recovery) discussions panel

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

7 Steps to configure BDR replication in postgresql

PostgreSQL pgBadger