Oracle Apps 12.2 CPU Patching

 Oracle E-Business Suite Release 12 Critical Patch Update Knowledge Document (July 2020) (Doc ID 2679563.1)         
 Please initiate FS_CLONE before starting the ADOP patching cycle 
adop phase=fs_clone
 Take a backup of invalid objects before starting the below steps
 create table INVALIDS_B4_JULY_PSU as select * from dba_objects where status=' INVALID';
 Pre-requisite before applying the CPU Patch
 a. Create $ORACLE_HOME/appsutil/admin on the database server.
 b. cp /patches/PSU_patch_072020/EBS_Patches/31198342/admin/adgrants.sql  $ORACLE_HOME/appsutil/admin
 d. Set the environment to point to ORACLE_HOME on the database server
 e. Use SQL*Plus to run the script:
      $ sqlplus /as sysdba
      SQL> @?/appsutil/admin/adgrants.sql APPS
adop phase=prepare
 Patch Staging Directory :
 Checking the status of the patches
 select * from ad_bugs where bug_number in (31198342,31444270,31206584,30948437,30980446,25229413,26282050,29662975,29631318);
 1)Main patch 31198342
 time adop phase=apply patches=31198342 patchtop=/patches/PSU_patch_072020/EBS_Patches
 2)Patches to be Applied After the CPU Patch
 select * from ad_bugs where bug_number in (31444270,31206584);
     2.1) Patch 31444270:R12.FWK.C
 time adop phase=apply patches=31444270 patchtop=/patches/PSU_patch_072020/EBS_Patches
     2.2) Patch 31206584:R12.FND.C
 time adop phase=apply patches=31206584 patchtop/patches/PSU_patch_072020/EBS_Patches
 3)Patches listed in the following table were required to be applied as part of earlier CPUs. Apply these patches after the CPU if they have not yet been applied.
     3.1) Patch 30980446:R12.JTT.C
 time adop phase=apply patches=30980446 patchtop=/patches/PSU_patch_072020/EBS_Patches
 If you are using Oracle Workflow and have one or more Workflow one-off patches or the Workflow recommended patch collection in your instance, apply the below patch
 4)Patch 29631318:R12.OWF.C
 time adop phase=apply patches=29631318 patchtop=/patches/PSU_patch_072020/EBS_Patches
 Oracle WebLogic Server (PSU (Patch 31178492))
 Source the patch FS
 . ./EBSapps.env patch
 1)     Preparing to Install WLS Patch Set Update
 cd $FMW_HOME/utils/bsu
        Check the status for the applied patches -prod_dir=$FMW_HOME/wlserver_10.3/ -status=applied -verbose -view
        Edit the under $FMW_HOME/utils/bsu script and change memory options as follows:
        MEM_ARGS="-Xms1024m -Xmx4096m"
 2) Remove the conflict Patches
 time -remove -patchlist=SUPD -prod_dir=$FMW_HOME/wlserver_10.3/
 time -remove -patchlist=BWKV -prod_dir=$FMW_HOME/wlserver_10.3/
 time -remove -patchlist=4R4W -prod_dir=$FMW_HOME/wlserver_10.3/
 time -remove -patchlist=3L3H -prod_dir=$FMW_HOME/wlserver_10.3/
 3) Installing WLS Patch Set Update
 mv $FMW_HOME/utils/bsu/cache_dir $FMW_HOME/utils/bsu/cache_dir_bkp
 mkdir -p $FMW_HOME/utils/bsu/cache_dir
 cd $FMW_HOME/utils/bsu/cache_dir 
 unzip /patches/PSU_patch_072020/WLS_Patches/
 cd $FMW_HOME/utils/bsu
 time -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=I37G -prod_dir=$FMW_HOME/wlserver_10.3/
 4) Install overlay patch
 cp patches/PSU_patch_072020/WLS_Patches/overlay_patch/DTN2.jar $FMW_HOME/utils/bsu/cache_dir/
 cp /patches/PSU_patch_072020/WLS_Patches/overlay_patch/patch-catalog_27158.xml $FMW_HOME/utils/bsu/cache_dir/
 cd $FMW_HOME/utils/bsu/
 time -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=DTN2 -prod_dir=$FMW_HOME/wlserver_10.3/
 5) Validation 
 The following command is a simple way to verify the successful installation of WebLogic Server PSU patch
             $ . $FMW_HOME/wlserver_10.3/server/bin/
             $ java weblogic.version
 Oracle Fusion Middleware OSS - Web Tier Home (OSS Security Patch Update CPUJul2020 Patch 31304503)
 1)Prerequisite Steps to Configure Oracle Fusion Middleware Components for Oracle E-Business Suite Release 12.2 Before Applying the July 2019 and Later FMW OSS Security Patch (Doc ID 2555355.1)
 Applying the OSS and OPMN Patches
 2)Patch Staging Location:
 OSS Patch
 cd /patches/PSU_patch_072020/FMW_Patches/31304503
 OPMN Patch 
 cd /patches/PSU_patch_072020/OPMN_Patch/23716938
 3)Conflict Check:
 cd /patches/PSU_patch_072020/FMW_Patches/31304503
 . ./$FMW_HOME/SetWebtier.env
 time $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
 cd /patches/PSU_patch_072020/OPMN_Patch/23716938
 time $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
 4)Apply the July2020 FMW (OSS) Patches
 . $FMW_HOME/SetWebtier.env
 cd /patches/PSU_patch_072020/FMW_Patches/31304503
 time $ORACLE_HOME/OPatch/opatch apply
 5)Apply the OPMN Patch
 . $FMW_HOME/SetWebtier.env
 cd /patches/PSU_patch_072020/OPMN_Patch/23716938
 time $ORACLE_HOME/OPatch/opatch apply
 Open a New session in App Node 1 and source the Patch FS 
 . ./EBSapps.env patch
 Start the weblogic admin server in patch FS and do the below setup for all the Managed servers
 Add Parameter to Managed Servers
 ·        Log in to the Oracle Fusion Middleware Administration Console at http://<hostname>.<domain>:<AdminServerPort>/console.
 ·        Click Lock & Edit.
 ·        Under Domain Structure > <your EBS domain> > Environment > Servers, select one of the managed servers. Then under the Server Start tab in the Arguments section, append the following (there must be a space at the start before -D)
 Click Save.
 ·        Repeat the above step for all remaining managed servers.
 ·        Click Activate Changes.
 ·        Stop AdminServer on Patch FS
 ·        Stop Nodemanager on Patch FS
 adop phase=finalize
 Shutdown the Application and Database services before taking the cold backup -mode=allnodes
 Login to DB node and shutdown the DB and listener
 srvctl stop database -d EBSDBA
 lsnrctl stop LISTENER_NAME
 Taking Cold backup

 Login to DB node and start the DB and listener
 adop phase=cutover mtrestart=no
 Bring Down DB and Listener after Cutover completes
 srvctl stop database -d EBSDBA
 lsnrctl stop LISTENER_NAME
 DB Critical Patch Update (CPU) Program July 2020 Patch Availability Document (PAD) (Doc ID 2664876.1)
 2)Patch Tree :
 31326402 - Combo Patch for OJVM PSU and Database Proactive BP
 |-31219939 - Oracle JavaVM Component -->
 |-31307682 - Database Proactive Bundle Patch (DB BP)
  |-31136382 - GI/RDBMS (OCW Patch Set Update
  |-31001106 - RDBMS (Database Bundle Patch
 3)Patch Staging Location:
 cd /patches/PSU_patch_072020
 4) Copy the latest OPatch directory to ORACLE_HOME
 mv OPatch OPatch_Oct2019
 cp -rp /patches/PSU_patch_072020/OPatch .
 5)Conflict Check:
 31001106 - Database Bundle Patch
 cd /patches/PSU_patch_072020/31326402/31307682/31001106
 $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
 Composite Patch : 31001106
         Conflict with 23141592
         Conflict with 30808393
         Bug Superset of 28507324
         Bug Superset of 27929509
         Bug Superset of 25099339
         Conflict with 29943372
         Conflict with 19239846
         Bug Superset of 19068380
         Bug Superset of 8975044
         Conflict with 19472320
 31136382 - No Conflicts (OCW Patch Set Update
 cd /patches/PSU_patch_072020/31326402/31307682/31136382
 $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
 No Conflicts
 31219939 - No Conflicts - OJVM Patch
 cd /patches/PSU_patch_072020/31326402/31219939
 $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
 No Conflicts
 5)Rollback conflict patches:
 time $ORACLE_HOME/OPatch/opatch nrollback -id 23141592,30808393,29943372,19239846
 time $ORACLE_HOME/OPatch/opatch nrollback -id 17305006,30242335
 Roll back for patch 19472320 will fail with directory not available, hence we need to apply the patch first and then rollback as per the steps provided below.
 mkdir -p $ORACLE_HOME/.patch_storage/19472320_Oct_20_2014_03_14_44
 cd /patches/PSU_patch_072020/19472320/
 time $ORACLE_HOME/OPatch/opatch apply
 time $ORACLE_HOME/OPatch/opatch rollback -id 19472320
 6)Apply the July2020 DB bundle patches:
 cd /patches/PSU_patch_072020/31326402/31307682/31001106
 time $ORACLE_HOME/OPatch/opatch apply
 cd /patches/PSU_patch_072020/31326402/31307682/31136382
 time $ORACLE_HOME/OPatch/opatch apply
 7)Apply the Overlay patches:
 cd /patches/PSU_patch_072020/overlay_patches/
 time $ORACLE_HOME/OPatch/opatch napply -id 19239846,23604553,19472320,25139545,31239450,31548611,23141592
 8)Apply the July2020 OJVM patch:
 cd /patches/PSU_patch_072020/31326402/31219939 
 time $ORACLE_HOME/OPatch/opatch apply
 (III) Postinstallation
 1.    Startup Database in Upgrade mode
                sqlplus / as sysdba
 startup mount;
 select name,open_mode from v$database;
 alter system set cluster_database=FALSE scope=spfile;
 shutdown immediate;
 startup upgrade
 2.    Check the number of invalid objects count before runing the datapatch
         Select count(*) from dba_objects where status='INVALID';
 3.  Install the SQL portion of the patch by running the following command:
       cd $ORACLE_HOME/OPatch
       time datapatch -verbose
 4.  Start sqlplus and run the utlrp.sql to clear the invalids only if dpload.sql is a part of the patch
       SQL> @?/rdbms/admin/utlrp.sql
 5.   Shut down the database
                shut immediate;
 6.  Startup database using srvctl in all nodes
 sqlplus / as sysdba
 startup mount;
 alter system set cluster_database=TRUE scope=spfile;
 shut immediate;
 srvctl start database -d EBSDBA
