Tuesday 24 January 2017

Applying Patch sets 23743997,16702086 and 16205615 on Weblogic server, SOA and OSB

Applying Patch sets 23743997,16702086 and 16205615 on Weblogic server, SOA and OSB

High level steps:

Weblogic: Pre-Installation Instructions-(23743997)
-------------------------------------------
    
  $ . /u9000/app/oracle/product/ofm_11.1.1.6/fmw/wlserver_10.3 /server/bin/setWLSEnv.sh 

                                $ java weblogic.version

     PATCH_ID - K25M
     Patch number - 23743997

                1. Stop all weblogic services

                2. unzip p23743997_1036_Generic.zip to /u9000/app/oracle/product/ofm_11.1.1.6/fmw/utils/bsu/cache_dir or any local directory

                3. Navigate to the /u9000/app/oracle/product/ofm_11.1.1.6/fmw/utils/bsu directory

                4. ./bsu.sh -install -patch_download_dir=/u9000/app/oracle/product/ofm_11.1.1.6/fmw/utils/bsu/cache_dir -patchlist=K25M -prod_dir=/u9000/app/oracle/product/ofm_11.1.1.6/fmw/wlserver_10.3

Post-Installation Instructions
------------------------------

                1) Restart all WebLogic servers.

                2) The following command is a simple way to determine the application of WebLogic Server PSU.

                                $ . /u9000/app/oracle/product/ofm_11.1.1.6/fmw/wlserver_10.3 /server/bin/setWLSEnv.sh 

                                $ java weblogic.version

Uninstalling Oracle WebLogic Server Patch Set 
----------------------------------------------

                1. Stop all WebLogic Servers

                2. Navigate to /u9000/app/oracle/product/ofm_11.1.1.6/fmw/utils/bsu directory.

                3. ./bsu.sh -remove -patchlist= K25M -prod_dir=/u9000/app/oracle/product/ofm_11.1.1.6/fmw/wlserver_10.3

./bsu.sh -remove -patchlist=DEM4 -prod_dir=/u9000/app/oracle/product/ofm_11.1.1.6/fmw/wlserver_10.3

                4.Restart all WebLogic Servers.


SOA: Pre-Installation Instructions
-------------------------------------
./opatch lsinventory 

        1. Stop all soa services.

  2. Unzip the patch zip file into the PATCH_TOP.


    $ unzip -d PATCH_TOP p16702086_111160_Generic.zip

3. Set your current directory to the directory where the patch is located.

    $ cd PATCH_TOP/16702086

4. Run OPatch to apply the patch.

        $ opatch apply
-------------------------------------------------------------------------------------------------------
16922093: EMAIL NOTIFICATIONS ARE NOT SENT WITH CONTENT TYPE TEXT/HTML IN 11.1.1.6.6

1. Unzip the patch zip file into the PATCH_TOP.

   $ unzip -d PATCH_TOP p16922093_111167_Generic.zip

    NOTE: In WINDOWS, the unzip command might not work as this zip has
    certain contents which passes the 256 characters limit.
    To overcome this problem, please use alternate ZIP utility like
    7-Zip to unzip the patch.
    For example: To unzip using 7-zip, run the command:
         "c:\Program Files\7-Zip\7z.exe"  x p14302931_111154_Generic.zip

2. Set your current directory to the directory where the patch is located.

   $ cd PATCH_TOP/16922093/oui

3. Run OPatch to apply the patch.

   Run following command:
     - opatch apply

When OPatch starts, it validates the patch and makes sure that there are no
conflicts with the software already installed in the ORACLE_HOME.
  OPatch categorizes two types of conflicts:

     a. Conflicts with a patch already applied to the ORACLE_HOME
        In this case, stop the patch installation, and contact Oracle Support
        Services.
     b. Conflicts with subset patch already applied to the ORACLE_HOME
        In this case, continue the install, as the new patch contains all the
        fixes from the existing patch in the ORACLE_HOME.

7 Bugs Fixed by This Patch
--------------------------

  16922093: EMAIL NOTIFICATIONS ARE NOT SENT WITH CONTENT TYPE TEXT/HTML IN 11.1.1.6.6
Post-Installation Instructions:  
-------------------------------
Database Task:1

     1.For bug 13900609 - User should run soa_purge_scripts.sql after patch to rebuild purge procedure with the fix.
   
  2.$ORACLE_HOME/rcu/integration/soainfra/sql/upgsql/111170ps6/patch_bpelpkg_bug_13853994_oracle.sql on soainfra schema if backend is oracle database

       Once done DBA task, then ISS team will perform the restart the all services.
     3.Restart all servers (Admin Server and all Managed Server(s))

Deinstallation Instructions
----------------------------

1. Change to the directory where the patch was unzipped.

  $  cd PATCH_TOP/16702086

2. Run OPatch to deinstall the patch.

        $  opatch rollback -id 16702086

3. Restart all servers (Admin Server and all Managed Server(s))

OSB :Patch Installation Instructions:
------------------------------------

        ./opatch lsinventory

1. Stop all OSB services.

2. Set ORACLE_HOME env var to your OSB_HOME

  3.To apply the patch, unzip the PSE container file:

      unzip 16205615.zip

    4.Set your current directory to the directory where the patch is located:

    cd 16205615


5.Ensure that the directory containing the opatch script appears in
  your $PATH; then enter the following command:

    ./opatch apply -jdk -jre

    e.g. opatch apply -jdk /usr/local/packages/jdk14 -jre /usr/local/packages/jre14

