Racism is unacceptable and has no place in our bloggers community. #BlackLivesMatter #WhatMatters2020

25 November 2014

OPatch WLS-12c, OSB-11g(11.1.1.7)

OPatch is a Java-based utility that runs on all supported operating systems and requires installation of
the Oracle Universal Installer. It is used to apply patches to Oracle softwares.

Oracle has recently implemented a new patch nomenclature for Oracle products. The new patch names, as well as the previous Oracle Fusion Middleware 11g names, are provided for reference.

In previous releases of Oracle WebLogic Server, you can patch your WebLogic server software using a utility called Bea Smart Update (bsu). Smart Update is a standalone Java application that you use to upgrade the software installations quickly and easily with maintenance patches and maintenance packs.

For Oracle Fusion Middleware 12c (12.1.2), BSU is no longer supported. instead WebLogic server users can use OPatch to apply patches for both WebLogic Server and for Oracle Fusion Middleware.

OPatch offers many of the same features as Smart Update, but it has a different set of commands and command options.

OPatch can be found in the following location after you install any Oracle Fusion Middleware product:

ORACLE_HOME/OPatch

To run OPatch, simply run the opatch command in this directory.

For example, to view the list of commands available for OPatch on a UNIX system, enter the following:

$ ./opatch –help

The multiple commands can be used with opatch utility are:

Command: = apply      Example: opatch -help
Checkapplicable      opatch apply -help
Compare
lsinventory             Use: to check number of patches applies
lspatches               List out the number of patches
Napply                  to apply multiple patches in one go
Nrollback               to rollback multiple patch in one go
Rollback                to rollback a patch you applied //Syntax: opatch rollback –id 15343893 14342349
Query
version                 to check version of opatch
prereq
util


To verify that a patch can be applied to a specific Oracle home, use the -report argument to the OPatch apply command, as follows: 

$ opatch apply <path_to_patch_directory> -report

To apply a patch

$ ./opatch apply /tmp/15941858/

if opatch fails to find oraInst.loc or central Inventory

$ ./opatch lsinventory  -invPtrLoc ../oraInst.loc

Possible causes of opatch commands getting failed:
  • Dependency on other component
  • Corrupted patch zip file download
  • Downloaded or extracted the patch zip file under $ORACLE_HOME/inventory/oneoffs
  • OPatch version is too old
  • Patch was unzipped for installation in remote location ( NFS)
  • OPatch detects wrong Middleware Home in inventory.xml
which can be fixed, after correcting HOME NAME in inventory.xml which can be found at:
             /software/bea/Middleware/product/oraInventory_ver/ContentsXML/inventory.xml
<HOME_LIST>
<HOME NAME="OracleHome1" LOC="/software/bea/Middleware/product/version/" TYPE="O" IDX="1"/>
</HOME_LIST>
  • Prerequisite check "CheckActiveFilesAndExecutables" failed.
                    The details are:
                    Exception occurred : fuser could not be located:
                    UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.

The OPatch utility uses "fuser" on UNIX systems to check for active Oracle instances which is unavailable on the host so do the following:
    Set the environment variable OPATCH_NO_FUSER=true
    Shut down the WebLogic instances
    Run the OPatch utility
  • Opatch uplift : Doc ID 224346.1
- download p28186730_139424_Generic.zip for 12c
- unzip p28186730_139424_Generic.zip 
you will get a patch folder named - 6880880
$ cd $ORACLE_HOME/OPatch/
$ ./opatch version

if ask Include OPatch in PATH  export PATH=$ORACLE_HOME/OPatch:$PATH 
and run below command to uplift
$ <javaHome>/bin/java -jar 6880880/opatch_generic.jar -silent oracle_home=​<ORACLE_HOME>

ORACLE_HOME will be absolute path till your weblogic installation .
e.g /software/bea/wls/12.2.1.3/

if Opatch Fails With Error Code 255
that mean your installer doesn't want an opatch uplift and you need to rollback this opatch version

k/r, 
P

No comments:

Post a comment