# ASM Upgrade - Oracle 11g

Before you start the upgrade process, you should install the Oracle Data base 11g software toanother ORACLE_HOME directory. Similar to the database upgrade method, there are two approaches to upgrading ASM to Oracle Database 11g ASM:

• Using the Database Upgrade Assistant (DBUA)

The manual upgrade process for ASM involves installing the ASM binary software to another directory and switching the ORACLE_HOME to the new location.You must perform some prerequisite steps prior to switching to the new ORACLE_HOME. Although you need to modify the diskgroup compa tibility parameter, you can do this later.

Let’s look at the steps required to perform a manual upgrade. First, the /etc/oratab or/var/opt/oracle/oratab file needs to be updated with the new ASM ORACLE_HOME location.Next, the ASM init.ora or spfile file needs to be copied from the old ORACLE_HOME to the new ORACLE_ HOME. Appropriate changes, such as the directory locations for the diag and dump directories, need to be modi fied. If you have a password file, you need to copy the password file from the old ORACLE_HOME to the new ORACLE_HOME.

If you are upgrading a non-RAC ASM instance, you will be required to reconfigure the Oracle CSS using the new ORACLE_HOME. You can do this by executing the localconfig command from the Oracle Database 11g ASM ORACLE_HOME before upgrading ASM:

cd $ORACLE_HOME/bin [root@rac103 bin]# ./localconfig reset Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. Configuration for local CSS has been initialized Stale CSS daemon is running... killing it now Cleaning up Network socket directories Setting up Network socket directories Adding to inittab Startup will be queued to init within 30 seconds. Checking the status of new Oracle init process... Expecting the CRS daemons to be up within 600 seconds. Cluster Synchronization Services is active on these nodes. rac103 Cluster Synchronization Services is active on all the nodes. Oracle CSS service is installed and running under init(1M) Once the CSS configuration is complete, you need to change your ORACLE_HOME to the new Oracle version 11.1 ORACLE_HOME and start the ASM instance. When everything is up and running,grant the new sysasm role to the administrative account user (sys), as shown here: SQL> grant sysasm to sys; If you have obsolete initialization parameters, you can address them now.To get a listing of all the obsolete initialization parameters, please refer to the ASM alert log file. Upgrading Using DBUA You can also perform the ASM upgrade to Oracle Database 11g using DBUA. Since Oracle Database 10g,Oracle development invested an enormous amount of hours on the upgrade utilities to deliver ease-of-upgrade processes.Similar to providing a simplified upgrade process in Oracle Database 10g, DBUA can be used to upgrade the ASM instance from Oracle Database 10g to Oracle Database 11g. The DBUA utility performs numerous activities during the upgrade process. First,the password file is copied from the Oracle 10.x ORACLE_HOME to the Oracle 11.1 ORACLE_HOME.Second, the oratab file is updated, and when the upgrade is complete, sys is granted the sysasm role. During the upgrade process, it will convert the init$ORACLE_SID.ora file to an spfile.In addition,the spfile will be relocated to the ASM instance if it was not there before the upgrade process.To initiate the upgrade process, change the directory to the new $ORACLE_HOME/bin directory, and launch DBUA: [oracle@rac11.dbaexpert.com~]$ cd $ORACLE_HOME/bin [oracle@rac11.dbaexpert.com~]$ ./dbua

The initial screen of the DBUA utility takes you to the ASM upgrade Welcome page, as shown in Figure.

Figure The initial Welcome page

Click the Next button,and the DBUA utility will redirect you to the Upgrades Operations page.At this point,click the Upgrade Automatic Storage Management Instance radio button,and click the Next button, asillustrated on Figure.

Just like the database,ASM upgrades can be achieved from different versions of Oracle.Please refer to Chapter 1 for the complete list of all supported versions.Clicking the Next button will take you to the Summary page,as shown in Figure once all the information is collected about the source ASM ORACLE_HOME and target ORACLE_HOME.

Figure Summary page

You must click the Finish button.Once the ASM upgrade is complete,the Progress page will result in a 100 percent completion status, as shown in Figure.

You will receive a prompt to click the OK button to view the Upgrade Results page, as shown in Figure.

After a successful upgrade, you will see the following message in the Unix window that initiated the DBUA utility:Database upgrade has been completed successfully, and the database is ready to use.

