For more information about using OPatch commands in an Oracle Fusion Middleware environment, see the following topics:
OPatch is a Java-based utility that runs on all supported operating systems and requires installation of the Oracle Universal Installer. It is used to apply patches to Oracle software.
The following topics provide more information about OPatch for Oracle Fusion Middleware:
Oracle provides several types of patches that you can use to patch your Oracle software with OPatch.
Note:
Oracle has recently implemented a new patch nomenclature for Oracle products. The new patch names, as well as the previous Oracle Fusion Middleware 11g names, are provided for reference.
Table 1-1 Patches that can be used with OPatch
New Name | Previously Used Name(s) | Description |
---|---|---|
Interim Patch |
PSE MLR Exception release One-Off x-fix Hotfix Security One-Off |
A patch containing one or more fixes made available to customers who cannot wait until the next patch set or new product release to get a fix. |
Bundle Patch |
Maintenance Pack Service Pack MLRs Cumulative Patch Update Release Bundle Patch |
An iterative, cumulative patch that is issued between patch sets. Bundle patches usually include only fixes, but some products may include minor enhancements. Examples are the Database Windows Bundles and SOA Bundle Patches. |
Security Patch Update (SPU) |
Critical Patch Updates CPUs |
An iterative, cumulative patch consisting of security fixes. Formerly known as Critical Patch Update. Note: The program name which delivers SPUs will still be called Critical Patch Update, as defined below: Critical Patch Update: Oracle's program for quarterly release of security fixes. Patches released as part of this program may be Patch Set Updates, Security Patch Updates, and Bundle Patches. Regardless of the patch type, the patches are cumulative. |
Patch Set Updates (PSU) |
Patch Set Updates are used to patch Oracle WebLogic Server only. Patch Set Updates are released on a quarterly basis, following the same schedule as the Critical Patch Updates (CPUs). These come out the closest Tuesday to the 15th of the months of January, April, July and October. Patch Set Update content is intended to address the top fifty critical bugs affecting the broad customer base. |
Smart Update is a standalone Java application that you use to upgrade the software installations quickly and easily with maintenance patches and maintenance packs. For Oracle Fusion Middleware 12c, Smart Update is no longer supported.
In previous releases of Oracle WebLogic Server, you could patch your Oracle WebLogic Server software using a utility called Smart Update. In Oracle Fusion Middleware 12c, Oracle WebLogic Server users can use OPatch to apply patches for both Oracle WebLogic Server and for Oracle Fusion Middleware.
OPatch offers many of the same features as Smart Update, but it has a different set of commands and command options. Oracle WebLogic Server users who are familiar with Smart Update should use this guide to get familiar with OPatch.
To ensure successful patching, there are several prerequisites you should complete to prepare your environment for running OPatch, such as obtaining the latest version of OPatch, obtaining required patches from My Oracle Support, and backing up the Oracle home.
For more information on preparing your environment, see the following topics:
Before you run OPatch, find the OPatch utility in the Oracle home, and verify that you have the latest version.
For more information, see the following topics:
ORACLE_HOME/OPatch
directory after you install any Oracle Fusion Middleware product.You can find and run the OPatch utility in the ORACLE_HOME/OPatch
directory after you install any Oracle Fusion Middleware product.
To run OPatch, simply run the opatch
command in this directory.
For example, to view the list of commands available for OPatch on a Unix system, enter the following:
./opatch -help
On Windows systems, use the following command:
opatch.bat -help
Oracle Fusion Middleware 12c (12.2.1.1) includes OPatch version 13.9.0.0.0. This version includes new features and capabilities that are designed to improve the experience of patching an Oracle Fusion Middleware 12c Oracle home.
In general, there is a version of OPatch available for each version of the Oracle Universal Installer software.
To identify the version of OPatch:
You can search for and download the patches required for your installation from My Oracle Support.
You can check for the latest patches available for your Oracle Fusion Middleware product or component by registering and logging in to My Oracle Support at:
http://support.oracle.com
After you log in to My Oracle Support, click the Patches & Updates tab, which provides various tools that allow you to quickly locate the patches most important to your Oracle software installation.
Note:
It important that you review the README file that is included with each patch. The README file includes important information about the requirements and procedures for applying the patch.
Before you run OPatch, ensure that you set the ORACLE_HOME environment variable.
OPatch uses the ORACLE_HOME environment variable to identify the Oracle home you are planning to patch.
It is highly recommended that you back up the Oracle home before any patch operation. You can back up the Oracle home using your preferred method.
You can use any method such as zip
, cp -r
, tar
, and cpio
to compress the Oracle home.
If the Oracle home does not appear when you execute the opatch lsinventory -detail
command, the Oracle home might be missing from the Central Inventory, or the Central Inventory itself could be missing or corrupted.
If the Oracle home is listed when you execute the opatch lsinventory -detail
command, but the products and components within the Oracle home are not listed, the inventory within the Oracle home (local inventory) might be missing or corrupted.
If the local inventory is corrupted or lost for some reason, you must restore the entire Oracle home if it was backed up. If a backup does not exist, you may have to reinstall the software.
Use OPatch to perform the necessary steps for applying a patch to an Oracle home.
The following topics describe how to use OPatch to patch Oracle Fusion Middleware:
opatch lsinventory
command.Applying a patch with OPatch involves a series of steps that must be performed to ensure successful patching.
The following table summarizes the typical steps required to patch your existing Fusion Middleware environment using OPatch.
Table 1-2 Using OPatch with Oracle Fusion Middleware
Task | Description | Documentation |
---|---|---|
Acquire patches required for your installation |
Log in, search for, and download the patches required for your specific installation. |
|
Review the README.txt file for the patch. |
Each patch archive includes a README file that contains important information and instructions that must be followed prior to applying your patch. It is important to review the README file because it provides any unique steps or other information specific to the patch. |
The README.txt file that is packaged within the patch archive |
Check for patch prerequisites. |
The OPatch |
|
Apply the patch. |
After you determine the Oracle home to which you need to apply the patch, and you have read the README file, then you should apply the patch with the |
|
Verify the patch was applied to the Oracle home successfully. |
The OPatch lsinventory command will show what patches have been applied to the Oracle home. Use this command to verify the application of the patch. |
Using the OPatch lsinventory Command to Verify the Patches Applied to an Oracle Home |
Verify that your software runs properly after you apply the patch. |
After the patching is complete and your servers are restarted, you should check your product software to verify that the issue has been resolved. |
|
Troubleshoot the application of a patch. |
If there are problems applying a patch, your first troubleshooting task is to review the log file for the OPatch session. |
|
Roll back the application of a patch. |
If for some reason the result is not satisfactory, you can use the If additional assistance is required, go to My Oracle Support (formerly OracleMetaLink). |
OPatch provides several commands that you can use to apply, roll back, and verify a patch for an Oracle home. You can use OPatch to apply and roll back a single patch or apply and roll back multiple patches.
Table 1-3 Common OPatch Commands Used When Patching an Oracle Fusion Middleware Environment
Command | Description | Example |
---|---|---|
opatch apply |
This command applies an interim patch to an Oracle home from the current directory. The ORACLE_HOME environment variable must be set to the Oracle home to be patched. |
|
opatch napply |
This command applies multiple patches. |
|
opatch lsinventory |
This command lists the inventory for a particular Oracle home, or displays all installations that can be found. This command does not have any required options. |
Using the OPatch lsinventory Command to Verify the Patches Applied to an Oracle Home |
opatch rollback |
This command removes an existing one-off patch from the appropriate Oracle home directory indicated by the reference ID. |
|
opatch nrollback |
This command rolls back multiple interim patches at the same time. |
After you obtain the patches required for your installation, use the appropriate OPatch commands to verify any patch prerequisites, apply a patch to an Oracle home, and if necessary, roll back the application of a patch.
The following topics provide some examples of using OPatch to patch an Oracle Fusion Middleware installation:
—report
argument to the opatch apply
command.opatch apply
command.opatch napply
command.opatch rollback
command.opatch nrollback
command.To verify that a patch can be applied to a specific Oracle home, use the —report
argument to the opatch apply
command.
For example:
opatch apply <path_to_patch_directory> -report
This command displays the actions that will be taken by the patch, but does not actually apply the patch. As a result, it allows you to verify that the prerequisites for the patch have been met.
To apply a single patch to an Oracle Fusion Middleware Oracle home, use the opatch apply
command.
Example 1-1 shows how to use the opatch apply
command to apply a patch to an Oracle Fusion Middleware Oracle home.
This example assumes that:
The patch you have downloaded has been saved to a directory that is named for the patch number in My Oracle Support. In this case, the patch number is 15941858.
The user changes directory to the patch directory and then runs the OPatch apply command. Alternatively, you can run the OPatch command from the ORACLE_HOME
/OPatch
directory and include the location of the patch as an argument to the command. For example:
opatch apply /opt/patches/15941858/
The OPatch directory is already included in the PATH variable on the host computer.
Example 1-1 Using the OPatch apply Command to Apply a Patch to an Oracle Fusion Middleware Oracle Home
> cd /opt/patches/15941858 > opatch apply Oracle Interim Patch Installer version 13.9.0.0.0 Copyright (c) 2013, Oracle Corporation. All rights reserved. Oracle Home : /opt/Oracle/products/fmw12c Central Inventory : /opt/Oracle/oraInventory from : /var/opt/Oracle/oraInst.loc OPatch version : 13.9.0.0.0 OUI version : 13.9.0.0.0 Log file location : /opt/Oracle/products/fmw12c/cfgtoollogs/opatch/15941858_Jun_10_2013_12_35_24/apply2013-06-10_12-35-15PM_1.log OPatch detects the Middleware Home as "/opt/Oracle/products/fmw12c" Applying interim patch '15941858' to OH '/opt/Oracle/products/fmw12c' Verifying environment and performing prerequisite checks... All checks passed. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/opt/Oracle/products/fmw12c') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Patching component oracle.wls.core.app.server 12.2.1.1.0... Verifying the update... Patch 15941858 successfully applied Log file location: /opt/Oracle/products/fmw12c/cfgtoollogs/opatch/15941858_Jun_10_2013_12_35_24/apply2013-06-10_12-35-15PM_1.log -------------------------------------------------------------------------------- There are no Interim patches installed in this Oracle Home. -------------------------------------------------------------------------------- OPatch succeeded.
To apply multiple patches to an Oracle Fusion Middleware Oracle home, use the opatch napply
command.
Example 1-2 shows how to use the opatch napply
command to apply multiple patches to an Oracle Fusion Middleware Oracle home.
This example assumes that the patches you have downloaded have been saved to a staging directory, such as:
/opt/patches
It also assumes you have changed directory to the staging directory and the staging directory contains a directory for each patch. For example:
/opt/patches/15941858 /opt/patches/15955138
Example 1-2 Using the OPatch napply Command to Apply Multiple Patches to an Oracle Fusion Middleware Oracle Home
> /opt/Oracle/products/fmw12c/OPatch/opatch napply -id 15941858,15955138 Oracle Interim Patch Installer version 13.9.0.0.0 Copyright (c) 2013, Oracle Corporation. All rights reserved. Oracle Home : /opt/Oracle/products/fmw12c Central Inventory : /opt/Oracle/oraInventory from : /var/opt/Oracle/oraInst.loc OPatch version : 13.9.0.0.0 OUI version : 13.9.0.0.0 Log file location : /opt/Oracle/products/fmw12c/cfgtoollogs/opatch/opatch2013-06-11_07-36-40AM_1.log OPatch detects the Middleware Home as "/opt/Oracle/products/fmw12c" Verifying environment and performing prerequisite checks... OPatch continues with these patches: 15941858 15955138 Do you want to proceed? [y|n] y User Responded with: Y All checks passed. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/opt/Oracle/products/fmw12c') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Applying interim patch '15941858' to OH '/opt/Oracle/products/fmw12c' Patching component oracle.wls.core.app.server,12.2.1.1.0... Verifying the update... Applying interim patch '15955138' to OH '/opt/Oracle/products/fmw12c' Patching component oracle.wls.core.app.server,12.2.1.1.0... Verifying the update... Patches 15941858,15955138 successfully applied. Log file location: /opt/Oracle/products/fmw12c/cfgtoollogs/opatch/opatch2013-06-11_07-36-40AM_1.log OPatch succeeded.
To roll back a patch that was applied to an Oracle Fusion Middleware Oracle home, use the opatch rollback
command.
Example 1-3 shows how to use the opatch rollback
command to roll back a patch that was applied to an Oracle Fusion Middleware Oracle home.
This example assumes that the OPatch directory is already included in the PATH variable on the host computer.
Example 1-3 Using the OPatch rollback Command to Roll Back a Patch
> opatch rollback -id 15941858 Oracle Interim Patch Installer version 13.9.0.0.0 Copyright (c) 2013, Oracle Corporation. All rights reserved. Oracle Home : /opt/Oracle/products/fmw12c Central Inventory : /opt/Oracle/oraInventory from : /var/opt/Oracle/oraInst.loc OPatch version : 13.9.0.0.0 OUI version : 13.9.0.0.0 Log file location : /opt/Oracle/products/fmw12c/cfgtoollogs/opatch/15941858_Jun_10_2013_13_12_20/rollback2013-06-10_13-12-10PM_1.log OPatch detects the Middleware Home as "/opt/Oracle/products/fmw12c" RollbackSession rolling back interim patch '15941858' from OH '/opt/Oracle/products/fmw12c' Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/opt/Oracle/products/fmw12c') Is the local system ready for patching? [y|n] y User Responded with: Y Patching component oracle.wls.core.app.server, 12.2.1.1.0... RollbackSession removing interim patch '15941858' from inventory Log file location: /opt/Oracle/products/fmw12c/cfgtoollogs/opatch/15941858_Jun_10_2013_13_12_20/rollback2013-06-10_13-12-10PM_1.log OPatch succeeded.
To roll back multiple patches that were previously applied to an Oracle Fusion Middleware Oracle home, use the opatch nrollback
command.
Example 1-4 shows how to use the opatch nrollback
command to roll back multiple patches that were previously applied to an Oracle Fusion Middleware Oracle home.
This example assumes that the patches you applied were patch numbers 15941858 and 15955138.
Example 1-4 Using the OPatch nrollback Command to Roll Back Multiple Patches
> /opt/Oracle/products/fmw12c/OPatch/opatch nrollback -id 15941858,15955138 Oracle Interim Patch Installer version 13.9.0.0.0Copyright (c) 2013, Oracle Corporation. All rights reserved. Oracle Home : /opt/Oracle/products/fmw12c Central Inventory : /opt/Oracle/oraInventory from : /var/opt/Oracle/oraInst.loc OPatch version : 13.9.0.0.0 OUI version : 13.9.0.0.0 Log file location : /opt/Oracle/products/fmw12c/cfgtoollogs/opatch/opatch2013-06-10_14-24-54PM_1.log OPatch detects the Middleware Home as "/opt/Oracle/products/fmw12c" Patches will be rolled back in the following order: 15941858 15955138 The following patch(es) will be rolled back: 15941858 15955138 Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/opt/Oracle/products/fmw12c') Is the local system ready for patching? [y|n] y User Responded with: Y Rolling back patch 15941858... RollbackSession rolling back interim patch '15941858' from OH '/opt/Oracle/products/fmw12c' Patching component oracle.wls.core.app.server, 12.2.1.1.0.. RollbackSession removing interim patch '15941858' from inventory Rolling back patch 15955138... RollbackSession rolling back interim patch '15955138' from OH '/opt/Oracle/products/fmw12c' Patching component oracle.wls.core.app.server, 12.2.1.1.0... RollbackSession removing interim patch '15955138' from inventory Log file location: /opt/Oracle/products/fmw12c/cfgtoollogs/opatch/opatch2013-06-10_14-24-54PM_1.log OPatch succeeded.
To understand how a patch is applied and to troubleshoot any problems with the application of a patch, you should review the log file for the OPatch session.
The log file location is usually saved to the following directory or a subdirectory within this location:
ORACLE_HOME/cfgtoollogs/opatch/
Subdirectories within this location are identified by the patch number or by the command you ran (such as lsinv).
The file name for each log file identifies the date and time it was executed. For example:
opatch2013-06-10_14-24-54PM_1.log
You can also locate the log file by viewing the output of the opatch command. The log file name and location is included in the output of the command. For example:
Log file location: /opt/Oracle/products/fmw12c/cfgtoollogs/opatch/opatch2013-06-10_14-24-54PM_1.log
To verify what patches have been applied to an Oracle home, or to find out additional information about the Oracle home, use the opatch lsinventory
command.
The following example shows sample output of the lsinventory
command, which indicates that a specific interim patch has been applied.
Example 1-5 Running the opatch lsinventory Command to Obtain the Oracle Home Information
> opatch lsinventory Oracle Interim Patch Installer version 13.9.0.0.0 Copyright (c) 2016, Oracle Corporation. All rights reserved. Oracle Home : /opt/Oracle/products/fmw12c Central Inventory : /opt/Oracle/oraInventory from : /var/opt/Oracle/oraInst.loc OPatch version : 13.9.0.0.0 OUI version : 13.9.0.0.0 Log file location : /opt/Oracle/products/fmw12c/cfgtoollogs/opatch/opatch2013-06-10_12-32-37PM_1.log OPatch detects the Middleware Home as "/opt/Oracle/products/fmw12c" Lsinventory Output file location : /opt/Oracle/products/fmw12c/cfgtoollogs/opatch/lsinv/lsinventory2013-06-10_12-32-37PM.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: ARU platform id: 226 ARU platform description:: Linux x86-64Interim patches (1) : Patch 15941858 : applied on Mon Jun 10 12:39:07 PDT 2013 Unique Patch ID: 150220 Patch description: "TEST PATCH FOR WLS 12.2.1.1.0 - JAVA CLASSES PATCH" Created on 17 May 2013, 11:54:20 hrs PST8PDT Bugs fixed: 783169, 15941850 -------------------------------------------------------------------------------- OPatch succeeded.
After you apply one or more patches successfully, use the WebLogic Administration Console, Fusion Middleware Control, and your organization’s application testing to verify that your system is currently running successfully.
To verify your installations in an Oracle Fusion Middleware 12c environment: