Tuesday, January 26, 2021

Apply patches required by checkMTpatch.sh (ETCC)

After rapidwiz completed successfully, the next step is to apply a list of patches reported by checkMTpatch.sh from patch 17537119 (see page 97 of  R12.2 Upgrade Guide: Release 12.0 and 12.1 to 12.2, Part No. E73540-10). More details are in Section 4 of Doc ID 1594274.1 (R12.2: Consolidated List of Patches and Technology Bug Fixes). 

The purpose is to patch and address issues in software installed by Rapid Install that was released a while ago. Oracle keeps updating patch 17537119, which may report a different list of patches depending on when patch 17537119 was downloaded.

1. Generate ETCC report
Add ". /u02/app/EBSDEV/fs1/EBSapps/appl/APPS*.env" to OS .profile, and start a new OS session. Or,
$ cd ../fs1/EBSapps/appl
$ . ./APPS*.env

$ strings -a  checkMTpatch.sh |grep '$Header'
# $Header: checkMTpatch.sh 120.0.12020000.42 2020/08/18 04:16:12 chrhill noship $

$ ./checkMTpatch.sh
It needs APPS password, and creates a log file with the list of patches in it.

2. Apply patches: patching in 5 areas

1) Oracle Forms and Reports 10.1.2.3.0  (3 patches)
  Patch 26825525
  Patch 25342269
  Patch 27491934

$ echo $FILE_EDITION
run
$ echo $ORACLE_HOME
/u02/app/$TWO_TASK/fs1/EBSapps/10.1.2
$ which opatch
~/$TWO_TASK/fs1/EBSapps/10.1.2/OPatch/opatch

$ unzip p26825525_101232_LINUX.zip
$ cd 26825525
$ opatch apply
Oracle Interim Patch Installer version 1.0.0.0.64 … ...
Rolling back patch 8557019 ...
Rolling back patch 18620223 ...
Rolling back patch 19434967 ...
Applying patch 26825525...

$ cd ..
$ unzip p25342269_101232_Generic.zip
$ cd 25342269
$ opatch apply

$ cd ..
$ unzip p27491934_101232_LINUX.zip
$ cd 27491934
$ opatch apply

$ opatch lsinventory
It lists 44 patches in my instance.

2) Oracle Fusion Middleware (FMW) - Web Tier 11.1.1.9.0  (4 patches)
  Patch 22288381
  Patch 31047338 (OHS 11.1.1.9.0 SPU FOR AprCPU2020, Doc ID 2650675.1)
  Patch 31304503
  Patch 23716938

$ echo $IAS_ORACLE_HOME
$ export ORACLE_HOME=$IAS_ORACLE_HOME
$ echo $ORACLE_HOME
/u02/app/$TWO_TASK/fs1/FMW_Home/webtier
$ export PATH=$IAS_ORACLE_HOME/OPatch:$PATH
$ echo $PATH
$ which opatch
~/$TWO_TASK/fs1/FMW_Home/webtier/OPatch/opatch
$ opatch lsinventory
Oracle Interim Patch Installer version 11.1.0.12.9 … ...

$ cd ..
$ unzip p22288381_111190_Generic.zip
$ cd 22288381
$ opatch apply
Rolling back interim patch '20922780' ...
Patch 22288381 successfully applied

$ cd ..
$ unzip p31047338_111190_Linux-x86-64.zip
$ cd 31047338
$ opatch apply
Patching component oracle.ohs2, 11.1.1.9.0...
Patch 31047338 successfully applied

$ cd ..
$ unzip p31304503_111190_Linux-x86-64.zip
$ cd 31304503
$ opatch apply
Patch 31304503: Optional component(s) missing : [ oracle.idm.oid, 11.1.1.9.0 ] …  … 
Is the local system ready for patching? [y|n]
Y
User Responded with: Y
Backing up files...
Patching component oracle.ldap.rsf, 11.1.1.9.0...
Patching component oracle.rdbms.rsf, 11.1.0.7.0...
Patch 31304503 successfully applied

$ cd ..
$ unzip p23716938_111190_Generic.zip
$ cd 23716938
$ opatch apply
Patching component oracle.opmn, 11.1.1.9.0...
Patch 23716938 successfully applied
  
3) RSF within FMW Web tier 11.1.0.7.0 (fs1/FMW_Home/webtier, 1 patch)
-------------------------------------------------
$ echo $IAS_ORACLE_HOME
$ export ORACLE_HOME=$IAS_ORACLE_HOME
$ export PATH=$IAS_ORACLE_HOME/OPatch:$PATH
$ echo $ORACLE_HOME
/u02/app/$TWO_TASK/fs1/FMW_Home/webtier   (<= same as above 2)! )
$ which opatch
~/$TWO_TASK/fs1/FMW_Home/webtier/OPatch/opatch

$ cd ..
$ unzip p22290164_111070_Linux-x86-64.zip   (<= it is a large patch)
$ cd 22290164
$ opatch apply

OPatch detects the Middleware Home as "/u02/app/$TWO_TASK/fs1/FMW_Home"
Applying interim patch '22290164' to OH '/u02/app/$TWO_TASK/fs1/FMW_Home/webtier'
Verifying environment and performing prerequisite checks...
Patch 22290164: Optional component(s) missing : [ oracle.network.listener, 11.1.0.7.0 ] , … … 
… … 
All checks passed.

Is the local system ready for patching? [y|n]
Y
User Responded with: Y
Backing up files...
Patching component oracle.rdbms.rsf, 11.1.0.7.0...
Patching component oracle.network.rsf, 11.1.0.7.0...
Patching component oracle.xdk.parser.java, 11.1.0.7.0...
Patching component oracle.xdk, 11.1.0.7.0...
Patching component oracle.xdk.rsf, 11.1.0.7.0...
Patching component oracle.rdbms.rsf, 11.1.0.7.0...
Patching component oracle.network.rsf, 11.1.0.7.0...
Patching component oracle.dbjava.ic, 11.1.0.7.0...
Patching component oracle.dbjava.jdbc, 11.1.0.7.0...
Verifying the update...
Patch 22290164 successfully applied
Log file location: /u02/app/$TWO_TASK/fs1/FMW_Home/webtier/cfgtoollogs/opatch/22290164_x/apply2021_x.log
OPatch succeeded.

$ opatch lsinventory
It lists 15 patches in my instance.

4) Oracle Fusion Middleware (FMW) - oracle_common 11.1.1.9.0  (12 patches)
---------------------------------------------------------
$ echo $FMW_HOME
$ export ORACLE_HOME=$FMW_HOME/oracle_common
$ export PATH=$ORACLE_HOME/OPatch:$PATH
$ echo $ORACLE_HOME
/u02/app/$TWO_TASK/fs1/FMW_Home/oracle_common
$ which opatch
~/$TWO_TASK/fs1/FMW_Home/oracle_common/OPatch/opatch

$ unzip p9905685_111190_Generic.zip
$ cd 9905685/oui
$ opatch apply
Patching component oracle.soa.mgmt, 11.1.1.9.0...

$ unzip p17428617_111190_Generic.zip
$ cd 17428617
$ opatch apply
Patching component oracle.jrf.thirdparty.jee, 11.1.1.9.0...

$ unzip p21366277_111190_Generic.zip
$ cd 21366277
$ opatch apply
Patching component oracle.as.common.clone, 11.1.1.9.0...

$ unzip p21628307_111190_Generic.zip
$ cd 21628307
$ opatch apply
Patching component oracle.jrf.thirdparty.jee, 11.1.1.9.0...

$ unzip p24606362_111190_Generic.zip
$ cd 24606362
$ opatch apply
Patching component oracle.as.common.clone, 11.1.1.9.0...

$ unzip p24843064_111190_Generic.zip
$ cd 24843064/oui
$ opatch apply
Patching component oracle.jrf.adfrt, 11.1.1.9.0...

