Part of our "How do I do that in Oracle?" series, this tip, compiled largely of expert advice from our Oracle installation...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
and upgrades expert Maria Anderson, explains in detail how to apply a patch or patchset to your Oracle system.
First, determine if you are applying a patchset (e.g., 10.2.0.1 to 10.2.0.3) or a one-off patch or CPU patch. These are applied in different ways. Applying a patchset usually requires the use of the Oracle Universal Installer (OUI) and then running a script inside each database using that ORACLE_HOME. When you download the patchset, it will be accompanied by a detailed, step-by-step guide for how to apply the patchset.
The basic steps for applying the Oracle 220.127.116.11 patchset are (from "Patch to upgrade from 18.104.22.168.0 to 22.214.171.124.0"):
- Download the patch from Metalink.
- Unzip it on the database server.
- Shut down all databases using the Oracle9i home.
- Apply the patchset to the Oracle binaries.
- Start up all databases using the Oracle9i home and run required SQL scripts within each database.
A one-off or CPU patch requires a Perl-based utility provided by Oracle called opatch. In either case, when you download the patch from Oracle's Metalink Web site, there are detailed instructions included about how to apply the patch. (To register for Metalink, you will need a valid Support Identifier (CSI). CSI numbers are unique support identifiers given to each customer with a current support contract.) You must read through the README file included with the patch and test applying the patch or patchset in a non-production environment prior to applying it in production. (From "How to apply patch to Oracle 10g on Linux?")
More on Oracle patch updates
Find out how to do an Oracle patch update the right way
Read about online patching in the Oracle E-Business Suite 12.2
Learn about upcoming online patching support with Oracle EBS 12.2
Depending on the patch you are attempting to install, the instructions may vary slightly. The basic steps are to download the patch you require from Metalink. Unzip the patch on the server where it is to be installed, start up the Oracle Universal Installer (OUI), point to the patch set and follow the prompts until installation of the patch is completed. Ensure that you first shut down all databases and listeners using this ORACLE_HOME, and that you have a backup of all your databases and software in case the patch application fails. If you have existing databases using this ORACLE_HOME, you will also have to run SQL scripts (depending on the patch) within the databases to upgrade them to the appropriate release level. (From "How to apply a patch on Oracle 9.2?" and "Unsure how to apply patch")
Sometimes when you attempt to apply a patch, you receive an error that says "There are no patches that need to be applied from the patchset ..." This can occur in any of the following cases:
- when the installed software inventory is not updated (which can happen if you copied the ORACLE_HOME binaries from another node).
- when you have installed the 32-bit version of the software, but have the 64-bit patchset (or vice versa).
- when you choose the wrong ORACLE_HOME as your destination on one of the first screens of the installer for the patch set.
- when the installed software inventory has become corrupted (removed, altered in a bad way by another install, etc.).
Unless one of these matches your situation and you know how to resolve the issue (like downloading the proper patch set version), then you may need to reinstall the software so that your inventory is updated properly. The best way to verify that the inventory is readable and contains what you think it does is to use the installer and click the "Installed Products" button on the first screen of the installer to view the installed products. There, you can verify which ORACLE_HOME you should be installing your patchset into. (From "Errors on attempting to apply patch")
For a more advanced patching tip, try Arup Nanda's recommendation to apply a patch or patchset to a new Oracle Home rather than the existing Oracle Home (taken from his article "Five DBA best practices").
Here are the steps:
- Install new Oracle Home
- Apply the patch to the new Home
- Shut down the database
- Change Oracle Home to the new location
- Start the database
In case of problems:
- Shut down the database
- Change Oracle Home to the old one
- Start the database
Here are the advantages:
- The downtime is significantly reduced, to one-60th of the original time.
- The risk is reduced significantly, as there is no rolling back a patch; you just go to the older version.
- You can perform a "diff" on these two homes to see what changed. You can see the differences across multiple homes as well.
- You can take several databases running on the same server to the new Oracle Home one by one.
- You can see the various Oracle Homes and what patch level they are on using the inventory.
Return to "How do I do that in Oracle?"