11.2.0.2 Upgrade with Standby on RAC

I have been working on upgrading an existing 11.1.0.7 database to 11.2.0.2. This database is on a RAC cluster on Oracle Enterprise Linux 5. After successfully upgrading Oracle Clusterware to Oracle Grid Infrastructure 11.2.0.2, I was looking towards upgrading the database next.

The last piece you need to know is that this database is part of a Data Guard configuration with a Standby database running on a 2-node RAC cluster as well. I poured through all of the documentation and did exhaustive searches on Metalink and Google to find out how to handle the database upgrade when a RAC Standby database is involved.

The documentation for Data Guard was pretty clear that I was to disable the DG Broker during the upgrade. No problem. That is pretty easy. Before the upgrade began, I did the following:


1. alter database dg_broker_start=false scope=both;
The above was done in both the Primary and Standby databases.
2. dgmgrl
a. connect /
b. disable configuration;

The documentation was also pretty clear that to upgrade the Standby, you start the Standby with the 11.2.0.2 binaries and then upgrade the primary. When you upgrade the primary, logs will be shipped to the standby and when those logs are applied, the standby database is also upgraded. That sounds simple enough, but its not so easy when the Standby is part of a RAC cluster.

My initial attempt was to use the 11.2.0.2 version of srvctl to start the standby database in MOUNT mode but the OCR does not know of the standby running in this ORACLE_HOME directory. So an error is raised. Instead, use SQL*Plus to start one node of the Standby database in MOUNT mode:


1. copy your INIT.ORA, SPFILE, and password from file the old ORACLE_HOME/dbs to the new ORACLE_HOME/dbs directory.
2. sqlplus /nolog
3. connect / as sysdba
4. startup mount

Do not issue the ALTER DATABASE command to start Managed Recovery. At this point, the Standby is running on the 11.2.0.2 binaries. If you look at the Primary database’s alert log, you may see some errors that the standby is running a different version. This is to be expected. At this point, you can now upgrade the Primary database. I used the DBUA assistant to perform my upgrade. When the DBUA starts the primary on the new 11.2.0.2 version, both the primary and the standby will be on the same version. If you use the DBUA to perform your upgrade, you will be given the option to turn off archiving. DO NOT TURN OFF ARCHIVING! You need archiving so that the archived redo logs will be shipped to the Standby database. When you press Next in the DBUA to move past the screen that gives you this option, you will be given a warning that tells you turning off archiving will result in a quicker upgrade. Tell the DBUA utility that you are aware of this fact and that you know what you are doing.
To get viagra samples cheap full effect, you should take it from the professionals and the experienced. People that are habitual to drugs, smoking and alcohol abuse often limit lowest prices viagra the blood flow to the penile region. There are many websites which are totally dedicated to provide quality male enhancement pills to the consumers. discount cialis Erectile Dysfunction drugs such as Kamagra and best viagra price e readily available on the market and have been used to treat impotence since ancient times.
So after a successful upgrade, you are left with the Primary database upgraded to the 11.2.0.2 version. The Standby database is sitting there running as a single-instance database but has yet to apply the logs. Also at this point, the OCR thinks the Standby should be running out of the old 11.1.0.7 home. This is the part that I could not find documented anywhere so I am documenting it here. To get the 11.2 Standby in the OCR, do the following:


1. SHUTDOWN IMMEDIATE the current single-instance Standby database
2. Set your environment to the old ORACLE_HOME.
3. srvctl remove instance -d db_name -i instance_name
4. Repeat the above for all instances in your Standby RAC cluster.
5. srvctl remove database -d db_name
6. Set your environment to the new ORACLE_HOME.
7. srvctl add database -d db_name -o NEW_ORACLE_HOME -p /directory/spfile -c RAC -r PHYSICAL_STANDBY -s MOUNT -t IMMEDIATE
8. srvctl add instance -d db_name -i instance_name
9. Repeat the above for all instances in your Standby RAC cluster.

Your Standby is now registered with the OCR for the new version. You can start it and apply managed recovery.

1. srvctl start database -d db_name -o mount
2. alter database recover managed standby database disconnect;

Now that the Standby is in Managed Recovery, it will apply all the changes that upgraded the Primary to the new database version! The last thing that is left is to start DG Broker and enable the configuration.

I hope this helps someone else in the future.