To List the applied patches in Oracle WebLogic Server, you can use or follow below Methods:
Method-1:
Using the ORACLE WEBLOGIC Admin Console,
- Log in to the WebLogic Server Administration Console.
- In the left-hand navigation menu, click on “Domain Structure.”
- Click on the name of the domain for which you want to list the applied patches.
- Click on “WebLogic Domain” in the right-hand pane.
- In the “WebLogic Domain” window, click on the “Configuration” tab.
- Scroll down to the “Domain Configuration” section, and click on the “General” sub-tab.
- Look for the “Applied Patches” section. If there are any patches applied to the domain, they will be listed here along with their version numbers and timestamps.
Method-2:
You can use the WebLogic Scripting Tool (WLST) to list the applied patches. Here’s how:
- Open a terminal or command prompt.
- Navigate to the WebLogic Server installation directory.
- Launch the WLST tool by running the following command:
./wlst.sh
- Connect to the WebLogic Server instance by running the following command:
connect('<username>','<password>','t3://<hostname>:<port>')
Replace <username>
and <password>
with your WebLogic Server credentials, and <hostname>
and <port>
with the hostname and port number of your WebLogic Server instance.
- Run the following command to list the applied patches:
show_patches()
This will display a list of all the patches applied to the WebLogic Server instance, along with their version numbers and timestamps.
Method-3
For Versions Prior 10.3
- Go to your MW_HOME/utils/bsu directory
- Run the following command
./bsu.sh -report
Note* If you get any error like “unable to access patch-client.jar” – Execute the setWLSEnv.sh from WL_HOME/server/bin script and retry
For weblogic 12c and above
- Goto MW_HOME/OPatch/ directory
- Run the following command
./opatch lspatches
Sample Output
middlewaredevops@MacBook-Air OPatch % pwd
/Users/middlewaredevops/Documents/opt/Oracle/Middleware/Orcale_Home/OPatch
middlewaredevops@MacBook-Air OPatch % ./opatch lspatches
26295734;One-off
26261906;One-off
OPatch succeeded.
If you are not aware of what is your MW_HOME and what is your WL_HOME.
Use this trick.
Look for the weblogic.jar file in your filesystem by running below cmd,
find /Users -name “weblogic.jar”
middlewaredevops@MacBook-Air bin % find /Users -name "weblogic.jar"
/Users/middlewaredevops/Documents/opt/Oracle/Middleware/Oracle_Home/wlserver/server/lib/weblogic.jar
You will get the file location like preceding snip, Lets decode it.
/Users/middlewaredevops/Documents/opt/Oracle/Middleware/Oracle_Home/wlserver/server/lib/weblogic.jar
WL_HOME = Parent directory of server/lib/weblogic.jar
therefore /Users/middlewaredevops/Documents/opt/Oracle/Middleware/Oracle_Home/wlserver/ is WL_HOME
MW_HOME = Parent directory of WL_HOME
therefore /Users/middlewaredevops/Documents/opt/Oracle/Middleware/Orcale_Home/ is my MW_HOME.
Note: You can follow below Guide to Apply Oracle Weblogic & OHS CPU Patches in your infrastructure.
References:
Opatch and its Options : https://docs.oracle.com/cd/B16240_01/doc/em.102/e15294/options.htm
BSU command line interface : https://docs.oracle.com/cd/E14759_01/doc.32/e14143/commands.htm
Hope it helps.