$ unzip p13544814_111190_Generic.zip
$ cd 13544814
$ opatch apply
Patching component oracle.jrf.thirdparty.jee, 11.1.1.9.0...

$ unzip p16089637_111190_Generic.zip
$ cd 16089637
$ opatch apply
Patching component oracle.jrf.thirdparty.jee, 11.1.1.9.0...

$ unzip p20141119_111190_Generic.zip
$ cd 20141119
$ opatch apply
Patching component oracle.jrf.thirdparty.jee, 11.1.1.9.0...

$ unzip p30368663_111190_Generic.zip
$ cd 30368663/oui
$ opatch apply
Patching component oracle.jrf.adfrt, 11.1.1.9.0...

$ unzip p27212806_111190_Generic.zip
$ cd 27212806
$ opatch apply
Patching component oracle.as.common.clone, 11.1.1.9.0...

$ unzip p28708563_111190_Generic.zip
$ cd 28708563
$ opatch apply
Rolling back interim patch '20484781' … 
OPatch back to application of the patch '28708563' after auto-rollback.
Patching component oracle.as.common.clone, 11.1.1.9.0...

$ opatch lsinventory
It lists 13 patches in my instance.

Exit from this OS session

5) Oracle WebLogic Server (WLS) 10.3.6.0.7
-------------------------------------------------------------------------------
  Patch 29633432 [SU Patch [MXLE]: WLS PSU 10.3.6.0.190716]
    - Filename: p29633432_1036_Generic.zip

Since Oracle site says 29633432 was originally replaced by patch 30109677, and the most recent replacement for this patch is 32052267 (WLS PATCH SET UPDATE 10.3.6.0.210119), I decided to apply patch 32052267, instead. (Notes on March 2021: Doc 2737201.1 (Table 2) says WLS patch 32052267 is part of R12.2 Jan2021 CPU patch. So, applying it was a good choice as it will save time when applying Jan2021 CPU ).

Start a new OS session (to get the right ORACLE_HOME)
$ echo $TWO_TASK
$ echo $ORACLE_HOME
/u02/app/$TWO_TASK/fs1/EBSapps/10.1.2
$ ls -al $FMW_HOME/wlserver_10.3
$ echo $FILE_EDITION
run

$ cd $FMW_HOME/utils/bsu
$ cp -p bsu.sh bsh.sh_orig
$ vi bsu.sh       <== to increase Java cache size
$ diff bsu.sh bsu.sh_orig
< MEM_ARGS="-Xms4096m -Xmx4096m -XX:+UseParallelGC"
---
> MEM_ARGS="-Xms512m -Xmx1024m -XX:+UseParallelGC"

Download p32052267_1036_Generic.zip to WLS folder and apply it:
$ cd $FMW_HOME/utils/bsu/cache_dir
$ unzip p32052267_1036_Generic.zip
Archive:  p32052267_1036_Generic.zip
  inflating: 1YWL.jar
  inflating: patch-catalog_27373.xml
  inflating: README.html
  inflating: README.txt

$ cd $FMW_HOME/utils/bsu
$ ./bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=1YWL -prod_dir=$FMW_HOME/wlserver_10.3
Checking for conflicts............                                      <= this takes 15 minutes or so.
Conflict(s) detected - resolve conflict condition and execute patch installation again
Conflict condition details follow:
Patch 1YWL is mutually exclusive and cannot coexist with patch(es): YHJK,2GYW,VKXF,FCX7,BLTG,Y5AP,CW9T,1LRI

$  ./bsu.sh -prod_dir=$FMW_HOME/wlserver_10.3 -remove -verbose -patchlist=YHJK
Checking for conflicts..........                                 <= this takes about 15 minutes.
No conflict(s) detected
Starting removal of Patch ID: YHJK
--- ---
Result: Success

