Wednesday, June 30, 2010

Upgrading 10.2.0.5 Clusterware, ASM, RAC to 11.1.0.7

This uses the installation and databases created in installing 10gR2 on RHEL5, which uses raw devices for OCR, Vote, ASM spfile and ASM disks (instead of ASMLib)

This is a brief blog with only the main points. More on metalink note 338706.1 and Oracle upgrade guide

Upgrade the clusterware to 11.1.0.6


1. Run preupdate.sh as root user, which is available in the clusteware installation.

2. runInstaller, it automatically selects the existing clusterware installation, click next, next.... and install.

3. After the installation run rootupgrade.sh as root
[root@hpc1 oracle]# /opt/app/crs/product/10.2.0/crs/install/rootupgrade
Checking to see if Oracle CRS stack is already up...

copying ONS config file to 11.1 CRS home
/bin/cp: `/opt/app/crs/product/10.2.0/crs/opmn/conf/ons.config' and `/opt/app/crs/product/10.2.0/crs/opmn/conf/ons.config' are the same file
/opt/app/crs/product/10.2.0/crs/opmn/conf/ons.config was copied successfully to /opt/app/crs/product/10.2.0/crs/opmn/conf/ons.config
Oracle Cluster Registry configuration upgraded successfully
Adding daemons to inittab
Attempting to start Oracle Clusterware stack
Waiting for Cluster Synchronization Services daemon to start
Cluster Synchronization Services daemon has started
Event Manager daemon has started
Cluster Ready Services daemon has started
Oracle CRS stack is running under init(1M)
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 1: hpc1 hpc1-pvt hpc1
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully
CRS stack on this node, is successfully upgraded to 11.1.0.6.0
Checking the existence of nodeapps on this node
Creating '/opt/app/crs/product/10.2.0/crs/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /opt/app/crs/product/10.2.0/crs/install/paramfile.crs
4. Click OK on OUI which runs the cluvfy

5. All done! clusterware (on 11.1.0.6), including ASM and RAC (on 10.2.0.5) is up and running.
[oracle@hpc1 clusterwaer ent11g2]$ crsctl query crs softwareversion hpc1
Oracle Clusterware version on node [hpc1] is [11.1.0.6.0]
[oracle@hpc1 clusterwaer ent11g2]$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.1.0.6.0]


Upgrade the clusterware to 11.1.0.7


1. runInstaller

2. Click bunch of next buttons and install and then in the end run root111.sh as root user
[root@hpc1 oracle]# /opt/app/crs/product/10.2.0/crs/install/root111.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /opt/app/crs/product/10.2.0/crs
Relinking some shared libraries.
Relinking of patched files is complete.
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.
.
11107 patch successfully applied.
clscfg: EXISTING configuration version 4 detected.
clscfg: version 4 is 11 Release 1.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: hpc1 hpc1-pvt hpc1
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully
Creating '/opt/app/crs/product/10.2.0/crs/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /opt/app/crs/product/10.2.0/crs/install/paramfile.crs
Setting cluster unique identifier
Restarting Oracle clusterware
Stopping Oracle clusterware
Stopping resources.
This could take several minutes.
Successfully stopped Oracle Clusterware resources
Stopping Cluster Synchronization Services.
Shutting down the Cluster Synchronization Services daemon.
Shutdown request successfully issued.
Waiting for Cluster Synchronization Services daemon to stop
Cluster Synchronization Services daemon has stopped
Starting Oracle clusterware
Attempting to start Oracle Clusterware stack
Waiting for Cluster Synchronization Services daemon to start
Waiting for Cluster Synchronization Services daemon to start
Waiting for Cluster Synchronization Services daemon to start
Waiting for Cluster Synchronization Services daemon to start
Cluster Synchronization Services daemon has started
Event Manager daemon has started
Cluster Ready Services daemon has started
3. All done!! clustware is now upgraded to 11.1.0.7
[oracle@hpc1 ~ ent11g2]$ crsctl query crs softwareversion hpc1
Oracle Clusterware version on node [hpc1] is [11.1.0.7.0]
[oracle@hpc1 ~ ent11g2]$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.1.0.7.0]


Upgrading ASM & RAC to 11.1.0.7

This setup used a single home for both ASM and Database. If a separate ASM home is installed as part of the upgrade then substitute it when appropriate

1. This is from the upgrade guide "You must choose an Oracle home directory for Oracle Database 11g Release 1 (11.1) that is separate from the Oracle home directory of your current release. You cannot install the new software into the same Oracle home directory as your current release, unless you are installing an Oracle Database 11g Release 1 (11.1) patch set release. For a patch set release, you can use the same Oracle Database 11g Release 1 (11.1) Oracle home."

2. Install the Oracle database 11g software (11.1.0.6) on a different location while clusterware is running as a cluster installation.

3. Upgrade it to 11.1.0.7

4. Upgrading ASM (more metalink note 736127.1)

4.1 Shutdown the instances running on the ASM instances to be upgraded.

4.2 Start the asm instance from the 10gR2 home if not already started.

4.3 From the newly installed 11gR1 home run dbua and select upgrade ASM instance


4.4 If a new listener is not created on 11gR1 then select yes on listener upgrade.


4.5 Click next-next and finish


4.6 Watch the progress


4.7 ASM upgrade is done!


5. Upgrading the RAC Database

5.1 Start the instances using 10g home

5.2 Run dbua from the new 11g home

5.3 Select upgrade database, continue as usual and click finish


5.4 During the upgrade got the following error but was able ignore and continue (screenshot from the summary at the end of upgrade)


5.5 End of upgrade with spatial and OLAP API invalid


5.6 Upgrade result


5.7 New entries automatically added to /etc/oratab
+ASM1:/opt/app/oracle/product/11.1.0/clusdb:N
clusdb:/opt/app/oracle/product/11.1.0/clusdb:N
5.8 Looking at the dba_registry from sql prompt didn't show olap as invalid.
COMP_NAME                      STATUS
------------------------------ ----------
Oracle Enterprise Manager VALID
OLAP Catalog VALID
Spatial INVALID
Oracle Multimedia VALID
Oracle XML Database VALID
Oracle Text VALID
Oracle Data Mining VALID
Oracle Expression Filter VALID
Oracle Rules Manager VALID
Oracle Workspace Manager VALID
Oracle Database Catalog Views VALID

COMP_NAME STATUS
------------------------------ ----------
Oracle Database Packages and T VALID
ypes

JServer JAVA Virtual Machine VALID
Oracle XDK VALID
Oracle Database Java Packages VALID
OLAP Analytic Workspace VALID
Oracle OLAP API VALID
Oracle Real Application Clusters VALID
Tried to run the DB scripts to fix the spatial component problem but still ended up with
OBJECT_NAME                    OBJECT_TYPE         STATUS
------------------------------ ------------------- ----------
QRY2OPT FUNCTION INVALID
SDO_PQRY FUNCTION INVALID
Googling showed it maybe related to spatial component version 11.1.0.7 specific errors. Didn't investigate any further.