Patch Deinstallation Instructions:
------------------------------------
1. Set your current directory to the directory where the patch is located & then enter the following command:

cd 16205615

./opatch rollback -id 16205615 -jdk -jre

Thursday 5 January 2017

Upgrade steps for SOA 11.1.1.x to 11.1.1.7 (Doc ID 2041399.1)



A1. To upgrade, you first go to 11.1.1.7.0 from any 11.1.1.6.x release, and then apply the 11.1.1.7.x bundle patch onTOP of it.

Steps:
--------
1. 11.1.1.6.x to 11.1.1.7.0 
2. 11.1.1.7.0 to 11.1.1.7.x

Note: You can use the installer download from edelivery/OTN
Or
Use the patches
(Patch 16471502: ORACLE SOA SUITE 11G PATCH SET 6 (11.1.1.7.0))
(Patch 16471633: ORACLE SERVICE BUS 11G (11.1.1.7.0))

See: http://docs.oracle.com/cd/E28280_01/doc.1111/e16793/overview.htm#PATCH101

IMPORTANT
-------------
WRT to Bundle patches, on 11.1.1.7, SOA and OSB have different patch numbers
- SOA is on Patch 20423535: PS6 Bundle Patch 7 (11.1.1.7.7)
- OSB is on Patch 20423630: PS6 Bundle Patch 4 (11.1.1.7.4)

All relevant documents are found here.
--------------------------------------
SOA 11g: Bundle Patch Reference (Doc ID 1485949.1)
OSB 11g: Bundle Patch Reference (Doc ID 1499170.1)

The release documents are here
11.1.1.7 release doc - http://docs.oracle.com/cd/E23104_01/download_readme_ps6/download_readme_ps6.htm
11.1.1.8 release doc - http://docs.oracle.com/cd/E23104_01/download_readme_wc1118/download_readme_wc1118.htm

To go to 11.1.1.9.0, please see the following documentation:

 http://docs.oracle.com/middleware/11119/cross/upgradetasks.htm

Wednesday 4 January 2017

opatch lsinventory error : LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo

opatch lsinventory error : LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo

$ /u01/app/R12/product/11.2.0/OPatch/opatch lsinventory --invPtrLoc=/etc/oraInst.loc
Oracle Interim Patch Installer version 11.2.0.3.2
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/R12/product/11.2.0
Central Inventory : /u01/app/R12/oraInventory
   from           : /u01/app/R12/product/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.2
OUI version       : 11.2.0.3.0
Log file location : /u01/app/R12/product/11.2.0/cfgtoollogs/opatch/opatchAM_1.log

List of Homes on this system:

Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
Possible causes are:
   Oracle Home dir. path does not exist in Central Inventory
   Oracle Home is a symbolic link
   Oracle Home inventory is corrupted
LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo

OPatch failed with error code 73
$

Fix
=====

$ cd $ORACLE_HOME/oui/bin
$ ./attachHome.sh
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 2006 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/R12/oraInventory
'AttachHome' was successful.

The Central Inventory is corrupted. The oraInst.loc file specified is not valid.

The Central Inventory is corrupted. The oraInst.loc file specified is not valid.
                                                 

Summary 
Trying to run $ opatch lsinventory to get the list of applied patches and software in an oracle installation and get the error:
Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.

Oracle Home       : /p6data/orauser/osm/produt/11.2.0
Central Inventory : /oracle/DwhProd/orabin/oradb/oraInventory
   from           : /var/opt/oracle/oraInst.loc

OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0

Log file location : /p6data/orauser/osm/produt/11.2.0/cfgtoollogs/opatch/opatch2013-01-10_12-00-26PM.log

OPatch failed to locate Central Inventory.

Possible causes are: 

    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.

LsInventorySession failed: OPatch failed to locate Central Inventory.

Possible causes are: 

    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.

OPatch failed with error code 73
The reason for the error is that the content from file /var/opt/oracle/oraInst.loc is different from the content of file $ORACLE_HOME/oraInst.loc (where is supposed it has be the correct info). Usually the problem is that the file is owned by a different user/installation.

Workaround: Check the contents for the correct file $ORACLE_HOME/oraInst.loc and the contents of /var/opt/oracle/oraInst.loc

0. Rename the file: $ mv /var/opt/oracle/oraInst.loc /var/opt/oracle/oraInst.loc.old
1. Copy the new one: $ cp $ORACLE_HOME/oraInst.loc /var/opt/oracle/oraInst.loc
2. Run again the $ opatch lsinventory
$ cd $ORACLE_HOME/OPatch
$ opatch lsinventory

Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.

Oracle Home       : /p6data/orauser/osm/produt/11.2.0
Central Inventory : /p6data/orauser/oraInventory
   from           : /var/opt/oracle/oraInst.loc

OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0

Log file location : /p6data/orauser/osm/produt/11.2.0/cfgtoollogs/opatch/opatch2013-01-11_10-23-05AM.log

Lsinventory Output file location : /p6data/orauser/osm/produt/11.2.0/cfgtoollogs/opatch/lsinv/lsinventory2013-01-11_10-23-05AM.txt

--------------------------------------------------------------------------------

Installed Top-level Products (1): 
Oracle Database 11g                                                  11.2.0.3.0
There are 1 products installed in this Oracle Home.

There are no Interim patches installed in this Oracle Home.
-------------------------------------------------------------------------------
OPatch succeeded.

Inventory lock file is stored in below location: another way to run opatch lsinventory
remove or backup  lock file from oralnventory and run opatch lsinventory
inventory_loc=/u9000/home/oracle/oraInventory
inst_group=oinstall