$ ./bsu.sh -prod_dir=$FMW_HOME/wlserver_10.3 -remove -verbose -patchlist=2GYW
$ ./bsu.sh -prod_dir=$FMW_HOME/wlserver_10.3 -remove -verbose -patchlist=VKXF

$ ./bsu.sh -prod_dir=$FMW_HOME/wlserver_10.3 -remove -verbose -patchlist=FCX7
Checking for conflicts..........       
Conflict(s) detected - resolve conflict condition and execute patch removal again
Conflict condition details follow:
The selected patch cannot be removed until the following patch(es) are removed first: 1LRI,CW9T,BLTG

./bsu.sh -prod_dir=$FMW_HOME/wlserver_10.3 -remove -verbose -patchlist=BLTG
./bsu.sh -prod_dir=$FMW_HOME/wlserver_10.3 -remove -verbose -patchlist=CW9T
./bsu.sh -prod_dir=$FMW_HOME/wlserver_10.3 -remove -verbose -patchlist=1LRI
./bsu.sh -prod_dir=$FMW_HOME/wlserver_10.3 -remove -verbose -patchlist=FCX7
./bsu.sh -prod_dir=$FMW_HOME/wlserver_10.3 -remove -verbose -patchlist=Y5AP

- Apply it again (after all removals)
$ ./bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=1YWL -prod_dir=$FMW_HOME/wlserver_10.3
Checking for conflicts............
No conflict(s) detected
Installing Patch ID: 1YWL..
Result: Success

- To check the applied WLS patches:
$ ./bsu.sh -prod_dir=$FMW_HOME/wlserver_10.3 -view -status=applied
ProductName:       WebLogic Server
ProductVersion:    10.3 MP6
Components:        WebLogic Server/Core Application Server,WebLogic Server/Administration Console,WebLogic Server/Configuration Wizard and Upgrade Framework,WebLogic Server/Web 2.0 HTTP Pub-Sub Server,WebLogic Server/WebLogic SCA,WebLogic Server/WebLogic JDBC Drivers,WebLogic Server/Third Party JDBC Drivers,WebLogic Server/WebLogic Server Clients,WebLogic Server/WebLogic Web Server Plugins,WebLogic Server/UDDI and Xquery Support,WebLogic Server/Evaluation Database,WebLogic Server/Workshop Code Completion Support

BEAHome:            /u02/app/$TWO_TASK/fs1/FMW_Home
ProductHome:       /u02/app/$TWO_TASK/fs1/FMW_Home/wlserver_10.3
PatchSystemDir:   /u02/app/$TWO_TASK/fs1/FMW_Home/utils/bsu
PatchDir:              /u02/app/$TWO_TASK/fs1/FMW_Home/patch_wls1036
Profile:                 Default
DownloadDir:      /u02/app/$TWO_TASK/fs1/FMW_Home/utils/bsu/cache_dir
JavaVersion:       1.6.0_29
JavaVendor:        Sun

Patch ID:          32I2
Patch ID:          S9MN (14272383)
Patch ID:          TTEM (14621810)
Patch ID:          CIH8 (17431995,17495356)
Patch ID:          7FC9 (17893334)
Patch ID:          S8H6 (20474010)
Patch ID:          YVDZ (13964737)
Patch ID:          1YWL (32052267)


- To determine the application of WebLogic Server PSU
$ . $FMW_HOME/wlserver_10.3/server/bin/setWLSEnv.sh
$ java weblogic.version
WebLogic Server 10.3.6.0.210119 PSU Patch for BUG32052267 Mon Nov 23 07:28:31 UTC 2020
WebLogic Server Temporary Patch for BUG13964737 Fri Dec 20 11:32:08 IST 2013
WebLogic Server Temporary Patch for BUG20474010 Sun Mar 01 17:22:18 IST 2015
WebLogic Server Temporary Patch for BUG17495356 Tue Sep 24 00:23:38 CDT 2013
WebLogic Server Temporary Patch for BUG17495356 Tue Sep 24 00:23:38 CDT 2013
WebLogic Server Temporary Patch for BUG17495356 Tue Sep 24 00:23:38 CDT 2013
WebLogic Server Temporary Patch for BUG17495356 Tue Sep 24 00:23:38 CDT 2013
WebLogic Server Temporary Patch for BUG17495356 Tue Sep 24 00:23:38 CDT 2013
WebLogic Server Temporary Patch for ${CRS} Mon Jul 30 16:45:20 EDT 2012
WebLogic Server Temporary Patch for ${CRS} Mon Jul 30 16:45:20 EDT 2012
WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050
Use 'weblogic.version -verbose' to get subsystem information
Use 'weblogic.utils.Versions' to get version information for all modules

