Your browser does not support JavaScript. This help page requires JavaScript to render correctly.
Skip Headers
Previous
Previous
 
Next
Next

Minimum Downtime Patching

In minimum downtime patching, one set of nodes is shut down and the patch is applied to those nodes. After the first set of nodes has been patched, the second set of nodes is shut down. The first set of nodes is then restarted and the patch is applied to the second set of nodes. After the patch has been applied to the second set of nodes, those nodes are restarted. This method leads to less downtime for Oracle RAC, compared to having all the nodes shut down at the same time.

When you use the minimum downtime patching method, the following actions occur:

To apply a patch to your cluster database using the minimum downtime method:

  1. Change to the directory where the unzipped patch is staged on disk, for example:

    $ cd Oracle_home/EMStagedPatches/4519934/4519934
    
  2. Stop all user applications that use the Oracle RAC home directory for the group of nodes being patched. For example, to stop Enterprise Manager Database Control on the local node, use the following command, where Oracle_home is the home directory for your Oracle RAC installation:

    $ Oracle_home/bin/emctl stop dbconsole
    
  3. Shut down all Oracle RAC instances on the local node. To shut down an instance for an Oracle RAC database, enter a command similar to the following example, where Grid_home is the home directory for your Oracle Grid Infrastructure installation, sales is the name of the database, and sales1 is the name of the instance:

    $ CRS_home/bin/srvctl stop instance -d sales -i "sales1"
    
  4. Make sure the ORACLE_HOME environment variable points to the software directory you want to patch, for example:

    $ echo $ORACLE_HOME
    /u01/app/oracle/11gR2/db_1
    
  5. Use the following command from within the patch directory:

    $ opatch apply -minimize_downtime
    

    If you run the OPatch command from the directory where the patch is staged on disk, you do not need to specify the patch ID.

    OPatch asks if you are ready to patch the local node. After you confirm that the Oracle RAC instances on the local node have been shut down, OPatch applies the patch to the Oracle home directory on the local node. You are then asked to select the next nodes to be patched.

  6. After you shut down the Oracle RAC instances on the other nodes in the cluster, you can restart the Oracle RAC instance on the local node. Then, instruct OPatch that you are ready to patch the remaining nodes.

  7. After all the nodes have been patched, restart the Oracle RAC instances on the other nodes in the cluster. The following command shows how to start the sales2 instance for the Oracle RAC database named sales:

    $ CRS_home/bin/srvctl start instance -d sales -i "sales1"
     
    
  8. Verify that all the nodeapps were restarted on the nodes in the cluster.

    $ crsctl check crs
    

    If any of the node applications did not restart, use the SRVCTL utility to restart them. For example, you can use commands similar the following to restart the listener on the docrac1 node, where Grid_home is the home directory of your Oracle Grid Infrastructure installation:

    $ CRS_home/bin/srvctl start listener -n docrac1
     
    
  9. Run any post-patch scripts that are mentioned in the patch instructions, for example:

    $ sqlplus /nolog 
    SQL> connect sys/password@sales1 AS SYSDBA
    SQL> @Oracle_home/cpu/CPUOct2007/catcpu.sql
    SQL> @Oracle_home/rdbms/admin/utlrp.sql
    SQL> exit
    

Related Topics

Preparing to Use OPatch

Using DB Control to Apply Patches to a Cluster Database

Applying Patch Sets

Troubleshooting Patch Deployment

Oracle Universal Installer and OPatch User's Guide for Windows and UNIX