In Oracle Database 11g, a greater emphasis is on the ORACLE_BASE envi ronment variable.In fact, oracle_base becomes one of the new underscore initialization parameters.The log files associated with the ASM upgrade using the DBUA utility are placed in the \$ORACLE_BASE/cfgtoollogs/dbua/logs directory.You can go to this directory and view the ASM Up grade.log file for additional details.

Oracle Database 11g introduces the ability to perform rolling upgrades. Since this is introduced as a feature in Oracle Database 11g Release 1, customers will not be able to utilize it until Oracle Database 11g Release 2 or future patchsets.

If you are upgrading from Oracle Database 10g ASM, you will not be able to utilize the rolling-upgrade feature.Prior to Oracle Database 11g,only the Oracle Clusterware component supported the rolling-upgrade concept.

Prior to Oracle Data base 11g, Data Guard also supported the concept of rolling upgrades with special setup considerations.Separating theASM_HOME directory is considered a best-practice implementation.With the support of rolling upgrades in Oracle Database 11g ASM, splitting ASM home from the RDBMS home looks ever more appealing.

Typically, when applying a patch to an Oracle environment, the RAC clusterware is patched first in a rolling-upgrade fashion.Once thesuccessful upgrade of the clusterware is confirmed, the ASM home software binary is upgraded.To upgrade the ASM binaries in Oracle Database 10g and 11g Release 1, all of the ASM instances in the RAC must be shut down.

Once the ASM instance upgrade is validated, the RDBMS software stack and database environment is upgraded.Typically, the last environment to upgrade or patch is the RDBMS software stack, unless a known bug or issues in the clusterware or ASM prevents it otherwise.

The rolling upgrade of ASM will provide a higher level of availability for RAC implementations. Similar to the clusterware rolling-upgrade feature introduced in Oracle Database 10g, the Oracle ASM rolling-upgrade feature will provide higher uptime for RAC environments.

To perform a rolling upgrade, you must place the ASM instance in rolling-upgrade mode.In addition, you should make sure all the ASM instances are at the same Oracle version.To enable the ASM instance for rolling migration mode, you can use this alter system syntax to start rolling migration to [database_version_number]:

SQL> alter system start rolling migration to 11.2.0.2;

This command does not actually perform the rolling migration butcommunicates with all the ASM instances in the RAC.This command informsthe other ASM instance(s) of RAC that it is preparing to perform an upgrade and the states will be temporarily different.Once the rolling migration is enabled, you can query each ASM instance to view the current state of the ASM:

select sys_context ('sys_cluster_properties', 'cluster_state')
from dual
SQL> /
SYS_CONTEXT('SYS_CLUSTER_PROPERTIES','CLUSTER_STATE')
-----------------------------------------------------
Normal

If the ASM instance were participating in a rolling migration, the output of this query would indicate a “Rolling Migration” status.Once you confirm the state of the ASM instance is in rolling migration, you can now safely shut down the ASM instance and apply the software upgrade to the ASM home.Once you confirm the successful upgrade of the ASM software stack, you can now start the ASM instance, which will mount all the diskgroups.

Once upgraded, the ASM participates in the RAC in a different version from the other ASM instances. Only in the rolling migration state are different versions of the ASM instance(s) permissible. It is required that each ASM instance will be put into a rolling migration mode and shut down to prepare for the software upgrade.

A Step-by-Step Approach to Rolling Upgrades

Here is the step-by-step process to perform a rolling ASM upgrade:

1. Put the ASM instance in rolling migration mode, and communicate the status to the rest of the ASM instances. If new ASM instances join the RAC cluster,it is informed that the ASM instances are in rolling-upgrade mode:SQL> alter system start rolling migration to 11.2.0.2;
2. Shut down the ASM instance.
3. Apply the software upgrade to the ASM home.
4. Restart the ASM instance.
5. Repeat steps 3 and 4 for the remaining ASM instances in the cluster.

During the ASM upgrade mode, ASM functionality is reduced. Only certain operations are permissible during this mode:

• Mount diskgroup
• Unmount diskgroup
• Database file operations,such as file open,close, resize, delete
• ASM and database instance shutdown, startup, and recovery
• Limited access to fixed views and packages These are the disallowed operations:
• Rebalance