2 Patching Your Environment Using OPatchAuto
OPatchAuto, which is automatically installed with the OPatch utility as a part of your Fusion Middleware installation, provides several commands that you can use to automate the application and roll back of a patch for a single host or multi-host environment.
- About Zero Downtime Patching with OPatchAuto
If you patch a multi-host topology, one of the first steps after you download a patch is to identify whether the patch is compatible for Zero Downtime (ZDT) patching. - Preparing to Use OPatchAuto
To ensure successful patching, complete the prerequisites to prepare your environment to run OPatchAuto, such as obtaining the latest version of OPatch, obtaining required patches from My Oracle Support, and backing up the environment. - Using OPatchAuto to Patch Oracle Fusion Middleware
You can use OPatchAuto to automate the necessary steps for applying or rolling back a patch on a single host or multi-host environment.
About Zero Downtime Patching with OPatchAuto
If you patch a multi-host topology, one of the first steps after you download a patch is to identify whether the patch is compatible for Zero Downtime (ZDT) patching.
If it is compatible, you can use one of the following methods to apply the patch with OPatchAuto:
- What is a Zero Downtime Patch?
Zero Downtime (ZDT) patching provides a process and mechanism for rolling out a patch across a domain while allowing applications to continue to service requests. - Identifying a Zero Downtime Patch
You can identify a ZDT patch by the value of the patch uptime option in the patch metadata. - About the Available Patch Plans
After you identify whether a patch is suitable for ZDT patching, identify and select a patch plan. As a result, it is important that you review and understand the characteristics and limitations of the patch plans available for applying a patch.
Parent topic: Patching Your Environment Using OPatchAuto
What is a Zero Downtime Patch?
Zero Downtime (ZDT) patching provides a process and mechanism for rolling out a patch across a domain while allowing applications to continue to service requests.
You can apply a ZDT patch by using OPatchAuto, which rolls out the change to one node at a time and allows a load balancer (typically, Oracle Traffic Director (OTD)) to redirect incoming traffic to the remaining nodes until the change is complete.
The recommended way to identify whether a patch is suitable for ZDT patching is to determine the value of the patch uptime option in the metadata of the patch. To identify a ZDT patch, see Identifying a Zero Downtime Patch.
Parent topic: About Zero Downtime Patching with OPatchAuto
Identifying a Zero Downtime Patch
You can identify a ZDT patch by the value of the patch uptime option in the patch metadata.
patchdeploy.xml
in the PATCH_HOME/etc/config
directory, where PATCH_HOME is the location of the patch directory that contains the patch.
If the value of patch-uptime-option
is FMW_ROLLING_ORACLE_HOME
, as shown in the following example:
<patch-uptime-option>FMW_ROLLING_ORACLE_HOME<patch-uptime-option>
Or the value is FMW_ROLLING_SESSION
:
<patch-uptime-option>FMW_ROLLING_SESSION<patch-uptime-option>
Then, the patch is suitable for ZDT patching.
If FMW_ROLLING_ORACLE_HOME
or FMW_ROLLING_SESSION
does not appear in the patch metadata, then you know that the patch is not suitable for ZDT patching. As a result, the patch is not compatible with a ZDT patch plan. The value of the patch uptime option helps you to select the appropriate patch plan to apply the patch. For information on selecting a patch plan, see About the Available Patch Plans.
Parent topic: About Zero Downtime Patching with OPatchAuto
About the Available Patch Plans
After you identify whether a patch is suitable for ZDT patching, identify and select a patch plan. As a result, it is important that you review and understand the characteristics and limitations of the patch plans available for applying a patch.
A patch plan describes the sequence of steps to execute in order to deploy a patch. To execute a plan, you must specify the plan name on the command line using the -plan
option. See Patch Plans in Oracle OPatch User’s Guide for Windows and UNIX.
To discover the plans available in an Oracle home, use the opatchauto lsplans
command. The following example shows a sample output of this command, which lists and describes the available plans:
cd ORACLE_HOME/OPatch ./opatchauto lsplans Oracle OPatchAuto Version 13.9.4.2.1 Copyright (c) 2017, Oracle Corporation. All rights reserved. OPatchAuto available patch plan information: Product Name: OPatchAuto Core Patch Plan Name: rolling (Default) Description: Process patch targets on a per-home basis and tries to minimize downtime. Patch Plan Name: parallel Description: Process patch targets in parallel and does not attempt to minimize downtime. Product Name: Oracle Fusion Middleware Patch Plan Name: wls-zdt-rollout Description: Performs full WLS ZDT rollout. Patch Plan Name: wls-push-image Description: Performs only image push portion of WLS ZDT rollout.
After you identify whether the patch is a ZDT patch (see Identifying a Zero Downtime Patch), consider the following information when you choose a plan:
-
If a patch is not a ZDT patch, use the parallel patch plan to apply the patch, as shown in Applying a non-ZDT Patch on Multiple Hosts Using the Apply Command.
-
If a patch is a ZDT patch, there are two available plans,
rolling
andwls-zdt-rollout
.-
Use the rolling option if the patch is a
FMW_ROLLING_ORACLE_HOME
patch. This option uses a pure OPatchAuto approach, where OPatchAuto is used to perform all patching operations. This option is the recommended method for Fusion Middleware.With this approach, you can perform both image based and non-image based patching. You can also use this approach to perform what is known as configuration patching (or patching operations performed on a domain). However, this method has no session management features, such as migrating a session to another server when a server is shut down.
For information on how to apply a ZDT patch with the
rolling
plan, see Applying a ZDT Patch on Multiple Hosts Using the Apply Command. -
Use the wls-zdt-rollout option if the patch is a
FMW_ROLLING_SESSION
patch. You also use OPatchAuto for this option, but certain lifecycle operations are delegated to WebLogic Server components, such as WLST or the WebLogic Server Administration Console. This option is recommended for WebLogic Server only.This approach only supports image based patching and does not support configuration patching. But, it supports migrating a session when an instance is shut down.
This document does not cover the steps to apply a ZDT patch using this option. See Introduction to Zero Downtime Patching in Administering Zero Downtime Patching Workflows to learn more about this option.
-
Parent topic: About Zero Downtime Patching with OPatchAuto
Preparing to Use OPatchAuto
To ensure successful patching, complete the prerequisites to prepare your environment to run OPatchAuto, such as obtaining the latest version of OPatch, obtaining required patches from My Oracle Support, and backing up the environment.
- Locating and Obtaining the Latest Version of OPatch and OPatchAuto
Before you run OPatchAuto, find the OPatchAuto utility in the Oracle home and verify that you have the latest version. If you have the latest version of OPatchAuto, you have the latest version of OPatch. - Obtaining Patches Required For Your Installation
You can search for and download the latest patches for your installation from My Oracle Support. - Directory Variables Used in the Examples
The examples in this guide show sample commands to run OPatchAuto. These example commands use variables to reference key directories. - Creating a Topology File for Patching Multiple Hosts
To apply a patch on multiple hosts, you must create a topology file that defines the elements of your topology. To create a topology file, use FMW (Fusion Middleware) Composer, which is located inORACLE_HOME/oracle_common/bin
. Composer provides a graphical user interface that describes the Fusion Middleware topology. - Creating a Wallet
To run OPatchAuto successfully, you must provide a wallet on the command line that contains the necessary password credentials, such as the SSH credentials for each host. - Configuring Node Manager to Support Start and Stop Operations
To ensure that OPatchAuto can properly stop and start your system during patching, you must configure the Node Manager to support the start and stop operations. - Remote Host Patching on Windows
For patching on Windows systems, ensure that Cygwin SSH server is installed and set up. OPatchAuto does not support other SSH servers currently. - Backup and Recovery Considerations for Patching
It is highly recommended that you back up the Oracle home before any patch operation. You can back up the Oracle home by using your preferred method.
Parent topic: Patching Your Environment Using OPatchAuto
Locating and Obtaining the Latest Version of OPatch and OPatchAuto
Before you run OPatchAuto, find the OPatchAuto utility in the Oracle home and verify that you have the latest version. If you have the latest version of OPatchAuto, you have the latest version of OPatch.
- Locating and Running OPatchAuto in the Oracle Fusion Middleware Oracle Home
You can find and run the OPatchAuto utility in theORACLE_HOME/OPatch
directory after you install any Oracle Fusion Middleware product. - Identifying the Version of OPatchAuto Included with Oracle Fusion Middleware 12c
Oracle Fusion Middleware 12c (12.2.1.4.0) includes OPatchAuto version 13.9.4.2.1. Use theopatchauto version
command to verify that you have this version.
Parent topic: Preparing to Use OPatchAuto
Locating and Running OPatchAuto in the Oracle Fusion Middleware Oracle Home
You can find and run the OPatchAuto utility in the ORACLE_HOME/OPatch
directory after you install any Oracle Fusion Middleware product.
To run OPatchAuto, run the opatchauto
command in this directory.
For example, to view the list of commands available for OPatchAuto on a Unix system, enter the following:
./opatchauto -help
Identifying the Version of OPatchAuto Included with Oracle Fusion Middleware 12c
Oracle Fusion Middleware 12c (12.2.1.4.0) includes OPatchAuto version 13.9.4.2.1. Use the opatchauto version
command to verify that you have this version.
In general, there is a version of OPatch and OPatchAuto available for each version of the Oracle Universal Installer software.
To identify the version of OPatchAuto:
If you have the latest version of OPatchAuto, you have the latest version of OPatch. If you do not have the latest version, OPatch can be downloaded by using the patch 6880880. Always use the latest download designated for your installation. For Oracle Fusion Middleware 12c (12.2.1.4.0), select OUI NextGen 13.9.1 for the version and platform, and then click Download to download OUI NextGen OPatch 13.9.1.
Obtaining Patches Required For Your Installation
You can search for and download the latest patches 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 sign in to My Oracle Support, click the Patches & Updates tab. This tab provides various tools that allow you to locate the patches most important to your Oracle software installation.
Note:
It is important that you review the README file that is included with each patch. The README file includes important information about the requirements and procedures to apply the patch.
Parent topic: Preparing to Use OPatchAuto
Directory Variables Used in the Examples
The examples in this guide show sample commands to run OPatchAuto. These example commands use variables to reference key directories.
The following directory variables are used in this guide:
-
ORACLE_HOME, which is used to reference the location of the Oracle home directory.
-
PATCH_HOME, which is used to reference the location of the patch directory that contains the patches to be applied to the Oracle home.
-
DOMAIN_HOME, which is used to reference the location of the domain home directory.
Parent topic: Preparing to Use OPatchAuto
Creating a Topology File for Patching Multiple Hosts
To apply a patch on multiple hosts, you must create a topology file that defines the elements of your topology. To create a topology file, use FMW (Fusion Middleware) Composer, which is located in ORACLE_HOME/oracle_common/bin
. Composer provides a graphical user interface that describes the Fusion Middleware topology.
Use Composer to add and define each element of the topology individually. After you create your topology in Composer, you can save it to an XML or JSON file. You can then provide this file to OPatchAuto to apply the patch.
Parent topic: Preparing to Use OPatchAuto
Creating a Wallet
To run OPatchAuto successfully, you must provide a wallet on the command line that contains the necessary password credentials, such as the SSH credentials for each host.
To create a wallet, you can use one of the following tools:
- Creating a Wallet Using the patchingWallet Tool
You can use thepatchingWallet.sh
tool in theORACLE_HOME/OPatch/auto/core/bin
directory to create a wallet file.
Parent topic: Preparing to Use OPatchAuto
Creating a Wallet Using the patchingWallet Tool
You can use the patchingWallet.sh
tool in the ORACLE_HOME/OPatch/auto/core/bin
directory to create a wallet file.
When you create a wallet:
-
Define the SSH credentials for each host by using the format
“user:hostname:ssh”
-
Define the WebLogic administrator credentials by using the format
“adminuser:adminhost:wls”
. Thewls
credential is required if you are using thewls-zdt-rollout
option to apply a ZDT patch.
The following shows an example of how to create a wallet and add the credentials to the wallet:
./patchingWallet.sh -walletDir wallet_location –create "user:adminhost:ssh" "user:host1:ssh" "user:host2:ssh" "adminuser:domain_name/ADMIN" "adminuser:domain_name/NM"
For example:
./patchingWallet.sh -walletDir /tmp/samplewallet –create "oracle:adminhost:ssh" "oracle:host1:ssh" "oracle:host2:ssh" "weblogic:zdtDomain/ADMIN" "weblogic:zdtDomain/NM"
The tool prompts you to enter and confirm the password for each credential:
Enter Password for oracle:adminhost:ssh: Confirm Password for oracle:adminhost:ssh: Enter Password for oracle:host1:ssh: Confirm Password for oracle:host1:ssh: Enter Password for oracle:host2:ssh: Confirm Password for oracle:host2:ssh: Enter Password for weblogic:zdtDomain/ADMIN: Confirm Password for weblogic:zdtDomain/ADMIN: Enter Password for weblogic:zdtDomain/NM: Confirm Password for weblogic:zdtDomain/NM:
Parent topic: Creating a Wallet
Configuring Node Manager to Support Start and Stop Operations
To ensure that OPatchAuto can properly stop and start your system during patching, you must configure the Node Manager to support the start and stop operations.
To do this, set the QuitEnabled
and CrashRecoveryEnabled
properties in the nodemanager.properties
file as follows:
QuitEnabled=true CrashRecoveryEnabled=false
The default value for CrashRecoveryEnabled
is false
.
By default, this file is created in the Node Manager home directory, where the Node Manager home is typically DOMAIN_HOME/nodemanager
.
Note:
-
QuitEnabled=true
is only required if you use therolling
plan to apply a ZDT patch. This is not required if you use thewls-zdt-rollout
plan, which is described in Introduction to Zero Downtime Patching in Administering Zero Downtime Patching Workflows. -
If you use the
wls-zdt-rollout
plan, then setCrashRecoveryEnabled
totrue
.
After you update these properties, restart one or more Node Managers.
For more information about the nodemanager.properties
file, see Reviewing nodemanager.properties in Administering Node Manager for
Oracle WebLogic Server.
Parent topic: Preparing to Use OPatchAuto
Remote Host Patching on Windows
For patching on Windows systems, ensure that Cygwin SSH server is installed and set up. OPatchAuto does not support other SSH servers currently.
See Remote Host Execution Using SSH in the Oracle OPatch User’s Guide for Windows and UNIX.
Parent topic: Preparing to Use OPatchAuto
Backup and Recovery Considerations for Patching
It is highly recommended that you back up the Oracle home before any patch operation. You can back up the Oracle home by 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.
Parent topic: Preparing to Use OPatchAuto
Using OPatchAuto to Patch Oracle Fusion Middleware
You can use OPatchAuto to automate the necessary steps for applying or rolling back a patch on a single host or multi-host environment.
The following topics describe how to use OPatchAuto to patch Oracle Fusion Middleware.
- Summary of the Steps For Using OPatchAuto in a Fusion Middleware Environment
Applying a patch with OPatchAuto involves a series of steps that must be performed to ensure successful patching. - Applying a Patch on a Single Host Using OPatchAuto
After you obtain the patches required for your installation, use theopatchauto apply —analyze
command to verify prerequisites, and then useopatchauto apply
to apply a patch on a single host. If needed, you can useopatchauto rollback
to roll back a patch. - Applying a Patch on Multiple Hosts Using OPatchAuto
After you obtain the necessary patches, use theopatchauto apply —analyze
command to verify prerequisites, and then useopatchauto apply
to apply a patch on multiple hosts. If needed, you can useopatchauto rollback
to roll back a patch. - Troubleshooting a Patch by Viewing the OPatchAuto Log File
To understand how a patch is applied and to troubleshoot any problems with the application of a patch, review the log file for the OPatchAuto session. - Using the OPatch lsinventory Command to Verify the Patches Applied to an Oracle Home
To verify what patches have been applied to an Oracle home, or to find out additional information about the Oracle home, use theopatch lsinventory
command. - Using the listDomainPatchInventory.sh Command to Verify the Patches Applied to a Domain
To verify the patches that have been applied to a domain, use thelistDomainPatchInventory.sh
command. Use this command with the OPatchlsinventory
command to verify that the patch has been applied successfully. - Verifying the Installation after Applying a Patch
After you apply one or more patches, use the WebLogic Administration Console, Fusion Middleware Control, and your organization’s application testing to verify that your system is running successfully.
Parent topic: Patching Your Environment Using OPatchAuto
Summary of the Steps For Using OPatchAuto in a Fusion Middleware Environment
Applying a patch with OPatchAuto 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 OPatchAuto.
Table 2-1 Using OPatchAuto 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. You do not need to worry about checking whether OPatchAuto supports a particular patch type. If OPatchAuto does not support a particular patch type, you are notified when you run the tool. |
|
Review the |
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 |
For a multi-host environment, identify whether the patch is a ZDT patch. |
To identify whether the patch is a ZDT patch, determine the patch uptime option in |
|
Check for patch prerequisites. |
The OPatchAuto |
If you are patching a single host environment, see Verifying the Prerequisites for Applying a Patch on a Single Host. If you are patching a multi-host environment, see Verifying the Prerequisites for Applying a Patch on Multiple Hosts. |
Apply the patch. |
After you determine the Oracle home to which you need to apply the patch and have read the README file, you can use the |
If you are patching a single-host environment, see Applying a Patch on a Single Host Using the Apply Command. If you are patching a multi-host environment, see one of the following, depending on whether the patch is suitable for ZDT patching:
|
Verify that the patch was applied to the Oracle home successfully. |
The OPatch |
Using the OPatch lsinventory Command to Verify the Patches Applied to an Oracle Home Using the listDomainPatchInventory.sh Command to Verify the Patches Applied to a Domain |
Verify that your software runs properly after you apply the patch. |
After patching is complete and your servers are restarted, 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 OPatchAuto session. |
|
Roll back the application of a patch. |
If for some reason the result is not satisfactory, you can use the If more assistance is required, go to My Oracle Support (formerly OracleMetaLink). |
For a single host environment, see Rolling Back a Patch You Have Applied on a Single Host. For a multi-host environment, see Rolling Back a Patch You Have Applied on Multiple Hosts. |
Parent topic: Using OPatchAuto to Patch Oracle Fusion Middleware
Applying a Patch on a Single Host Using OPatchAuto
After you obtain the patches required for your installation, use the opatchauto apply —analyze
command to verify prerequisites, and then use opatchauto apply
to apply a patch on a single host. If needed, you can use opatchauto rollback
to roll back a patch.
Patching a single host environment with OPatchAuto involves the following tasks:
- Verifying the Prerequisites for Applying a Patch on a Single Host
To verify that a patch can be applied on a single host, use the—analyze
argument to the OPatchAutoapply
command. For single host patching, you must also provide the domain location using the—instance
argument. - Applying a Patch on a Single Host Using the Apply Command
To apply a patch on a single host, use theopatchauto apply
command. This is the same command asopatchauto apply —analyze
, except you remove the—analyze
argument when you are ready to apply the patch. - Rolling Back a Patch You Have Applied on a Single Host
If you apply a patch and the results are not satisfactory, use theopatchauto rollback
command to roll back the application of the patch. This is the same command asopatchauto rollback –analyze
, except you remove the-analyze
argument when you are ready to roll back the patch.
Parent topic: Using OPatchAuto to Patch Oracle Fusion Middleware
Verifying the Prerequisites for Applying a Patch on a Single Host
To verify that a patch can be applied on a single host, use the —analyze
argument to the OPatchAuto apply
command. For single host patching, you must also provide the domain location using the —instance
argument.
The following command shows how to verify the prerequisites for applying a patch on a single host:
opatchauto apply PATCH_HOME -analyze -instance DOMAIN_HOME -wallet wallet_location -walletPassword password_ifneeded -wls-admin-host weblogic_adminserver_host:port
For example:
opatchauto apply /home/oracle/patches/15941858 -analyze -instance /home/oracle/config/domains/exampledomain -wallet /tmp/samplewallet -wls-admin-host examplehost.exampledomain.com:7001
If you want to apply multiple patches in one session, use the –phBaseDir
option.
This command analyzes and displays the actions that are 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.
If any prerequisite checks fail, refer to the output and log file to fix the issues before you continue. For example, a common failure is the detection of patch conflicts. If any patch conflicts occur, follow the instructions in the log file for how to obtain a merge patch from Oracle Support.
Parent topic: Applying a Patch on a Single Host Using OPatchAuto
Applying a Patch on a Single Host Using the Apply Command
To apply a patch on a single host, use the opatchauto apply
command. This is the same command as opatchauto apply —analyze
, except you remove the —analyze
argument when you are ready to apply the patch.
The following example shows how to use the opatchauto apply
command to apply a patch to an Oracle Fusion Middleware environment on a single host.
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.
-
Run the OPatchAuto command from the
ORACLE_HOME/OPatch
directory and include the location of the patch (PATCH_HOME) as an argument to the command.
Note:
When you run the opatchauto apply
command, make a note of the session id (for example, EKZR) in the command output. This simplifies the rollback process if you decide to roll back the patch later.
opatchauto apply PATCH_HOME -instance DOMAIN_HOME -wallet wallet_location -walletPassword password_ifneeded -wls-admin-host weblogic_adminserver_host:port
For example:
opatchauto apply /home/oracle/patches/15941858 -instance /home/oracle/config/domains/exampledomain -wallet /tmp/samplewallet -walletPassword password -wls-admin-host examplehost.exampledomain.com:7001
Parent topic: Applying a Patch on a Single Host Using OPatchAuto
Rolling Back a Patch You Have Applied on a Single Host
If you apply a patch and the results are not satisfactory, use the opatchauto rollback
command to roll back the application of the patch. This is the same command as opatchauto rollback –analyze
, except you remove the -analyze
argument when you are ready to roll back the patch.
The following example shows how to use the opatchauto rollback
command to roll back a patch that was applied to an Oracle Fusion Middleware environment on a single host.
To do a rollback, you follow the same process that you used to apply the patch. That is, you first do a test run of the opatchauto rollback
command:
Note:
You can simplify the command if you provide the session id (for example, EKZR) that was used to apply the patch. Then, OPatchAuto can derive all the necessary command-line parameters.opatchauto rollback –session session_id -analyze –wallet wallet_location -walletPassword password_ifneeded -wls-admin-host weblogic_adminserver_host:port
For example:
opatchauto rollback –session EKZR -analyze –wallet /tmp/samplewallet -walletPassword password -wls-admin-host examplehost.exampledomain.com:7001
When the test run successfully passes, perform the actual rollback of the patch:
opatchauto rollback –session session_id –wallet wallet_location -walletPassword password_ifneeded -wls-admin-host weblogic_adminserver_host:port
For example:
opatchauto rollback –session EKZR –wallet /tmp/samplewallet -walletPassword password -wls-admin-host examplehost.exampledomain.com:7001
Alternatively, you can roll back the patch by pointing OPatchAuto to a copy of the unzipped patch as follows:
opatchauto rollback unzipped_patch_location -instance DOMAIN_HOME –wallet wallet_location -walletPassword password_ifneeded -wls-admin-host weblogic_adminserver_host:port
Or, you can specify the patch id using the -id option without specifying the location of the patch directory.
For example:
opatchauto rollback -id 12345 –wallet wallet_location -walletPassword password_ifneeded -wls-admin-host weblogic_adminserver_host:port
Parent topic: Applying a Patch on a Single Host Using OPatchAuto
Applying a Patch on Multiple Hosts Using OPatchAuto
After you obtain the necessary patches, use the opatchauto apply —analyze
command to verify prerequisites, and then use opatchauto apply
to apply a patch on multiple hosts. If needed, you can use opatchauto rollback
to roll back a patch.
Note:
Before you apply a patch on multiple hosts, ensure that you have created a topology file by using FMW Composer. You must supply this file, which can be either an XML or JSON file, on the command line using the -topology
option when you run OPatchAuto. OPatchAuto uses this file to obtain information about the environment that you want to patch.
Patching a multi-host environment with OPatchAuto involves the following tasks:
- Verifying the Prerequisites for Applying a Patch on Multiple Hosts
To ensure successful patching, use theopatchauto apply —analyze
command to check for any prerequisites before you apply a patch. - Applying a non-ZDT Patch on Multiple Hosts Using the Apply Command
To apply a non-ZDT patch, use theopatchauto apply
command with theparallel
patch plan. This command is the same command asopatchauto apply -analyze
, except you remove the-analyze
argument when you are ready to apply the patch. - Applying a ZDT Patch on Multiple Hosts Using the Apply Command
To apply a Zero Downtime (ZDT) patch, use theopatchauto apply
command with therolling
patch plan. This command is the same command asopatchauto apply -analyze
, except you remove the-analyze
argument when you are ready to apply the patch. - Rolling Back a Patch You Have Applied on Multiple Hosts
If you apply a patch and the results are not satisfactory, use theopatchauto rollback
command to roll back the application of a patch. This is the same command asopatchauto rollback –analyze
, except you remove the-analyze
argument when you are ready to roll back the patch. - Setting SSL Arguments (SSL only Environment)
Parent topic: Using OPatchAuto to Patch Oracle Fusion Middleware
Verifying the Prerequisites for Applying a Patch on Multiple Hosts
To ensure successful patching, use the opatchauto apply —analyze
command to check for any prerequisites before you apply a patch.
To verify that a patch can be applied to a specific Oracle home (ORACLE_HOME) and domain location (DOMAIN_HOME) on multiple hosts, use the —analyze
argument to the OPatchAuto apply
command.
opatchauto apply PATCH_HOME -analyze -plan patch_plan -topology path_to_topology_file -wallet wallet_location -walletPassword password_ifneeded
For example:
opatchauto apply /home/oracle/patches/15941858 -analyze -plan rolling -topology /home/oracle/topologies/topology-1.0.xml -wallet /tmp/samplewallet -walletPassword password
If you want to apply multiple patches in one session, use the –phBaseDir
option.
Note that rolling
is the default patch plan if no plan is specified on the command line. For information on identifying the available plans, see About the Available Patch Plans.
This command displays the actions that are 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.
If any prerequisite checks fail, refer to the command output and log file to fix any issues before you continue. For example, a common failure is the detection of patch conflicts. If any patch conflicts occur, follow the instructions in the log file for how to obtain a merge patch from Oracle Support.
Parent topic: Applying a Patch on Multiple Hosts Using OPatchAuto
Applying a non-ZDT Patch on Multiple Hosts Using the Apply Command
To apply a non-ZDT patch, use the opatchauto apply
command with the parallel
patch plan. This command is the same command as opatchauto apply -analyze
, except you remove the -analyze
argument when you are ready to apply the patch.
The following example shows how to use the opatchauto apply
command to apply a non-ZDT patch to an Oracle Fusion Middleware environment on multiple hosts.
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.
-
Run the OPatchAuto command from the
ORACLE_HOME/OPatch
directory and include the location of the patch (PATCH_HOME) as an argument to the command.
Note:
When you run the opatchauto apply
command, make a note of the session id (for example, EKZR) in the command output. The session id simplifies the rollback process if you decide to roll back the patch later.
opatchauto apply PATCH_HOME -plan parallel -topology path_to_topology_file -wallet wallet_location -walletPassword password_ifneeded
For example:
opatchauto apply /home/oracle/patches/15941858 -plan parallel -topology /home/oracle/topologies/topology-1.0.xml -wallet /tmp/samplewallet -walletPassword password
Parent topic: Applying a Patch on Multiple Hosts Using OPatchAuto
Applying a ZDT Patch on Multiple Hosts Using the Apply Command
To apply a Zero Downtime (ZDT) patch, use the opatchauto apply
command with the rolling
patch plan. This command is the same command as opatchauto apply -analyze
, except you remove the -analyze
argument when you are ready to apply the patch.
The following example shows how to use the opatchauto apply
command to apply a ZDT patch to an Oracle Fusion Middleware environment on multiple hosts.
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.
-
Run the OPatchAuto command from the
ORACLE_HOME/OPatch
directory and include the location of the patch (PATCH_HOME) as an argument to the command.
Note:
-
When you run the
opatchauto apply
command, make a note of the session id (for example, EKZR) in the command output. The session id simplifies the rollback process if you decide to roll back the patch later. -
rolling
is the default patch plan if no plan is specified on the command line.
opatchauto apply PATCH_HOME -plan rolling -topology path_to_topology_file -wallet wallet_location -walletPassword password_ifneeded
For example:
opatchauto apply /home/oracle/patches/15941858 -plan rolling -topology /home/oracle/topologies/topology-1.0.xml -wallet /tmp/samplewallet -walletPassword password
Parent topic: Applying a Patch on Multiple Hosts Using OPatchAuto
Rolling Back a Patch You Have Applied on Multiple Hosts
If you apply a patch and the results are not satisfactory, use the opatchauto rollback
command to roll back the application of a patch. This is the same command as opatchauto rollback –analyze
, except you remove the -analyze
argument when you are ready to roll back the patch.
The following example shows how to use the opatchauto rollback
command to roll back a patch that was applied to an Oracle Fusion Middleware environment on multiple hosts.
To do a rollback, you follow the same process that you used to apply the patch. That is, you first do a test run of the opatchauto rollback
command:
Note:
You can simplify the command if you provide the session id (for example, EKZR) that was used to apply the patch. Then, OPatchAuto can derive all the necessary command-line parameters.
opatchauto rollback –session session_id -analyze -walletPassword password_ifneeded
For example:
opatchauto rollback –session EKZR -analyze -walletPassword password
When the test run successfully passes, perform the actual rollback of the patch:
opatchauto rollback –session session_id -walletPassword password_ifneeded
For example:
opatchauto rollback –session EKZR -walletPassword password
Alternatively, you can roll back the patch by pointing OPatchAuto to a copy of the unzipped patch as follows:
opatchauto rollback unzipped_patch_location -topology path_to_topology_file –wallet wallet_location -walletPassword password_ifneeded
Or, you can specify the patch id using the -id
option without specifying the location of the patch directory, as shown in the following example:
opatchauto rollback -id 12345 -wallet /tmp/samplewallet -topology /home/oracle/topologies/topology-1.0.json
Parent topic: Applying a Patch on Multiple Hosts Using OPatchAuto
Setting SSL Arguments (SSL only Environment)
-
Provide the administration server details with the protocol information. For example:
-wls-admin-host t3s://<HOST_NAME>
. -
If required, set additional system properties while invoking opatchauto. For example:
-Dweblogic.security.TrustKeyStore=DemoTrust
.
For additional information related to properties, see WebLogic Server Command Reference.
Parent topic: Applying a Patch on Multiple Hosts Using OPatchAuto
Troubleshooting a Patch by Viewing the OPatchAuto Log File
To understand how a patch is applied and to troubleshoot any problems with the application of a patch, review the log file for the OPatchAuto session.
The log file location is usually saved to the following directory or a subdirectory within this location:
ORACLE_HOME/cfgtoollogs/opatchauto/
The file name for each log file identifies the date and time it was executed. For example:
opatchauto2015-09-28_11-47-13AM.log
You can also locate the log file by viewing the output of the opatchauto
command. The log file name and location is included in the output of the command. For example:
Session log file is /home/Oracle/products/fmw12c/cfgtoollogs/opatchauto/opatchauto2015-09-28_11-47-13AM.log
Parent topic: Using OPatchAuto to Patch Oracle Fusion Middleware
Using the OPatch lsinventory Command to Verify the Patches Applied to an Oracle Home
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 2-1 Running the opatch lsinventory Command to Obtain the Oracle Home Information
> opatch lsinventory
Oracle Interim Patch Installer version 13.9.4.2.1
Copyright (c) 2019, 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.4.2.1
OUI version : 13.9.4.0.0
Log file location : /opt/Oracle/products/fmw12c/cfgtoollogs/opatch/opatch2019-10-13_23-11-47PM.log
OPatch detects the Middleware Home as "/opt/Oracle/products/fmw12c"
Lsinventory Output file location :
/opt/Oracle/products/fmw12c/cfgtoollogs/opatch/lsinv/lsinventory2019-10-13_23-11-47PM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname:
ARU platform id: 226
ARU platform description:: Linux x86-64
Interim patches (1) :
Patch 100006 : applied on Mon Jun 10 12:39:07 PDT 2019
Unique Patch ID: 150220
Patch description: "TEST PATCH FOR WLS 12.2.1.4.0 - JAVA CLASSES PATCH"
Created on 17 May 2019, 11:54:20 hrs PST8PDT
Bugs fixed:
783169, 15941850
--------------------------------------------------------------------------------
OPatch succeeded.
Parent topic: Using OPatchAuto to Patch Oracle Fusion Middleware
Using the listDomainPatchInventory.sh Command to Verify the Patches Applied to a Domain
To verify the patches that have been applied to a domain, use the listDomainPatchInventory.sh
command. Use this command with the OPatch lsinventory
command to verify that the patch has been applied successfully.
For example:
cd ORACLE_HOME/OPatch/bin ./listDomainPatchInventory.sh DOMAIN_HOME
This command indicates that a specific interim patch has been applied.
If you do not see same list of patches in both the domain inventory and in the inventory for each Oracle home, reapply the patch. When you reapply the patch, only the missing steps are executed. The tasks that have already been performed are skipped.
Parent topic: Using OPatchAuto to Patch Oracle Fusion Middleware
Verifying the Installation after Applying a Patch
After you apply one or more patches, use the WebLogic Administration Console, Fusion Middleware Control, and your organization’s application testing to verify that your system is running successfully.
To verify your installations in an Oracle Fusion Middleware 12c environment:
Parent topic: Using OPatchAuto to Patch Oracle Fusion Middleware