1. Documentation -> Masters Book List -> Universal Installer and OPatch User’s Guide for Windows and UNIX -> 7 Patching Oracle Software With OPatch
2. This is one of the new Objectives That Have Appeared after the Changes in the program of the OCM exam. In overall, installing a patch has not mystery. Get off the patch, unzip, get into the folder, execute “opatch apply” and ready. If something goes wrong, “opatch rollback”.
The installation of a patch can be complicated When You Have More complex architectures: such as RAC or Oracle Restart. In our case, we will install the latest PSU (Patch Set Update) to the date of this article (16,083,653 Patch: GRID INFRASTRUCTURE UPDATE PATCH SET 184.108.40.206.6 – 220.127.116.11.6 PSU INCLUDES DB). Also, When a new patch is installed, it is Often Necessary to update the OPatch own tool. So Also install the latest version of OPatch.
This step requires That You Have installed GI, if You Have not Already done so, Will Have to Wait Until You have completed the section Grid Infrastructure.
3. We can downloaded the patch for Linux x86 (p16083653_112030_LINUX.zip) and updated OPatch tool (p6880880_112000_LINUX.zip) and copy them to the /u02/stage of the CMO machine.
· P16083653_112030_LINUX.zip -> /u02/stage
· P6880880_112000_LINUX.zip -> /u02/stage
update the OPatch HOME tool in the GI and the DB.
# Unzip software
cd / u02 / stage unzip p6880880_112000_LINUX.zip rm p6880880_112000_LINUX.zip
# Replaced OPatch in the RDBMS HOME
mv /u01/app/oracle/product/11.2.0/dbhome_1/OPatch /u01/app/oracle/product/11.2.0/dbhome_1/OPatch_bkp cp -pR /u02/stage/OPatch /u01/app/oracle/product/11.2.0/dbhome_1/OPatch # Replaced OPatch in GI HOME # These commands must run as root, as the GI HOME has root as owner mv /u01/app/11.2.0/grid/OPatch /u01/app/11.2.0/grid/OPatch_bkp cp -pR /u02/stage/OPatch /u01/app/11.2.0/grid/OPatch
5.We check that OPatch has been updated. In my case I have updated to version 18.104.22.168.4.
/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch version /u01/app/11.2.0/grid/OPatch/opatch version
6. Finally install the PSU 22.214.171.124.6.
I followed the steps in MOS Note 1494646.1. The most important point is that we are installing the patch on Oracle Restart, then the patch itself was ordered to stop and raise all the resources automatically.
# Unzip the patch cd / u02 / stage unzip p16083653_112030_LINUX.zip rm p16083653_112030_LINUX.zip # Generate COM file responses required for installation of the patch (MOS 966023.1) # Some users have reported that emocmrsp command fails to find JAVA # The next session variable fix the problem (Credits to Robert Davtyan) export JAVA_HOME = /u01/app/oracle/product/11.2.0/dbhome_1/jdk /u01/app/11.2.0/grid/OPatch/ocm/bin/emocmrsp -no_banner -output /u02/stage/config.rsp # Installing the patch (run as root on the CMO VM) /u01/app/11.2.0/grid/OPatch/opatch auto /u02/stage -ocmrf /u02/stage/config.rsp
7. Within the post-patching tasks, we must update the catalog of the DB. We perform the following tasks.
# Entered the DB sqlplus / as sysdba And run: @catbundle.sql psu apply
8. validate the correct installation of the patch in both HOME (GI and RDBMS).
/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch lsinventory /u01/app/11.2.0/grid/OPatch/opatch lsinventory
9. We delete the files from the installation of the patch.
rm rf /u02/stage/ *
10. Now let’s make a quick installation of a simple patch (eg. P13429702_112030_LINUX).
# We place the patch in the /u01/stage
ls -l /u01/stage/p13429702_112030_LINUX.zip
# We unpack and we are in the unzipped directory
# We review the README.txt file for details of patching
# Launched the installation mode ONLINE (sustiumos ********** chain because the keyword you have) ORACLE_HOME/OPatch/opatch apply online -connectString $ OCM: sys: ***********:
# Validate that it is properly installed
$ ORACLE_HOME/OPatch/opatch lsinventory | grep 13429702