- To re-run ETCC
$ ./checkMTpatch.sh

Using context file from currently set applications environment:
/u02/app/$TWO_TASK/fs1/inst/apps/<CONTEXT_NAME>/appl/admin/<CONTEXT_NAME>.xml
Starting Application Tier Technology Codelevel Checker
Version: 120.0.12020000.42.
Tue Jan 26 17:35:43 EST 2021
Log file for this session: /u02/app/temp/log/checkMTpatch_463.log
Bugfix XML file version: 120.0.12020000.48
This file will be used for identifying missing bugfixes.
Mapping XML file version: 120.0.12020000.34
This file will be used for mapping bugfixes to patches.
Checking for prerequisite bugfixes in File Edition: run
Connecting to database.
Database connection successful.
The installed AD.B.8 codelevel does not support storing the results in the database.
======================================
Oracle Forms and Reports
======================================
Now examining product Oracle Forms and Reports.
Oracle Home = /u02/app/$TWO_TASK/fs1/EBSapps/10.1.2.
Product version = 10.1.2.3.0.
Checking required bugfixes for Oracle Forms and Reports 10.1.2.3.0.
All required bugfixes are present for Oracle Forms and Reports.
 DST ts home /u02/app/$TWO_TASK/fs1/EBSapps/10.1.2.
Installed DST version under $ORACLE_HOME/oracore/zoneinfo is DST 18.
Checking required bugfixes for RSF within Forms 10.1.0.5.0.
All required bugfixes are present for RSF within Forms.
======================================
Oracle Fusion Middleware (FMW) - Web Tier
======================================
Now examining product Oracle Fusion Middleware (FMW) - Web Tier.
Oracle Home = /u02/app/$TWO_TASK/fs1/FMW_Home/webtier.
Product Version = 11.1.1.9.0
Checking required bugfixes for FMW - Web Tier 11.1.1.9.0.
All required bugfixes are present for FMW - Web Tier.
 DST ts home /u02/app/$TWO_TASK/fs1/FMW_Home/webtier.
Installed DST version under $ORACLE_HOME/oracore/zoneinfo is DST 18.
Checking required bugfixes for RSF within FMW Web tier 11.1.0.7.0.
All required bugfixes are present for RSF within FMW Web tier.
========================================
Oracle Fusion Middleware (FMW) - oracle_common
========================================
Now examining product Oracle Fusion Middleware (FMW) - oracle_common.
Oracle Home = /u02/app/$TWO_TASK/fs1/FMW_Home/oracle_common.
Product Version = 11.1.1.9.0
Checking required bugfixes for FMW - oracle common 11.1.1.9.0.
All required bugfixes are present for FMW - oracle common.
=======================================
Oracle WebLogic Server (WLS)
=======================================
Now examining product Oracle WebLogic Server (WLS).
Oracle Home = /u02/app/$TWO_TASK/fs1/FMW_Home/wlserver_10.3.
Product Version = 10.3.6.0.210119
Unable to extract list of patches from Oracle WebLogic Server (WLS) for version 10.3.6.0.210119.
Verify XML file is correct and retry.

Seems WLS PSU patch 32052267 is too new for current version of ETCC to recognize it! 

6. Notes in March 2021

