Oracle delivers patches for WebLogic every 3 months. These Critical Patch Updates (CPU) are often composed of multiple patches which makes even more steps to have them installed on server:
- Copy on server
- Installation via opatch
Since April 2021, Oracle is providing what they are calling a Stack Patch Bundle (SPB) which includes Stack Patch Bundle Automation Tool (SPBAT). This make the installation easier and safer.
This can be used to patch following WebLogic installations:
- Fusion Middleware Infrastructure (WebLogic part only).
Download the patch for your OS and copy it on the server. Unzip it and go into the directory where
spbat.sh script is located:
Prechecks can take few minutes, but it is worth using it as it can detect potential patching issues.
./spbat.sh -phase precheck -oracle_home $ORACLE_HOME
ORACLE_HOME variable is pointing to the installation you want to update. In my case, it is a Fusion Middleware Infrastructure home.
Precheck is composed of several steps:
- requirements of script itself (jdk version):
[2023-01-26_14-47-37] [SUCCESS] The Installed JDK version 1.8.0_361 is higher than or same as the recommended JDK version 1.8.0_361
- OPatch requirements:
[2023-01-26_14-47-21] Minimum OPatch version required : 220.127.116.11.5 [2023-01-26_14-47-21] Environment has OPatch version : 18.104.22.168.8 [2023-01-26_14-47-21] [SUCCESS] Minimum OPatch version check ... [2023-01-26_14-47-41] Middleware OPatch Version : 22.214.171.124.8 [2023-01-26_14-47-41] SPB OPatch version : 126.96.36.199.11
- List of installed patches:
[2023-01-26_14-48-28] List of patches present in the Oracle Home: /u00/app/oracle/product/fmw_reports 29494060;Database Patch Set Update : 188.8.131.52.190716 (29494060) 27516009; 27293599; 25549931; 22754279;One-off 19795066;One-off 19632480;One-off 19154304;One-off 19030178;One-off
- List of applicable patches including compatibility and conflict checks:
[2023-01-26_14-48-28] Patch compatibility check with the environment is in progress… [2023-01-26_14-50-26] CheckForNoOpPatches has Completed on /u00/app/oracle/product/fmw_reports Home [2023-01-26_14-51-00] PATCH 34856450 APPLY WILL BE SKIPPED AS IT IS NOT APPLICABLE FOR THIS ENVIRONMENT [2023-01-26_14-51-02] PATCH 34883826 IS #NOT APPLIED# IN THE ENVIRONMENT [2023-01-26_14-51-04] PATCH 34974766 IS #NOT APPLIED# IN THE ENVIRONMENT [2023-01-26_14-51-04] PATCH 1221416 IS #NOT APPLIED# IN THE ENVIRONMENT [2023-01-26_14-51-05] PATCH 33639718 IS #NOT APPLIED# IN THE ENVIRONMENT [2023-01-26_14-51-08] PATCH 33093748 IS #NOT APPLIED# IN THE ENVIRONMENT [2023-01-26_14-51-11] PATCH 34801809 IS #NOT APPLIED# IN THE ENVIRONMENT [2023-01-26_14-51-14] PATCH 32720458 IS #NOT APPLIED# IN THE ENVIRONMENT [2023-01-26_14-51-16] PATCH 34879707 IS #NOT APPLIED# IN THE ENVIRONMENT [2023-01-26_14-51-16] Patch conflict check is in progress … [2023-01-26_14-51-57] Patch conflict check has completed on /u00/app/oracle/product/fmw_reports Home
Expected output at the end is like this:
PRECHECK SUMMARY: No Of FAILURES: 0 No Of WARNINGS: 0
With this output, we are ready to run spbat in apply mode.
Command is very similar with just the “phase” parameter being different:
./spbat.sh -phase apply -oracle_home $ORACLE_HOME
First step of script is to run precheck phase. Once it is completed without errors, spbat will proceed to installation:
[2023-01-26_15-10-06] Application of patches is in progress … [2023-01-26_15-22-39] SUCCESSFUL - OPatch napply has completed for wls Home [2023-01-26_15-22-39] Opatch Napply Exit Status - 0 [2023-01-26_15-22-39] COMPLETED : Performing SPBAT Binary patching on wls Home [2023-01-26_15-22-57] STARTED : Performing SPBAT binary audit on wls Home [2023-01-26_15-23-29] NoOp patch#34856450# detected in Environment.Skipping Audit for the same [2023-01-26_15-23-29] SUCCESSFUL - SPB PATCH 34883826 IS #APPLIED# [2023-01-26_15-23-30] SUCCESSFUL - SPB PATCH 34974766 IS #APPLIED# [2023-01-26_15-23-31] SUCCESSFUL - SPB PATCH 1221416 IS #APPLIED# [2023-01-26_15-23-32] SUCCESSFUL - SPB PATCH 33639718 IS #APPLIED# [2023-01-26_15-23-33] SUCCESSFUL - SPB PATCH 33093748 IS #APPLIED# [2023-01-26_15-23-34] SUCCESSFUL - SPB PATCH 34801809 IS #APPLIED# [2023-01-26_15-23-35] SUCCESSFUL - SPB PATCH 32720458 IS #APPLIED# [2023-01-26_15-23-35] SUCCESSFUL - SPB PATCH 34879707 IS #APPLIED#
And finally, spbat will list all installed patches:
[2023-01-26_15-24-02] List of patches present in the Oracle Home: /u00/app/oracle/product/fmw_reports
[2023-01-26_15-24-02] List of patches present in the Oracle Home: /u00/app/oracle/product/fmw_reports 34974766;WLS STACK PATCH BUNDLE 184.108.40.206.230112 (Patch 34974729) 34883826;WLS PATCH SET UPDATE 220.127.116.11.221210 34879707;FMW Thirdparty Bundle Patch 18.104.22.168.221209 34801809;RDA release 23.1-20230117 for OFM 22.214.171.124 SPB 33639718;33639718 - ADR FOR WEBLOGIC SERVER 126.96.36.199.0 JUL CPU 2022 33093748;One-off 32720458;JDBC 188.8.131.52 FOR CPUJAN2022 (WLS 184.108.40.206, WLS 14.1.1) 1221416;Coherence Cumulative Patch 220.127.116.11.16 29494060;Database Patch Set Update : 18.104.22.168.190716 (29494060) 27516009; 27293599; 25549931; 22754279;One-off 19795066;One-off 19632480;One-off 19154304;One-off 19030178;One-off
All these logs output, and even more, are kept under logs directory under SPBAT directory:
# ls -ltr ./WLS_SPB_22.214.171.124.230112/tools/spbat/generic/SPBAT/logs/ total 0 drwxr-xr-x. 5 oracle workshop 105 Jan 26 14:47 vm06_spb_precheck_2023-01-26_14-46-45 drwxr-xr-x. 7 oracle workshop 135 Jan 26 15:22 vm06_spb_apply_2023-01-26_14-57-45
This is great to have a complete history of what was before and after spbat was run.
Do not forget to backup before proceeding to any software update.
Even if apply will also run precheck, I do prefer to run precheck phase myself first, so that I am able to decide if I should proceed to patch apply or not.