Oracle Weblogic Server 12c has replaced the legacy BSU utility with the OPatch utility from Oracle weblogic server 12c version. The objective of this post is to provide the practical view of how to download the Oracle weblogic server patch from support.oracle.com and Applying it with Opatch
We Assume: (Prerequisites)
- That you have support.oracle.com account and download the patch
- That you have weblogic 12c installed in your server
If you want to know how to install weblogic 12c, you might go to this post and then come back later.
Let's start
The Reason for Patching
In General, We (System Administrators/Developers/Architects) go for a patching if there are any security vulnerabilities (or) bug fixes and may be as per the Oracle recommendation to address some specific issue and I know there are some companies who enforce cycle based patching (quarterly/half yearly (or) biannual/Yearly (or) annual) in their servers.
Whatsoever the case may be, the procedure is same.
- Download the Patch to Local Server
- Apply it using OPatch
That's it.
Downloading the Patch from _support.oracle.com
Like any other support model works, Oracle patches can be downloaded only from the registered user who has the support contract with Oracle. Your normal Oracle account username and passwords are not valid for support.oracle.com account. So if you are working for a client and if the client is asking you to apply the patch. You need to contact the sales team/ management to approach Oracle to create Support ID for your self/your team.
Let me presume that you have support id and logged in to support.oracle.com
Here is the procedure to download the patch
- Identify the Patch number
- Verify the Product number
- Make sure the Patch description is matching to the issue that you are planning to address by applying this patch
- If it is a security patch, make sure it addresses the corresponding vulnerability
If you are applying Oracle recommended patches for your products (or) doing to Cycle based patching to stay on top of Security Standards. you do not have to worry about all these aforementioned items
Find the Patch you are looking for
Login to support.oracle.com and once you are in the Dashboard. Go to Patches & Updates tab
In the Patch Search Box. you can search for your patch using the Name of Bug / Number of Patch (or ) you can search by product (or) simply you can go for Recommended Patch Advisor for your product. The Following Snapshot could give some insight how it looks.
Here, I am going by the product and platform and selecting the product and platform along with their subversions to find the patches.
After selecting the products (or) done with the searching requirement. Hit Search button to proceed.
Select the Patch and Download
At the next screen, you will be presented with the result of your search requirement/query. Now Click on the Patch Number you will be redirected to a page where you can find more information about the patch and download.
At the right corner of the screen, you will see the Download button. Click to proceed.
You will get the Modal Box with a download link. The file generally comes as a zip file
After downloading the ZIP file. the second phase of the patching starts.
The Second Phase of Patching - Apply a Patch using OPatch
Copy the downloaded zip file to any directory in your server. preferably create a new folder and unzip the files in there.
Something as follows.
unzip -d patching-files <downloaded patching zip file>
Where to find the Opatch utility?
In the server, It will be available in the ORACLE_HOME/Opatch/
directory
Note*: Oracle home is the parent directory of wlserver/common
or wlserver/server
directory
Having found the Opatch and done with unarchiving the zip file. we are good to go and apply the patch.
Setting PATH and Invoking the Opatch
If you have the opatch utility in the PATH environment variable, you can invoke opatch without fully qualified path otherwise you need to call the opatch with full path. Just like any other Unix shell script/command.
export PATH=$PATH:/apps/path/to/oracle_home/Opatch
List the installed Patches first
To list the installed patches you can using the following command
opatch lsinventory
It's highly recommended to shut down all the servers (or) corresponding servers and services before applying the patch
Get Ready to Apply
Once you have unzipped the patch into a directory. You will get a subdirectory created beneath, with the name as same as the patch number.
Go into it (cd) and execute the following command.
opatch apply
In the preceding snapshot, if you notice, I have CD'ed into the patch directory ( /tmp/patching-files/<patchnumber>) and executed the opatch apply
You can verify if the patch is installed using the opatch lsinventory command
How to Remove a Patch
stop all the servers/services running in the domain.
Run the opatch lsinventory command and get the list of patches applied so far. In the output, you could see
Patch <patch number> : applied date
Copy the patch number, you want to remove.
In the preceding snapshot, 20543427 is my patch number.
To Remove that Patch I have to execute the following command
opatch rollback -id 20543427
And that's how it is Done.!
Hope this article helps you.
If you like this article leave a rating [ratings]
Cheers,
A K S A R A V
Follow us on Facebook
To Join our Community in Whatsapp – Click here