Patching with OPatch
12c (12.1.3)
E53663-01
May 2014
This guide contains information pertaining to OPatch commands that are most commonly used in an Oracle Fusion Middleware environment.
The following topics are covered in this guide:
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.
This document contains information pertaining to OPatch commands that are most commonly used in an Oracle Fusion Middleware environment.
The following sections provide more information about OPatch for Oracle Fusion Middleware:
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 describes how OPatch can be used for the following types of patches:
Table 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 (PSUs) |
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. |
In previous releases of Oracle WebLogic Server, you can patch your Oracle WebLogic Server software using a utility called Smart Update. 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 (12.1.3), Smart Update is no longer supported. Instead, 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.
This section include the following sections:
Locating and Running OPatch in the Oracle Fusion Middleware Oracle Home
About the Version of OPatch Included with Oracle Fusion Middleware 12c
OPatch can be found in the following location after you install any Oracle Fusion Middleware product:
ORACLE_HOME/OPatch
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.1.3) includes OPatch Version 13.2.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, run the following command:
Change directory to the following directory:
cd ORACLE_HOME/OPatch/
Run the following command:
./opatch version
For example:
./opatch version OPatch Version: 13.2.0.0.0 OPatch succeeded.
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 and 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.
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 can simply restore the ORACLE_HOME/inventory
(on UNIX operating systems) or ORACLE_HOME\inventory
(on Windows operating systems) if it was backed up. If a backup does not exist, you may have to reinstall the software.
This section provides the following topics:
Summary of the Steps For Using OPatch in a Fusion Middleware Environment
Common OPatch Commands When Patching an Oracle Fusion Middleware Oracle home
Examples of Applying and Rolling Back Patches to an Oracle Fusion Middleware Installation
Using the OPatch lsinventory Command to Verify the Patches Applied to an Oracle home
Table 2 summarizes the typical steps required to patch your existing Fusion Middleware environment using OPatch.
Table 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. |
Section 3.5, "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. |
Section 3.6, "Verifying Your Installation After Applying a Patch" |
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. |
Section 3.4, "Troubleshooting a Patch by Viewing the OPatch Log File" |
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). |
Table 3 shows the most common OPatch commands for patching an Oracle Fusion Middleware Oracle home.
Table 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. |
Section 3.3.1, "Verifying the Prerequisites for a Patch" Section 3.3.2, "Applying a Single Patch Using the Apply Command" |
opatch napply |
This command applies multiple patches. |
Section 3.3.3, "Applying Multiple Patches Using the OPatch napply Command" |
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. |
Section 3.5, "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. |
Section 3.3.5, "Rolling Back Multiple Patches You Have Applied" |
This section provides some examples of using OPatch to patch an Oracle Fusion Middleware installation:
To verify that a patch can be applied to a specific Oracle home, use the -report
argument to the OPatch apply
command, as follows:
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.
Example 1 shows an example of using 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 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.2.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.2.0.0.0 OUI version : 13.2.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.1.3.0.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.
Example 2 shows an example of using 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 2 Using the OPatch napply Command to Apply Multiple Patch to an Oracle Fusion Middleware Oracle Home
> /opt/Oracle/products/fmw12c/OPatch/opatch napply -id 15941858,15955138 Oracle Interim Patch Installer version 13.2.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.2.0.0.0 OUI version : 13.2.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.1.3.0.0... Verifying the update... Applying interim patch '15955138' to OH '/opt/Oracle/products/fmw12c' Patching component oracle.wls.core.app.server, 12.1.3.0.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.
Example 3 shows an example of using 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 3 Using the OPatch rollback Command to Roll Back a Patch
> opatch rollback -id 15941858 Oracle Interim Patch Installer version 13.2.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.2.0.0.0 OUI version : 13.2.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.1.3.0.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.
Example 4 shows an example of using 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 4 Using the OPatch nrollback Command to Roll Back Multiple Patch
> /opt/Oracle/products/fmw12c/OPatch/opatch nrollback -id 15941858,15955138 Oracle Interim Patch Installer version 13.2.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.2.0.0.0 OUI version : 13.2.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.1.3.0.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.1.3.0.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, 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.
Example 5 shows sample output of the lsinventory
command, which indicates that a specific interim patch has been applied.
Example 5 Running the opatch lsinventory Command to Obtain the Oracle Home Information
> opatch lsinventory Oracle Interim Patch Installer version 13.2.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.2.0.0.0 OUI version : 13.2.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 -------------------------------------------------------------------------------- Interim 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.1.2.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, you should verify that your system is currently running successfully.
To verify your installations in an Oracle Fusion Middleware 12c environment:
Start all the servers in all the domains associated with the Oracle home you just patched.
Open the WebLogic Server Administration Console for each domain to verify the Administration Server and to view the status of the components in the domain.
Also, in any Oracle Fusion Middleware domain (where the Oracle Fusion Middleware Infrastructure is installed), open the Oracle Enterprise Manager Fusion Middleware Control console to view the status of the components in the domain.
From either console, you can verify that the servers and applications are up and running correctly. For more information, see the following topics in Administering Oracle Fusion Middleware:
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc
.
Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info
or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs
if you are hearing impaired.
Oracle Fusion Middleware Patching wth OPatch, 12c (12.1.3)
E53663-01
Copyright © 2014 Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate failsafe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.