Previous |
Next |
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:
The local node is always patched first.
The local node is used as a base to patch the other nodes.
The user is prompted for the set of nodes to patch first from the remaining nodes.
For each node in this first set, the user is asked to stop the instance and then the patch is propagated to that node before continuing to the next node. When the initial set of nodes has been patched, the user is asked to shut down the remaining nodes.
After the local node is patched, the patch is propagated to the last set of nodes and the inventory is updated. The last instances are stopped on the remote nodes. You can then start up the patched nodes (the first set of nodes) before patching the remaining nodes.
To apply a patch to your cluster database using the minimum downtime method:
Change to the directory where the unzipped patch is staged on disk, for example:
$ cd Oracle_home/EMStagedPatches/4519934/4519934
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
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"
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
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.
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.
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"
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
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