Friday, January 11, 2013

Patching OBIEE 11g with OPatch


It is a good idea to make sure the PATH environment variable contains the %ORACLE_HOME%\OPatch directory amongst the others. Check if this is the case by running the following command at a new command prompt:
opatch version
If you see a version number and OPatch succeeded then the PATH variable is set up correctly. If not, edit the environment variable accordingly. Also check that ORACLE_HOME is set correctly.
Next we need to check the patch inventory is accessible:
opatch lsinv -jre %ORACLE_HOME%\jdk\jre
If this command does not complete successfully then there is a problem and you shouldn’t continue any further. You should see details of any previously applied patches followed by the message OPatch succeeded.


Unzip the patch and copy to the server somewhere [In this example we are installing patch 9884975 which has been placed in D:\incoming\Patches]
Depending on the patch contents you may need to stop the Admin and any Managed servers. I tend to do this anyway irrespective of the patch contents. Once that’s done…
cd D:\incoming\Patches\9884975
opatch apply -jre %ORACLE_HOME%\jdk\jre


(you can optionally add the -verbose switch to the above command if you want more logging and output)
Check the new patch appears in the inventory:
opatch lsinv -jre %ORACLE_HOME%\jdk\jre
Note that logging for OPatch can be found here:

%ORACLE_HOME%\cfgtoollogs\opatch
Finally restart the Admin server and all Managed servers to bring the system back up.