How to apply a PSU patching to all my ORACLE_HOMES at single shot in RAC node by node

How to apply a PSU patching to all my ORACLE_HOMES at single shot in RAC node by node


++++++++++++++++++++++++++++
Steps and different scenario:
++++++++++++++++++++++++++++
Case 1: Patching Oracle RAC Database Homes and the GI Home Together
Follow the instructions in this section if you would like to patch all the Oracle RAC database homes of release version 11.2.0.3 and the 11.2.0.3 GI home.
Case 1.1: GI Home Is Not Shared
Case 1.1.1: ACFS File System Is Not Configured and Database Homes Are Not Shared
Follow these instructions in this section if the GI home is not shared and none of the Oracle database homes is shared.
As root user execute the following command on each node of the cluster:
# opatch auto  -ocmrf 
Case 1.1.2A: Patching the GI Home and Database Home Together, the GI Home Is Not Shared, the Database Home Is Shared, ACFS May Be Used
  1. From the Oracle database home, make sure to stop the Oracle RAC databases running on all nodes.
    As the database home owner execute:
    $ /bin/srvctl stop database –d 
    
  2. On the 1st node, unmount the ACFS file systems.
    Follow the instructions in the following  My Oracle Support Document for unmounting ACFS file systems:
    1494652.1 How to Mount or Unmount ACFS File System While Applying GI Patches?.
  3. On the 1st node, apply the patch to the GI Home using the opatch auto command.
    As root user, execute the following command:
    # opatch auto  -oh  -ocmrf 
    
  4. If the message, "A system reboot is recommended before using ACFS” is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.
  5. On the 1st node, remount ACFS file systems.
    Follow the instructions in the following  My Oracle Support Document for mounting ACFS file systems:
    1494652.1 How to Mount or Unmount ACFS File System While Applying GI Patches?.
  6. On the 1st node, apply the patch to the Database home using the opatch auto command. Since the Database home is shared, this operation will patch the Database home across the cluster. Note that a USM only patch cannot be applied to a database home.
    As root user, execute the following command:
    # opatch auto  -oh  -ocmrf 
    
  7. On the 1st node only, restart the Oracle instance which you have previously stopped in Step 1.
    As the database home owner execute:
    $ /bin/srvctl start instance –d  -n 
    
  8. On the 2nd (next) node, unmount the ACFS file systems.
    Follow the instructions in the following  My Oracle Support Document for unmounting ACFS file systems:
    1494652.1 How to Mount or Unmount ACFS File System While Applying GI Patches?.
  9. On the 2nd node, apply the patch to GI Home using the opatch auto command.
    As root user, execute the following command:
    # opatch auto  -oh  -ocmrf 
    
  10. If the message, "A system reboot is recommended before using ACFS” is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.
  11. On the 2nd node, running the opatch auto command in Step 9 will restart the stack.
  12. On the 2nd node, remount ACFS file systems.
    Follow the instructions in the following  My Oracle Support Document for mounting ACFS file systems:
    1494652.1 How to Mount or Unmount ACFS File System While Applying GI Patches?.
  13. On the 2nd node only, restart the Oracle instance which you have previously stopped in Step 1.
    As the database home owner execute:
    $ /bin/srvctl start instance –d  -n 
    
  14. Repeat Steps 8 through 13 for all remaining nodes of the cluster.
Case 1.1.2B: Patching the GI Home and the Database Home Together, the GI Home Is Not Shared, the Database Home Is Not Shared, ACFS May Be Used
For each node, perform the following steps:
  1. On the local node, unmount the ACFS file systems.
    Follow the instructions in the following  My Oracle Support Document for unmounting ACFS file systems:
    1494652.1 How to Mount or Unmount ACFS File System While Applying GI Patches?.
  2. On the local node, apply the patch to the GI home and to the Database home.
    As root user, execute the following command:
    # opatch auto  -ocmrf 
    
    This operation will patch both the CRS home and the Database home.
  3. If the message, "A system reboot is recommended before using ACFS” is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.
  4. The opatch auto command will restart the stack on the local node and restart the Databases on the local node.
  5. Repeat Steps 1 through 3 for all remaining nodes of the cluster.
Case 1.2: GI Home Is Shared
Follow these instructions in this section if the GI home is shared.

Note:
Patching a shared GI home requires shutdown of Oracle GI stack on all the remote nodes in the cluster. This also means you need to stop all Oracle RAC databases which depend on GI stack, ASM for data files, or an ACFS file system. 
  1. From the Oracle database home, make sure to stop the Oracle RAC databases running on all nodes.
    As Oracle database home owner:
    $ /bin/srvctl stop database –d 
    
    ORACLE_HOME: Complete path of the Oracle database home.
  2. Make sure the ACFS file systems are unmounted on all the nodes.
    Follow the instructions in the following  My Oracle Support Document for unmounting ACFS file systems:
    1494652.1 How to Mount or Unmount ACFS File System While Applying GI Patches?.
  3. As root user, execute the following on all the remote nodes to stop the CRS stack:
    # /bin/crsctl stop crs
    
  4. Patch the GI home.
    On local node, as root user, execute the following command:
    # opatch auto  -oh  -ocmrf 
    
  5. If the message, "A system reboot is recommended before using ACFS” is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.
  6. On each remote node:
    1. As root user, run:
      # /crs/install/rootcrs.pl -patch
      
    2. If the message, "A system reboot is recommended before using ACFS” is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.
    3. Restart the stack on each remote node.
      As root user execute:
      # /bin/crsctl start crs
      
  7. Mount ACFS file systems.
    Follow the instructions in the following  My Oracle Support Document for mounting ACFS file systems:
    1494652.1 How to Mount or Unmount ACFS File System While Applying GI Patches?.
  8. For each Oracle RAC database home, execute the following command on each node if the database home software is not shared. Note that a USM only patch cannot be applied to a Database home.
    For each database home execute the following as root user:
    # opatch auto  -oh  -ocmrf 
    
    ORACLE_HOME: Complete path of Oracle database home.

    Note:
    The previous command should be executed only once on any one node if the database home is shared. 
  9. Restart the Oracle databases that you have previously stopped in step 1.
    As the database home owner execute:
    $ /bin/srvctl start database –d 
    
Reference:
Readme - Patch Installation and Deinstallation For 11.2.0.3.x GI PSU [ID 1494646.1]


Rolling Patch - OPatch Support for RAC [Note 244241.1]
Patch 11gR2 Grid Infrastructure Standalone (Oracle Restart) [Note 1089476.1]
Minimal downtime patching via cloning 11gR2 ORACLE_HOME directories [Note 1136544.1]


============================================================================

Comments

Post a Comment

Oracle DBA Information