After ran a newer checkMTpatch.sh of patch 17537119, it says 3 more patches are missed. So, I applied 3 more WLS patches.

$ strings -a  checkMTpatch.sh |grep '$Header'
# $Header: checkMTpatch.sh 120.0.12020000.43 2021/02/11 20:32:12 chrhill noship $
$ ./checkMTpatch.sh
… … 
===============================================
Oracle WebLogic Server (WLS)
===============================================
Now examining product Oracle WebLogic Server (WLS).
Oracle Home = $FMW_Home/wlserver_10.3.
Product Version = 10.3.6.0.210119
Note that for Oracle WebLogic Server, patches rather than bugfixes are verified.
Checking required patches for Oracle WebLogic Server (WLS) 10.3.6.0.210119.
  Missing Patch ID: 13845626
  Missing Patch ID: 22323006
  Missing Patch ID: 26795917
The above list shows missing patches for Oracle WebLogic Server.


Download & unzip 3 patch files to $FMW_HOME/utils/bsu/cache_dir folder and then applied them.
p13845626_10360210119_Generic.zip (HJT5.jar)
p22323006_1036_Generic.zip (DI8E.jar) 
p26795917_1036_Generic.zip (DN1F.jar)

$ echo $ORACLE_HOME
/u02/app/$TWO_TASK/fs1/EBSapps/10.1.2
$ echo $FILE_EDITION
run
$ cd $FMW_HOME/utils/bsu
$ ./bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=HJT5 -prod_dir=$FMW_HOME/wlserver_10.3
$ ./bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=DI8E -prod_dir=$FMW_HOME/wlserver_10.3
$ ./bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=DN1F -prod_dir=$FMW_HOME/wlserver_10.3
Checking for conflicts.............
Conflict(s) detected - resolve conflict condition and execute patch installation again
Conflict condition details follow:
Patch DN1F is mutually exclusive and cannot coexist with patch(es): CIH8

$ ./bsu.sh -prod_dir=$FMW_HOME/wlserver_10.3 -remove -verbose -patchlist=CIH8
$ ./bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=DN1F -prod_dir=$FMW_HOME/wlserver_10.3

After all 3 WLS patches are applied successfully, no more patches is needed by ETCC:
$ ./checkMTpatch.sh
… …
================================
Oracle WebLogic Server (WLS)
================================
Now examining product Oracle WebLogic Server (WLS).
Oracle Home = $FMW_HOME/wlserver_10.3.
Product Version = 10.3.6.0.210119
Note that for Oracle WebLogic Server, patches rather than bugfixes are verified.
Checking required patches for Oracle WebLogic Server (WLS) 10.3.6.0.210119.
All required patches are present for Oracle WebLogic Server (WLS).


$ . $FMW_HOME/wlserver_10.3/server/bin/setWLSEnv.sh
$  java weblogic.version
WebLogic Server Temporary Patch for BUG13845626 Tue Jan 05 07:49:28 UTC 2021
WebLogic Server 10.3.6.0.210119 PSU Patch for BUG32052267 Mon Nov 23 07:28:31 UTC 2020
WebLogic Server Temporary Patch for BUG13964737 Fri Dec 20 11:32:08 IST 2013
WebLogic Server Temporary Patch for BUG20474010 Sun Mar 01 17:22:18 IST 2015
WebLogic Server Temporary Patch for ${CRS} Mon Jul 30 16:45:20 EDT 2012
WebLogic Server Temporary Patch for ${CRS} Mon Jul 30 16:45:20 EDT 2012
WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050
Use 'weblogic.version -verbose' to get subsystem information
Use 'weblogic.utils.Versions' to get version information for all modules

NOTE: in this stage, under the new R12.2 environment, adadmin works and $ADMIN_SCRIPTS_HOME will point to R12.2 scripts (but do not run any of them).

----------------
Oracle E-Business Suite 12.2 Patching Technology Components Guide (Doc ID 1355068.1)
R12.2 Pre-install patches report (Doc ID 1448102.2) ?