relocate services as per definition  
 7.   Check the number of invalid objects count after runing the datapatch
       Select count(*) from dba_objects where status='INVALID';
 8. Package body AD_ZD_ADOP and FND_DIAGNOSTICS will become INVALID after datapatch. Do the below steps to make it VALID.
                Connect as SYS User
 alter package DBMS_METADATA_UTIL compile body;
 grant execute on DBMS_METADATA_UTIL to apps;
 grant select on dba_datapump_jobs to apps;
 Connec as APPS User
 alter package AD_ZD_ADOP compile body;
 alter package apps.FND_DIAGNOSTICS compile body;      
 9.    Startup TNS listener in all the DB nodes
 8)Check the inventory for applied patches:
 $ORACLE_HOME/OPatch/opatch lsinventory
 $ORACLE_HOME/OPatch/opatch lspatches
 Adding the JVM Parameter for TLS-Enabled Release 12.2 Environments
 Add Parameter to WLS Admin Server
 ·        Take a backup of existing context file in each app and dmz nodes

 ·        Source the patch FS and do the above steps once again to take a backup of the xml file
 ·        Update the context variable s_nm_jvm_startup_properties to include
 -DUseSunHttpHandler=true parameter
 ·        Run AutoConfig in all APP and DMZ nodes and run in APP node 1 once again at last.
 Bring up the application apps/<apps> -mode=allnodes
 Verify that the URL is working fine for DMZ
 "For every OHS component on DMZ Nodes only for both run and patch  (Note grep OHS in $CONTEXT_FILE  - as run and patch domains are different)
 trusted.conf - Change Allow from localhost to allow from all
 <Location ~ ""^(/)+webservices(/)+ECXOTAInbound"">
         Order deny,allow
         Allow from all
         Allow from all
 adop phase=cleanup
 Once the cleanup phase is completed, please run FS_CLONE to sync the run and patch FS as we have applied the FMW and WLS Technology level patches.  

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s