Important:
The patching methodology discussed in this chapter can only be used with Enterprise Manager Cloud Control Release 13.1.0.0 and later.OMSPatcher automates the patching process by generating custom patching instructions based your particular environment and then automatically applies the patch.
This chapter covers the following topics:
With OMSPatcher, you can automatically patch a typical OMS configuration (core, plug-in homes) with minimal intervention.
OMSPatcher performs many of the pre-patch checks such as:
Configuration-based prerequisite checks
Patch-based binary prerequisite checks
OMSPatcher performs end-to-end configuration patching. Configuration patching is the process of patching a target based on its configuration. By incorporating the configuration information into the patch process, OMSPatcher is able to simplify patching tasks by automating most of the steps.
Single OMS – OMS application that runs from a single OMS instance of the system. OMSPatcher performs patching and deployment operations
Multiple OMS – OMS applications that run on two or more machines. The OMSs are connected by the Oracle WebLogic domain and separate managed servers. There is a one-to-one mapping between the managed servers and the separate OMS bits residing on a single machine. OMSPatcher provides auto-generated bash scripts (one per OMS instance) for UNIX based systems. For Windows, it only provides context-sensitive steps (text and HTML). For both cases, administrator needs to follow the steps given by OMSPatcher.
Single Instance Database or Real Application Cluster - shared or Real Application Cluster (RAC)
Example: Multi-OMS System
The following figure illustrates a multi-OMS deployment. The following terms are used:
Administrator: Person installing patches to the OMS core and plug-in homes.
Local OMS: OMS instance on which the administrator runs OMSPatcher.
Remote OMS: OMS instances on other machines (within the same OMS domain as the local OMS) where the administrator has not started any patching operations.
For a single OMS system (primary), OMSPatcher will execute the patching steps. For a multi-OMS UNIX system, OMSPatcher generates bash scripts for execution, one per OMS instance; follow the instructions given by OMSPatcher to find those scripts. For Windows multi-OMS systems, OMSPatcher will generate customized patching instructions/commands for the environment in text and HTML formats; administrators must execute these instructions to patch the various Oracle Management Services.
Apart from the target (or) instance-based configurations, OMSPatcher utilizes installation configuration relationships established in the Oracle Universal Installer (OUI) inventory as core and plug-in Oracle Homes. A typical OMS 13c home from the OUI inventory is organized as follows:
<Middleware Home> |_____<CORE_BITS> |_____<PLUGINS_DIRECTORY> |_____oracle.sysman.db.oms.plugin_13.1.0.0.0 |_____oracle.sysman.emas.oms.plugin_13.1.0.0.0 |_____oracle.sysman.mos.oms.plugin_13.1.0.0.0 . . .
Beginning with Enterprise Manager Release 12.1.0.3, Enterprise Manager patches have been converted to a System patch format in order to support patch automation.
What is a System Patch?
A System patch contains several sub-patches whose locations are determined by a file called bundle.xml in the top level directory of the patch. The sub-patches are intended for different sub-systems of a system that correspond with the OMS core and plug-in home organization.
A typical System patch format is organized as follows:
<System patch location - directory> |_____ Readme.txt (or) Readme.html bundle.xml automation |_____ apply_automation.xml |_____rollback_automation.xml Sub-patch1 |_____ etc |_____config |_____ inventory.xml |_____ actions.xml |_____ artifact_apply.xml |_____ artifact_rollback.xml |_____ files/Subpatch1 'payload' Sub-patch2 |_____ etc |_____config |_____ inventory.xml |_____ actions.xml |_____ artifact_apply.xml |_____ artifact_rollback.xml |_____ files/Subpatch1 'payload'
For Enterprise Manager release 12.1.0.2 or below, OMSPatcher is not supported for the released one-off patches. For these older releases, you must use OPatch and follow the patch README instructions.
OMSPatcher supports rolling mode only for System patches without any automation (binary-only patching through OMSPatcher). For all other artifacts (MRS, SQL), OMSPatcher only supports complete system downtime patching operations.
Refer to the patch README for the explicit information on supported patching methodologies.
OMSPatcher for the Enterprise Manager OMS will prompt for the following input parameters when performing patching operations. These parameters were determined at the time of Enterprise Manager installation.
Oracle WebLogic Admin Sever URL & port number
Oracle WebLogic Administration Server username
Oracle WebLogic Administration Server password
Because OMSPatcher requires this input for each patching operation, OMSPatcher provides the ability to encrypt the username and password via WebLogic encryption APIs and pass this information using a property file when running OMSPatcher apply and rollback operations. The next section discusses how to create a property file.
The automated patching functionality achieved using OMSPatcher expects WebLogic Administration Server URL and credentials as an input for patching and configuration detection operations. Primarily, the WebLogic Administration server is the host that manages the Managed Server where the OMS instance is deployed. If you do not want to set the credentials every time you are prompted while patching the OMS, you can update the property file. OMSPatcher allows you to repeatedly provide the inputs using property file option.
Note:
Property file for a Primary OMS and Standby OMS are different, as they are in different domains.To create an OMSPatcher property file:
Run the following script to create the WebLogic encrypted configuration and key files.
On UNIX:
$ OMSPatcher/wlskeys/createkeys.sh -oh <full path of platform home> -location <location to put the encrypted files>
On Windows:
$ OMSPatcher\wlskeys\createkeys.cmd -oh <full path of platform home> -location <location to put the encrypted files>
When prompted, enter the credentials of the Oracle WebLogic Administration Server that manages the Managed Server on which OMS instance is deployed. Two files are generated with the file names: config
and key
.
Create the property file with the following entries:
AdminServerURL=t3s://<host address from where admin server is running>:<port of the admin server> AdminConfigFile=<'config' file location> AdminKeyFile=<'key' file location>
The values for host address and port of admin server can be located by running the following 'emctl command' on an Oracle Home.
Following is the example of how a property file (constructed by the above mentioned guidelines) should appear:
AdminServerURL=t3s://my_admin_server.oracle.com:7101AdminConfigFile=/scratch/patch/oms_install_dir/middleware/oms/config/configAdminKeyFile=/scratch/patch/oms_install_dir/middleware/oms/config/key
Note:
To retrieve the WebLogic Administration Server URL details, run the following commands on the OMS home that you are patching:On Unix:
$ORACLE_HOME/bin/emctl status oms -details
On Windows:
%ORACLE_HOME%\bin\emctl.bat status oms -details
The command output contains the WebLogic Administration Server details. Here is an example on how to construct the URL with these output details.
Example:
WLS Domain Information Domain Name : GCDomain Admin Server Host : my_wls.oracle.com Admin Server HTTPS Port: 7103
To construct the Administrator Server URL, use the following syntax:
t3s://<admin server host>:<port>
In this example, the URL translates as follows:
t3s://my_wls.oracle.com:7103
Before running an OMSPatcher patching session, you must ensure the following configuration and inventory-based prerequisites are satisfied: Configuration-based conditions that have to be honored for OMS automation is given below.
The Enterprise Manager Software library must be configured.
The Oracle WebLogic Administration Server that controls the OMS instance (currently to be patched) through a managed server must be up and running.
Ensure that the Oracle Database, which houses the OMS Management Repository, and its listener are up and running.
Ensure that you have the latest version of OPatch in the OMS platform home of each host. The latest version of OPatch is available from My Oracle Support: OPatch release version 13.6.0.0.0.
If you do not have the latest OPatch version, follow the instructions outlined in the My Oracle Support note 224346.1 available at:
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=224346.1
Check your patch README to determine whether there are any specific prerequisites to be executed based on patch and patching methodologies.
Checking System Prerequisites
To make sure all prerequisite checks pass and no errors occur during the OMSPatcher patching session, Oracle recommends running the following commands on each OMS instance (in your OMS system).
$<Middleware Home>/OMSPatcher/omspatcher apply <PATCH_LOC> -analyze
Must be run from the System patch location (for apply operations)
Note:
OMS systems need not be shut down when runningOMSPatcher apply -analyze
.Note:
Check the Patch README and the instructions given for chosen patching methodologies.OR
$<Middleware Home>/OMSPatcher/omspatcher rollback -analyze -id <comma (,) separated list of sub-patches to be rolled back for System patch>
Note:
In order to roll back all sub-patches together, all sub-patches should be from same system patch.Example 24-1 OMSPatcher rollback -analyze
output
------------------------------- bash-3.2$ OMSPatcher/omspatcher rollback -id 1111137 -analyze OMSPatcher Automation Tool Copyright (c) 2015, Oracle Corporation. All rights reserved. OMSPatcher version : 13.6.0.0.0 OUI version : 13.6.0.0.0 Running from : /scratch/mw Log file location : /scratch/mw/cfgtoollogs/omspatcher/1111137_Nov_11_2015_22_54_57/rollback2015-11-11_22-54-57PM_1.log OMSPatcher log file: /scratch/mw/cfgtoollogs/omspatcher/SystemPatch/omspatcher_2015-11-11_22-55-02PM_analyze.log Please enter OMS weblogic admin server URL(t3s://myserver.myco.com:7101):> Please enter OMS weblogic admin server username(weblogic):> Please enter OMS weblogic admin server password:> Sub-patch(es) " 1111137 " are part of the OMS System patch. Oracle Home: /scratch/mw, Sub-patch(es): [1111137, 1111126] Do you want to rollback sub-patch(es) "1111137" only? [y|n] y User Responded with: Y Configuration Validation: Success Running rollback prerequisite checks for patch(es) "1111137" and Oracle Home "/scratch/mw"... Sub-patch(es) "1111137" are successfully analyzed for Oracle Home "/scratch/mw" Complete Summary ================ All log file names referenced below can be accessed from the directory "/scratch/mw/cfgtoollogs/omspatcher/2015-11-11_22-54-57PM_SystemPatch_1111192_1" Prerequisites analysis summary: ------------------------------- The following sub-patch(es) are rollbackable: Featureset Sub-patches Log file ---------- ----------- -------- oracle.sysman.top.oms 1111137 1111137_RollbackPrereq2015-11-11_22-55-25PM_2.log Log file location: /scratch/mw/cfgtoollogs/omspatcher/SystemPatch/omspatcher_2015-11-11_22-55-02PM_analyze.log OMSPatcher succeeded. bash-3.2$
Note:
Once the analysis finishes, you can refer to the OMSPatcher log to see what steps would be executed by OMSPatcher in non -analyze mode. The log file contains references to the HTML and text output file HTML containing detailed steps.OMSPatcher must be run from the platform home of the OMS being patched. The ORACLE_HOME environment variable must be set as the platform home or provided using the OMSPatcher "–oh" option. For example:
<Middleware Home>/OMSPatcher/omspatcher apply <patch>
Minimum Required OMSPatcher Version: 13.6.0.0.0
Ensuring You Have the Latest Version of OPatch
OMSPatcher uses the OPatch utility to apply the patch. For this reason, you must ensure that you have the latest version of OMSPatcher and OPatch on all OMS instance platform homes. If you not sure which version of OPatch resides on your system, run the following command:
<Middleware Home>/OMSPatcher/omspatcher -version
To download the latest version of OPatch, follow the instructions outlined in the My Oracle Support note 224346.1 available at the following location:
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=224346.1
Patching Quickstart
Using OMSPatcher typically involves the following phases:
1. Determining Whether Your System Meets OMSPatcher System Requirements
Run OMSPatcher apply -analyze
The apply -analyze
command simulates an OMSPatcher apply session by running all prerequisite checks, when possible, without making changes to the system (either bits or configurations). This command does not apply the patch.
See "Prerequisites for Running OMSPatcher" for additional information.
2. Determining What System Patches Currently Exist on Your System
Run OMSPatcher lspatches
See "lspatches" for more information.
3. Obtaining Patches from My Oracle Support (MOS)
OMSPatcher requires that the required platform or plug-in System patches be obtained from My Oracle Support and downloaded to the OMS instance on which OMSPatcher is to be run.
See "My Oracle Support: Searching for Patches" for more information.
4. Applying a Patch
Run $OMSPatcher apply
<patch>
The apply command applies all patches within a specified System patch to the platform home from which OMSPatcher is command is run.
See "Running omspatcher apply
" for more information.
5. Deinstalling Individual Sub-patches of a System Patch
Run $OMSPatcher rollback -id <list of comma separated sub-patches of System patch>
Note:
For a complete list of sub-patches of the System patch, refer to the patch README.If, after applying the patch, the system is not stable, the most likely cause is the patch itself. Contact Oracle Support. They will recommend that you remove the patch using the OMSPatcher rollback
command.
See "Running omspatcher rollback
" for more information.
The first step in the patching process is to determine what patches you need from My Oracle Support (MOS). MOS is the single source of truth for patching. You can access MOS at the following location:
https://support.oracle.com
Once you have logged in, you have access to interactive support tools and information that simplify searching for and obtaining the requisite patches for your Oracle environment. The following figure shows the MOS home page.
Note:
You can find complete documentation about MOS at the following location:http://docs.oracle.com/cd/E25290_01/index.htm
My Oracle Support contains many features and capabilities that are grouped under tabs across the top of the application. Of primary interest is the Patches and Updates tab shown in the following figure.
Click on the tab to access the Patches and Updates page. From here, you can search for the patches based on the OMS patch area (core, plug-in, or combination). The following examples illustrate OMS patch searches for the various patch areas.
From the Search tab, click Product or Family (Advanced).
Example: Searching for a Platform Patch
To search for Enterprise Manager OMS core patches, enter the following search parameters:
Product: Enterprise Manager Base Platform
Release: Cloud Control (OMS) 12.1.0.4.0
Platform: Linux x86-64
Clicking Search displays the following results.
By clicking on patch 18845437 you are taken to the patch page where you can view bugs resolved by this patch, related Knowledge Articles, or view a generic patch README.
Click Download to save the patch .ZIP file to your local system.
omspatcher apply
Once you have downloaded the patch, see the patch README for explicit patch details and instructions on applying the patch. You can find the README at the following location
<System patch location>/README.txt (or) README.html
As you step through the patching operations in the README, running OMSPatcher apply
(depending on the configuration that is patched, primary or standby) will generate a custom, environment-specific version of the README for patching operations for the primary site multi-OMS or standby site OMS systems. For a primary site single OMS system, running OMSPatcher apply
will perform patching and deployment operations.
On your local OMS instance, run the following command from the top level System patch directory:
$<Middleware home>/OMSPatcher/omspatcher apply <patch>
Note:
UnlikeOMSPatcher analyze
, you should not run OMSPatcher apply
on every OMS instance. OMSPatcher will either execute all patching and deployment operations, or will generate environment-specific steps that include complete configuration aspects of the System.For a multi-OMS UNIX system, OMSPatcher generates bash scripts for execution, one per OMS instance; follow the instructions given by OMSpatcher to find those scripts. For Windows multi-OMS systems, OMSpatcher will generate customized patching instructions/commands for the environment in text and HTML formats; administrators must execute these instructions to patch the various OMSs.
omspatcher rollback
See the patch README for explicit patch details and instructions on deinstalling the patch. You can find the README at the following location
<System patch location>/README.txt (or) README.html
As you step through the patch deinstallation operations in the README, running OMSPatcher rollback
(depending on the configuration that is patched, primary or standby) will generate a custom, environment-specific version of the README for patching operations for the primary site multi-OMS or standby site OMS systems. For a primary site single OMS system, running omspatcher rollback
will perform the deinstallation operations.
On your local OMS instance, run the following command from the top level System patch directory:
$<Middleware home>/OMSPatcher/omspatcher rollback -id <list of comma separated sub-patches of System patch
Note:
Unlike omspatcher analyze
, you should not execute the omspatcher rollback command on every OMS instance. OMSPatcher will either execute all patching and deployment operations, or will generate environment-specific steps that include complete configuration aspects of the System.
The list of sub-patches within the System patch can be retrieved from patch README.
The list of sub-patches listed in System patch README may differ from the patches that are actually installed. During System patch installation, some sub-patches may be skipped (not installed).
For a multi-OMS UNIX system, OMSPatcher generates bash scripts for execution, one per OMS instance; follow the instructions given by omspatcher to find those scripts. For Windows multi-OMS systems, OMSPatcher will generate customized patching instructions/commands for the environment in text and HTML formats; administrators must execute these instructions to patch the various OMSs.
omspatcher lspatches
After the patch is applied or rolled back, you can run the omspatcher lspatches
command to generate a comprehensive Component type - patches map of the OMS homes and installed patches.
omspatcher version
To determine the version numbers of the various OMSPatcher utilities (Opatch, OPlan, OsysModel) that reside on your system, you can run OMSPatcher version
.
If you have configured a standby OMS for High Availability, refer to the chapter on "Enterprise Manager Disaster Recovery" and the appendix on Standby OMSs Using Standby WebLogic Domain" both of which can be found in the Enterprise Manager Advanced Installation and Configuration Guide.
This section provides a comprehensive listing and description of all OMSPatcher commands used to patch an OMS.
Important:
OMSPatcher commands must be run from the OMS Middleware home.OMSPatcher Commands
The OMSPatcher commands are run from the OMS Middleware home out of the OMSPatcher directory. The Middleware home must be set as $ORACLE_HOME. In the following generic example, an OMSPatcher command is run from a Middleware home.
<Middleware home>/OMSPatcher/omspatcher apply <PATH_TO_PATCH_DIRECTORY>
where <PATH_TO_PATCH_DIRECTORY> is the full path to the System patch top level directory.
You can view online help for any command (except version) by specifying the -help option.
OMSPatcher consists of six primary commands.
apply
rollback
checkapplicable
saveConfigurationSnapshot
lspatches
version
Apply a System patch to OMS instance homes. You must specify the patch location or the current directory will be used as the patch location.
Important:
OMSPatcher must be run from the platform home. ORACLE_HOME environment variable must be set as the platform home or provided using the –oh option.You must run the Apply command directly from the System patch location.
When running omspatcher apply
, you will be prompted the following:
WebLogic Admin Server URL of the primary OMS (or standby OMS)
Username and Password
Silent interaction is supported by using the silent and property_file options.The standby option should be used if a stand by OMS system is patched. OMSPatcher can pass 'x=y' properties through the command line. See Table 24-2, "Apply Properties".
Syntax
<Middleware home>/OMSPatcher/omspatcher apply <System patch location> [-jre <Path to JRE>] [-nonrolling] [-invPtrLoc <Path to oraInst.loc>] [-property_file <Path to property file>] [-analyze] [-silent] [-oh <Platform home path>]
Parameters
<System patch location>
Path to the location of the patch. If the patch location is not specified, then the current directory is taken as the patch location. The patch can only be a System patch.
Apply Command Options
Option | Description |
---|---|
jre |
This option tells OMSPatcher to use JRE (java) from the specified location instead of the default location under Oracle Home. |
invPtrLoc |
Used to locate the oraInst.loc file. Needed when the installation used the -invPtrLoc flag. This should be the path to the oraInst.loc file. |
property_file |
The user-defined property file for OMSPatcher to use. The path to the property file should be absolute. The keys for 'omspatcher' are: 'AdminConfigFile' - Encrypted file for Admin Server user of OMS instance domain. 'AdminKeyFile' - Encrypted file for Admin Server password of OMS instance domain. 'AdminServerURL' - Admin Server URL of OMS instance domain. (Example: t3s://<host address>:<port number>) The Key, value pair is of the format 'x=y' where 'x' is omspatcher understood key and each pair is separated by newline in the property file. This option is typically used for silent operations. This option is very useful for silent mode of 'omspatcher' invocation. In order to create encrypted files for weblogic admin server username & password, Please use
NOTE: For Windows, Please make sure that directories, files in the path are separated by "\\" in the property file. |
analyze |
Prints out the actions without any configuration/binary change through 'OMSPatcher'. This option performs prerequisite checks that includes both configuration and binary prerequisite checks. It simulates an apply operation (does not apply the patch). The command ’ |
silent |
Suppresses any user interaction. |
oh |
The parameter passed through this option will override ORACLE_HOME environment variable. This parameter (if this option is used) must be the core platform home. |
Apply Command Properties
Option | Description |
---|---|
OMSPatcher.OMS_DISABLE_HOST_CHECK=true |
Used to disable host verification check for WebLogic Admin Server. Set this property to true if your OMS configuration is based on virtual host. |
OMSPatcher.OMS_USER=<installed OMS user> |
Used when OMSPatcher is not able to obtain the installed OMS administrator name. This switch is applicable only for Microsoft Windows environments. |
OMSPatcher.OMS_SCRIPTS_DIR=<existing directory> |
Used to specify a single, existing directory where bash scripts (generated by OMSPatcher for multi-OMS configurations) are copied. By providing an existing directory, the bash scripts are copied to a newly created, timestamped sub-directory under the directory specified by this property. This allows an OMS administrator to execute the scripts from pre-determined, shared location rather than manually copying scripts to individual OMS machines. This switch is applicable only for UNIX systems. |
Roll back sub-patches of a System patch from OMS instance home. Administrator specifies the sub-patch IDs of the System patch. You can obtain the sub-patch IDs by running the OMSPatcher lspatches
command. See "Running omspatcher lspatches
".
Important: OMSPatcher must be run from the Middleware home. ORACLE_HOME environment variable must be set as platform home or provided via the –oh
option.
When running OMSPatcher rollback, you will be prompted the following:
WebLogic Admin Server URL of the primary OMS (or standby OMS)
Username and Password
Silent interaction is supported by using the silent and property_file options.The standby option should be used if a stand by OMS system is patched. OMSPatcher can pass 'x=y' properties through the command line. See Table 24-2, "Apply Properties".
Syntax
omsatcher rollback -id <sub patches ID of System patch> [-idFile <file contains list of sub-patch IDs of System patch> ] [-invPtrLoc <Path to oraInst.loc>] [-jre <LOC>] [-silent] [-nonrolling] [-property_file <path to property file>] [-analyze]
Parameters
Sub-patch IDs for the System patch to be rolled back. If you want to roll back an entire System patch, the patch IDs for all sub-patches of the System patch (to be rolled back) must be specified.
Rollback Options
Option | Description |
---|---|
id |
List of sub-patches of a System patch. For a complete list of sub-patches, see the System patch README. Use |
idfile |
File that contains the list of sub-patch IDs of a System patch. |
invPtrLoc |
The |
jre |
This jre option instructs OMSPatcher to use the JRE (java) from the specified location instead of the default location under Oracle Home. |
silent |
This option refers to silent mode of invocation. |
nonrolling |
The
|
property_file |
The administrator defined property file for omspatcher to use. The path to the property file should be absolute. The keys for 'omspatcher' are: 'AdminConfigFile' - Encrypted file for Administration Server administrator of OMS instance domain. 'AdminKeyFile' - Encrypted file for Administration Server password of OMS instance domain. 'AdminServerURL' - Administration Server URL of OMS instance domain. (Example: t3s://<host address>:<port number>) The Key, value pair is of the format 'x=y' where 'x' is omspatcher understood key and each pair is separated by newline in the property file. In order to create encrypted files for weblogic admin server username & password, use NOTE: For Windows, ensure that directories, files in the path are separated by "\\" in the property file. |
analyze |
This option helps us to do dry-run prerequisite checks that includes both configuration and binary prerequisite checks. The command ’OMSPatcher rollback' with this option must be run on each OMS instance to make sure all prerequisites pass for patching operations. |
Rollback Command Properties
Table 24-4 Rollback Properties
Option | Description |
---|---|
OMSPatcher.OMS_DISABLE_HOST_CHECK=true |
Used to disable host verification check for WebLogic Admin Server. Set this property to true if your OMS configuration is based on virtual host. |
OMSPatcher.OMS_USER=<installed OMS user> |
Used when OMSPatcher is not able to obtain the installed OMS administrator name. This switch is applicable only for Microsoft Windows environments. |
OMSPatcher.OMS_SCRIPTS_DIR=<existing directory> |
Used to specify a single, existing directory where bash scripts (generated by OMSPatcher for multi-OMS configurations) are copied. By providing an existing directory, the bash scripts are copied to a newly created, timestamped sub-directory under the directory specified by this property. This allows an OMS administrator to execute the scripts from pre-determined, shared location rather than manually copying scripts to individual OMS machines. This switch is applicable only for UNIX systems. |
Displays the list of patches applied to the OMS home. It will show the component Name/Version, Component Type, System patch, Sub-patch and patch description where patch has been applied. Please note that OMSPatcher will be used to apply only system patches. However the OMS can have one-off patches which would have already been applied at the time of the Enterprise Manager installation. OMSPatcher provides information about whether the patch is a system patch or one-off patch and, if it is the system patch, then it will also show all other patches that are part of that system patch.
Syntax
OMSPatcher lspatches [ -invPtrLoc <Path to oraInst.loc> ] [-jre <LOC> ] [-oh]
Options
Option | Description |
---|---|
jre |
This |
invPtrLoc |
The |
oh |
The location of Middleware home. This overrides the ORACLE_HOME environment variable. |
The version
command shows the current version number of the OPatch utility, dependent OPlan version, and the osysmodel version.
Important: OMSPatcher must be run from the Middleware home.
Syntax
<MW_HOME>/OMSPatcher/omspatcher version [-invPtrLoc <Path to oraInst.loc>] [-jre <LOC>] [-oh <ORACLE_HOME>] [-help] [-h]
Options
The following table describes the options available for the version
command.
Table 24-6 version
Command Options
Option | Description |
---|---|
-invPtrLoc |
The |
-jre |
This |
-oh |
The |
The checkApplicable
command performs prerequisite binary checks on the OMS platform home and plug-in homes to determine the applicability of a System patch and/or the whether sub-patches of the System patch can be rolled back.
Syntax
omspatcher checkApplicable [-id <singleton or System Patch ID to be rolled back>] [-invPtrLoc <Path to oraInst.loc>] [-jre <LOC>] [-ph <System patch that is to be installed>] [-silent]
Options
The following table describes the options available for the checkApplicable
command.
Table 24-7 checkApplicable
Command Options
Option | Description |
---|---|
id |
Used to specify the sub-patch IDs that are to be rolled back from the OMS platform home or plug-in homes. |
invPtrLoc |
Used to locate the oraInst.loc file. Needed when the installation used the -invPtrLoc flag. This should be the path to the oraInst.loc file. |
jre |
Instructs OPatch to use the JRE (java) from the specified location instead of the default location under Oracle Home. |
ph |
Used to specify the path to the patch location. The input must be a System patch location. |
silent |
Suppresses any user interaction |
The saveConfigurationSnapshot
command generates configuration a snapshot for the primary OMS (along with OMS repository) and saves it to an XML file that can be read by OMSPatcher.
If file is not specified, it will be saved to a default file (configData.xml) at the following location
ORACLE_HOME/cfgtoollogs/opatch/sysconfig/configData.xml
When running the saveConfigurationSnapshot
command, you will be prompted for the following:
WebLogic Admin Server URL of the primary OMS
Username and password
You can run the command in silent mode (suppress user interaction) via the silent and property_file options.
This command must be run from an OMS instance belonging to the primary OMS system. If the OMS configuration is running on a virtual host, you must set the OMSPatcher.OMS_DISABLE_HOST_CHECK=true
option from the command line.
Syntax
omspatcher saveConfigurationSnapshot [-configFile <File to save configuration snapshot> ] [-oh <ORACLE_HOME> ] [-invPtrLoc <Path to oraInst.loc> ] [-jre <LOC> ] [-silent ] [-property_file <path to file> ]
Options
The following table describes the options available for the version
command.
Table 24-8 saveConfigurationSnapshot
Command Options
Option | Description |
---|---|
configFile |
Enables OPatch to write the configuration for the specified product to an XML file. The XML file can only be recognized by Oracle System Model APIs and accessed through via the Enterprise Manager SDK. |
oh |
Specifies the Oracle home to be worked on. The Oracle Home specified takes precedence over the environment variable ORACLE_HOME. |
invPtrLoc |
Used to locate the oraInst.loc file. Needed when the installation used the -invPtrLoc flag. This should be the path to the oraInst.loc file. |
jre |
Instructs OMSPatcher to use JRE (java) from the specified location instead of the default location under Oracle Home. |
silent |
Suppresses any user-interaction. |
property_file |
The user-defined property file for OMSPatcher to use. The path to the property file must be absolute. The keys for 'OMSPatcher' are:
The Key, value pair is of the format 'x=y' where 'x' is an OMSPatcher understood key and each pair is separated by newline in the property file. The In order to create encrypted files for a WebLogic Admin Server username & password, run the following script:
(createKeys.cmd for Windows) to obtain the files and load them through a custom file using the property_file option. NOTE: For Windows, maker sure that directories, files in the path are separated by "\\" in the property file. |
This chapter describes common OMSPatcher problems that may occur during patching operations or the analyze phase.
This chapter covers the following:
In order for OMSPatcher to fully automate the patching process, it accesses various tools/utilities to carry out different patching tasks in their respective phases. The primary tools/utilities outside of OPatch and OMSPatcher are:
emctl stop oms
- Life cycle
emctl start oms
- Life cycle
emctl applypatch
, emctl rollbackpatch
– Apply, rollback SQL changes in the OMS repository SYSMAN schema respectively
emctl register
, emctl deregister
– Register, de-register metadata services with the right XMLs for MRS artifacts as per patch metadata instructions respectively
These tools/utilities are accessed during the patching process. Note that failure during invocation of these utilities can also happen and the errors & remedies for those commands are not handled in this document. They need to be followed up with Oracle Support for details. However, OMSPatcher will trap errors from these commands output, push it to appropriate logs and announce it to the administrator and finally to support.
Apart from the above external tools/utilities, OMSPatcher uses the following internal utilities to do binary patching operations. They have separated log files generated by OMSPatcher. The internal utilities are patch binary prerequisite checks and patch binary apply, rollback operations.
This section refers to the information through logs published by OMSPatcher as part of its patching operations. This knowledge is needed for the administrator to obtain the appropriate logs from right area to troubleshoot and inform Oracle Support for further analysis. The following annotated example shows OMSPatcher apply output that displays the various log files that are created when running OMSPatcher.
Sample OMSPatcher rollback Output
bash-3.2$ OMSPatcher/omspatcher rollback -id 1111137 OMSPatcher Automation Tool Copyright (c) 2015, Oracle Corporation. All rights reserved. OMSPatcher version : 13.6.0.0.0 OUI version : 13.6.0.0.0 Running from : /scratch/mw Log file location : /scratch/mw/cfgtoollogs/omspatcher/1111137_Nov_11_2015_23_57_40/rollback2015-11-11_23-57-40PM_1.log OMSPatcher log file: /scratch/mw/cfgtoollogs/omspatcher/SystemPatch/omspatcher_2015-11-11_23-57-45PM_deploy.log Please enter OMS weblogic admin server URL(t3s://myserver.myco.com:7101):> Please enter OMS weblogic admin server username(weblogic):> Please enter OMS weblogic admin server password:> Sub-patch(es) " 1111137 " are part of the OMS System patch. Oracle Home: /scratch/mw, Sub-patch(es): [1111137, 1111126] Do you want to rollback sub-patch(es) "1111137" only? [y|n] y User Responded with: Y Configuration Validation: Success Running rollback prerequisite checks for patch(es) "1111137" and Oracle Home "/scratch/mw"... Sub-patch(es) "1111137" are successfully analyzed for Oracle Home "/scratch/mw" To continue, OMSPatcher will do the following: [Patch and deploy artifacts] : De-register MRS artifact "VCPUUtilization"; Rollback sub-patch(es) [ 1111137 ] from component "oracle.sysman.emas.oms.plugin" and version "13.1.1.0.0" Do you want to proceed? [y|n] y User Responded with: Y De-registering service "VCPUUtilization" with register file "/scratch/mw/plugins/oracle.sysman.emas.oms.plugin_13.1.1.0.0/metadata/vcpu/vcpu-exalogic-registration.xml" for plugin id as "oracle.sysman.emas"... Rolling back sub-patch "1111137" from Oracle Home "/scratch/mw"... Complete Summary ================ All log file names referenced below can be accessed from the directory "/scratch/mw/cfgtoollogs/omspatcher/2015-11-11_23-57-40PM_SystemPatch_1111192_1" Patching summary: ------------------ Binaries of the following sub-patch(es) have been successfully rolled back: Featureset Sub-patches Log file ---------- ----------- -------- oracle.sysman.emas.oms.plugin_13.1.1.0.0 1111137 1111137_rollback2015-11-11_23-58-45PM_3.log Undeployment Summary: ------------------- The following artifact(s) have been successfully rolled back: Artifacts Log file --------- -------- MRS-VCPUUtilization emctl_deregister_VCPUUtilization_2015-11-11_23-58-26PM.log Log file location: /scratch/mw/cfgtoollogs/omspatcher/SystemPatch/omspatcher_2015-11-11_23-57-45PM_deploy.log OMSPatcher succeeded.
Log output to a consolidated directory
As shown in the example above, there is a reference to pushing of all logs to consolidated log directory. The following line in the trace example shows this consolidation log directory.
... All log file names referenced below can be accessed from the directory "/scratch/mw/cfgtoollogs/omspatcher/2015-11-11_23-57-40PM_SystemPatch_1111192_1"" ...
This consolidated log directory would contain the following files (here with reference to the example for rollback).
$ ls -l /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/2014-05-15_03-24-24AM_SystemPatch_1111118_1 total 64 -rw-rw-rw- 1 kamlku dba 59954 Nov 11 23:59 1111137_rollback2015-11-11_23-58-45PM_3.log -rw-rw-rw- 1 kamlku dba 2361 Nov 11 23:59 1111137_RollbackPrereq2015-11-11_23-58-19PM_2.log -rw-rw-rw- 1 kamlku dba 120 Nov 11 23:58 AdminServerStatusPrerequisites_2015-11-11_23-58-19PM.log -rw-rw-rw- 1 kamlku dba 785 Nov 11 23:58 emctl_deregister_VCPUUtilization_2015-11-11_23-58-26PM.log -rw-rw-rw- 1 kamlku dba 66 Nov 11 23:58 RepositoryStatusPrerequisites_2015-11-11_23-58-19PM.log -rw-rw-rw- 1 kamlku dba 5165 Nov 11 23:59 rollback2015-11-11_23-57-40PM_1.log -rw-rw-rw- 1 kamlku dba 3045 Nov 11 23:59 temp_apply_automation.xml -rw-rw-rw- 1 kamlku dba 2173 Nov 11 23:59 temp_rollback_automation.xml $
All the individual log files of each invocation, commands are finally copied to a consolidated place as highlighted above. Each command naming convention is self-explanatory and it indicates the actual operations being performed in automation. The 'omspatcher' log file will refer the individual log files so that administrator can easily connect to individual files to refer to any failure.
If the administrator wants to contact Oracle Support, the administrator must provide the following references to Support.
Administrator interface trace(s).
Consolidated log directory as zip
OPatch log file
OMSPatcher log file
Output of OMSPatcher lspatches command on all OMS instance homes.
Refer to the following table for common OMSPatcher error codes.
Table 24-9 OMSPatcher Error Codes
Error Code | Description | Remedy/Suggestion |
---|---|---|
231 |
Wrong Oracle WebLogic Administration Server URL and/or invalid credentials |
Correct the interview inputs and run OMSPatcher again. |
234 |
Malformed Oracle WebLogic Administration Server URL |
If the Oracle WebLogic Administration Server URL is already defaulted (value given), type <enter>. If it is not given, construct the Oracle WebLogic Administration Server URL as t3s://<WebLogic Administration Server host address>:<WebLogic Administration Server port> .of the domain that controls the managed server on which the OMS is deployed. |
235 |
Unable to connect to OMS repository |
Check the OMS repository connectivity for SYSMAN administrator and run OMSPatcher again. |
236 |
OUI central inventory read issue |
Check if the OUI inventory is locked by some other processes. Check if OUI inventory is readable. |
238 |
Patch binary prerequisite checks failure |
Check OMSPatcher, OPatch, patch binary prerequisite log files for more details on the errors. If not resolved, contact Oracle Support. |
240 - 251 |
Binary updates (or) deployment failure |
|
233 |
Software library not configured OMS repository connectivity not achieved. (post successful check of the same during credential inputs Oracle WebLogic Administration Server not reachable (post successful check of the same during credential inputs) |
Check the OMSPatcher log file for the failure. |
The following table lists exit codes for external utilities that OMSPatcher uses for life cycle and deployment. If the deployment (or) life cycle fails through OMSPatcher, the administrator can search individual log files for the error messages shown in the Error Message/Recommendation column.
Table 24-10 OMSPatcher External Utilities Error Codes
Exit Code | Error Message / Recommendation |
---|---|
34 |
Displays the usage of the command. |
35 |
Unable to read password! Exiting... |
36 |
Unable to get a connection to the repository! Exiting... |
37 |
The Plug-in is not deployed on this Management Server. The plug-in has to be deployed first to register metadata for that plug-in. |
38 |
Input file does not exist |
39 |
This operation is not supported by service. |
40 |
Metadata operation is skipped. |
41 |
Error occurred during Metadata registration. |
42 |
Error occurred during Metadata de-registration. |
This section provides issue resolution information for special cases when using OMSPatcher. This information will allow the administrator to handle these issues easily with less need for support team intervention.
Windows patching failure due to lock of files by Oracle WebLogic Administration Server
In Windows operating systems, it has been noticed that some of the Enterprise Manager related files (used for patching) are locked by running of Oracle WebLogic Administration Server. As OMSPatcher required Oracle WebLogic Administration Server to be RUNNING for the configuration detection, we need to perform the following steps to make sure that this conflict with respect to environment and patching is removed.
Go to ORACLE_HOME
Run OMSPatcher in non-analyze mode. For further instructions, refer to the patch README and Administrator guide.
Once the OMSPatcher is run in non-analyze mode, it will check if active files are locked by Oracle WebLogic administration server and will provide a prompt as shown below (in silent mode it will be auto-yes):
Running prerequisite checks to verify if any files or services are locked by admin server process... Please monitor OPatch log file: c:\MW_130518\oms\cfgtoollogs\opatch\1111112_Jun_ 26_2014_08_16_19\ApplyPrereq2014-06-26_08-16-57AM_8.log The details are: Following files are active : c:\MW_130518\oms\sysman\jlib\emCoreConsole.jar Due to active files to be patched, OMSPatcher will stop all OMS processes so tha t lock on active files may be released... Do you want to proceed? [y|n] y User Responded with: Y OMSPatcher has stopped all OMS processes successfully.
If there is a failure while stopping OMS processes, OMSPatcher will accordingly error out. Refer to the OMSPatcher log file for details.
OMSPatcher will stop the stack and then ask for a confirmation from the administrator on whether to proceed with prerequisite checks of patch binaries (in silent mode it will be auto-yes):
OMSPatcher has stopped all OMS processes successfully. Please make sure the above listed active files are unlocked by all windows processes. Do you want to proceed? [y|n] y User Responded with: Y
Note:
Administrators are requested to use some open source utilities like process explorer and search for file strings given as output in (2) to check if any files are still active. If so, kill the process tree of those files so that OPatch will run the checks, patch, and deploy the automation elements.OMSPatcher will not attempt to re-start the stack. The administrator must restart the stack as needed.
A complete sample trace of this case is shown below:
C:\MW_130518\oms\OPatch_June26>omspatcher apply ..\patches\cmdRcu\1111112 OMSPatcher Automation Tool Copyright (c) 2015, Oracle Corporation. All rights reserved. OMSPatcher version : 13.6.0.0.0 OUI version : 13.6.0.0.0 Running from : c:\MW_130518\oms Log file location: c:\MW_130518\oms\cfgtoollogs\omspatcher\omspatcher2014-06-26_08-16-19AM_1.log omspatcher log file: c:\MW_130518\oms\cfgtoollogs\omspatcher\1111112\opatch_oms_2014-06-26_08-16-23AM_deploy.log Please enter the WebLogic Admin Server URL for primary OMS:> t3s://example.o racle.com:7101 Please enter the WebLogic Admin Server username for primary OMS:> weblogic Please enter the WebLogic Admin Server password for primary OMS:> Configuration Validation: Success Running prerequisite checks to verify if any files or services are locked by admin server process... Please monitor OPatch log file: c:\MW_130518\oms\cfgtoollogs\omspatcher\1111112_Jun_26_2014_08_16_19\ApplyPrereq2014-06-26_08-16-57AM_8.log The details are: Following files are active: c:\MW_130518\oms\sysman\jlib\emCoreConsole.jar Due to active files to be patched, omspatcher will stop all OMS processes so that lock on active files may be released... Do you want to proceed? [y|n] y User Responded with: Y omspatcher has stopped all OMS processes successfully. omspatcher has stopped all OMS processes successfully. Please make sure the above listed active files are unlocked by all windows processes. Do you want to proceed? [y|n] y User Responded with: Y Running apply prerequisite checks for patch(es) "1111112" and Oracle Home "c:\MW _130518\oms"... Please monitor omspatcher log file: c:\MW_130518\oms\cfgtoollogs\omspatcher\1111112_Jun_26_2014_09_01_33\ApplyPrereq2014-06-26_09-03-41AM_10.log Patches "1111112" are successfully analyzed for Oracle Home "c:\MW_130518\oms" To continue, OMSPatcher will do the following: [Patch and deploy patch(es) binaries] : Apply patch(es) [ 1111112 ] to Oracle Home "c:\MW_130518\oms"; Apply RCU artifact with patch "c:\MW_130518\oms\.omspatcher_storage \1111112_Feb_21_2014_06_30_38\original_patch" Do you want to proceed? [y|n] y User Responded with: Y Applying patch "1111112" to Oracle Home "c:\MW_130518\oms"... Please monitor OMSPatcher log file: c:\MW_130518\oms\cfgtoollogs\omspatcher\1111112_Jun_26_2014_09_01_33\apply2014-06-26_09-04-17AM_12.log Updating repository with RCU reference file "c:\MW_130518\oms\.omspatcher_storage\1111112_Feb_21_2014_06_30_38\original_patch" Copying all logs to: c:\MW_130518\oms\cfgtoollogs\omspatcher\2014-06-26_09-01-32AM_SystemPatch_1111112_1 Patching summary: Following patch(es) are successfully applied (Oracle home:patch list): c:\MW_130518\oms:1111112 Log file location: c:\MW_130518\oms\cfgtoollogs\omspatcher\1111112\omspatcher_oms_2013-06-26_09-01-36AM_deploy.log OMSPatcher succeeded.
This section deals with possible issues you may encounter when running bash scripts generated by OMSPatcher in multi-OMS (UNIX-based systems) environment. The following OMSPatcher-generated output illustrates various script-based issues.
Example 24-2 OMSPatcher Output: Multi-OMS, UNIX-based Environment
bash-4.3$ OMSPatcher/omspatcher apply /net/slc09jcy/scratch/patch_2nd_nov/em13_1/bundle_patches/1111191 OMSPatcher Automation Tool Copyright (c) 2015, Oracle Corporation. All rights reserved. OMSPatcher version : 13.6.0.0.0 OUI version : 13.6.0.0.0 Running from : /scratch/hkumars/oms_install/mw Log file location : /scratch/hkumars/oms_install/mw/cfgtoollogs/omspatcher/opatch2015-11-11_23-27-35PM_1.log OMSPatcher log file: /scratch/hkumars/oms_install/mw/cfgtoollogs/omspatcher/1111191/omspatcher_2015-11-11_23-27-46PM_deploy.log Please enter OMS weblogic admin server URL(t3s://rwsv1452.myco.com:7101):> Please enter OMS weblogic admin server username():> weblogic Please enter OMS weblogic admin server password:> WARNING: Could not apply the patch "1111155" because the "oracle.samples.xohs.oms.plugin with version 13.1.4.0.0" core component of the OMS or the plug-in for which the patch is intended is either not deployed or deployed with another version in your Enterprise Manager system. Configuration Validation: Success WARNING:You have a multi-OMS setup. The patch application is not complete until the following steps are executed successfully. Please perform the following steps to complete patching operations. ------------------------------------------------------------------- 1. Please copy the script "/scratch/hkumars/oms_install/mw/.omspatcher_storage/oms_session/scripts_2015-11-11_23-28-33/run_script#1_on_host_rwsv1452_us_oracle_com_as_user_hkumars.sh" to "rwsv1452.myco.com" and execute the script on host "rwsv1452.myco.com". 2. Please execute the script "/scratch/hkumars/oms_install/mw/.omspatcher_storage/oms_session/scripts_2015-11-11_23-28-33/run_script#2_on_host_rwsv1451_us_oracle_com_as_user_hkumars.sh" on local host. Complete Summary ================ All log file names referenced below can be accessed from the directory "/scratch/hkumars/oms_install/mw/cfgtoollogs/omspatcher/2015-11-11_23-27-35PM_SystemPatch_1111191_1" Patching summary: ----------------- The following sub-patches are incompatible with components installed in the OMS system: 1111155 -------------------------------------------------------------------------------- The following warnings have occurred during OPatch execution: 1) Could not apply the patch "1111155" because the "oracle.samples.xohs.oms.plugin with version 13.1.4.0.0" core component of the OMS or the plug-in for which the patch is intended is either not deployed or deployed with another version in your Enterprise Manager system. 2) You have a multi-OMS setup. The patch application is not complete until the following steps are executed successfully. -------------------------------------------------------------------------------- OMSPatcher Session completed with warnings. Log file location: /scratch/hkumars/oms_install/mw/cfgtoollogs/omspatcher/1111191/omspatcher_2015-11-11_23-27-46PM_deploy.log OMSPatcher completed with warnings.
Multi-OMS Warning Message:
WARNING: You have a multi-OMS setup. The patch application is not complete until the following steps are executed successfully
This message means that patching and deployment are not complete until the administrator performs the bash script execution instructions generated by OMSPatcher.
The administrator needs to provide the credential while running the OMSPatcher generated bash script on secondary OMS.
Example:
/net/slc00skv/scratch/hkumars/work/omshome1967/.omspatcher_storage/oms_session/scripts_2015-11-19_06-40-51/run_script#1_on_host_slc09pjb_us_oracle_com_as_user_hkumars.sh Verifying embedded script host-address "slc09pjb.myco.com" against the network interface for a match... Trying for a match with: fe80:0:0:0:221:f6ff:fe6f:9ac1%2(fe80:0:0:0:221:f6ff:fe6f:9ac1%2) Trying for a match with: slc09pjb.myco.com(10.248.10.100) Script-host address matched with host network interface. Creating session file /scratch/hkumars/work/omshome1967/.omspatcher_storage/oms_session/oms_session_2015-11-18_22-40-19PM... Copying your script to OMSPatcher defined path /scratch/hkumars/work/omshome1967/.omspatcher_storage/oms_session/scripts_2015-11-19_06-40-51/run_script#1_on_host_slc09pjb_us_oracle_com_as_user_hkumars.sh... The System Patch directory already exists in the machine (this could mean that System Patch is already downloaded). Do you want to overwrite it (y|n)? n User provided n for patch transfer. Ignoring patch transfer... The Patch backup location /scratch/hkumars/work/omshome1967/.omspatcher_storage/1111126_Sep_7_2015_02_06_54/original_patch does not exists in the machine (this could mean that the patch automation data are not present on this host and which is mandatory to rollback this patch later from this host). You need to provide host credential to copy it. Executing command: mkdir -p /scratch/hkumars/work/omshome1967/.omspatcher_storage/1111126_Sep_7_2015_02_06_54;scp -r slc00skv.myco.com:/scratch/hkumars/work/omshome1967/.omspatcher_storage/1111126_Sep_7_2015_02_06_54/original_patch /scratch/hkumars/work/omshome1967/.omspatcher_storage/1111126_Sep_7_2015_02_06_54 hkumars@slc00skv.myco.com's password:
Here, the administrator has to provide the user credential to copy the automation data on the secondary OMS which will be used while rolling back the patches.
Troubleshooting Bash Script Execution
The following section covers the most common issues you may encounter while executing OMSPatcher-generated bash scripts in multi-OMS (UNIX-based) environments.
No Windows Support
Microsoft Windows does not support bash script execution. So, this optimization (steps reduction) is not applicable for Windows OMS PS2 environments. The older context sensitive individual steps output through OMSPatcher remains in Windows.
Bash script program availability
The scripts assume that bash is located at /bin/bash
. However, if this is not true, make sure the first line of the scripts are updated with the output of whereis bash
.
In-between command failure in bash script
If there is a failure in between execution of commands in the bash script, the script stops running. The OMS administrator must triage the failure and comment out (inserting a hash "#" character at the beginning of a line) the already executed portions of the script and restart the bash script execution. Make sure you do not to comment out prompts and prompt-related code in the script.
Complete execution needed for all bash scripts
ALL bash script steps must be executed. No script and no step within any script can be omitted, even in the event of failures. Patching is correct and complete if and only if all steps of all bash scripts are executed correctly as per the order specification.
Patch location (if mounted)
The patch location input may exist on a mounted location. The bash scripts try to perform a secure copy (SCP) from the local OMS (where the OMSPatcher Perl script was invoked). The SCP attempt could fail if the location is mounted. The bash script will ignore the SCP failure.
OMS repository SYSMAN password and prompts
The bash script prompts for OMS repository SYSMAN password only at the point where a command requires this information. The script does not prompt for the SYSMAN password at the beginning of the script. For this reason, pay special attention to prompts at all places of the script execution. Bash script execution is not a silent execution.
The bash script prompt will appear as follows:
Please provide credential for OMS repository SYSMAN user:
Patch Transfer/Download
The script will provide an option to download patch from local OMS to remote nodes (for the scripts that involve remote nodes). If the patch is on shared location (or) already downloaded to a specified location mentioned by the script, a user can choose to input n when prompted, and ignore this transfer.
OMSPatcher Release 13.6.0.0.0 supports resume upon failure capability for both single-OMS and multi-OMS configurations.
This section covers the following topics:
On a single OMS System, OMSPatcher executes end-to-end automation of patching steps. once a failure has occurred, OMSPatcher can generate a bash script containing list of all incomplete (or) failed steps. The OMS administrator must refer to the master log file created by OMSPatcher to ascertain and resolve the root cause of the failure, and then run the bash script given by OMSPatcher. The bash script runs the steps from the point of failure.
Example
OMSPatcher, while applying an auto system patch. fails due to file permission issue.
Example:
OMSPatcher/omspatcher apply /scratch/patch_2nd_nov/em13_1/bundle_patches/1111191 OMSPatcher Automation Tool Copyright (c) 2015, Oracle Corporation. All rights reserved. OMSPatcher version : 13.6.0.0.0 OUI version : 13.6.0.0.0 Running from : /scratch/mw Log file location : /scratch/mw/cfgtoollogs/omspatcher/opatch2015-12-01_01-06-42AM_1.log OMSPatcher log file: /scratch/mw/cfgtoollogs/omspatcher/1111191/omspatcher_2015-12-01_01-06-50AM_deploy.log Please enter OMS weblogic admin server URL(t3s://myserver.myco.com:7101):> Please enter OMS weblogic admin server username(weblogic):> Please enter OMS weblogic admin server password:> WARNING: Could not apply the patch "1111155" because the "oracle.samples.xohs.oms.plugin with version 13.1.4.0.0" core component of the OMS or the plug-in for which the patch is intended is either not deployed or deployed with another version in your Enterprise Manager system. Configuration Validation: Success Running apply prerequisite checks for sub-patch(es) "1111126 1111137" and Oracle Home "/scratch/mw"... Sub-patch(es) "1111126 1111137" are successfully analyzed for Oracle Home "/scratch/mw" To continue, OMSPatcher will do the following: [Patch and deploy artifacts] : Apply sub-patch(es) [ 1111126 ] to component "oracle.sysman.top.oms" and version "13.1.0.0.0"; Apply sub-patch(es) [ 1111137 ] to component "oracle.sysman.emas.oms.plugin" and version "13.1.1.0.0"; Register MRS artifact "eventsaux"; Register MRS artifact "VCPUUtilization" Do you want to proceed? [y|n] y User Responded with: Y Applying sub-patch "1111126 " to component "oracle.sysman.top.oms" and version "13.1.0.0.0"... Applying sub-patch "1111137 " to component "oracle.sysman.emas.oms.plugin" and version "13.1.1.0.0"... OMSPatcher failed to apply following patch(es) "1111137" to core/plugin Oracle home(s). Complete Summary ================ All log file names referenced below can be accessed from the directory "/scratch/mw/cfgtoollogs/omspatcher/2015-12-01_01-06-42AM_SystemPatch_1111191_1" Patching summary: ----------------- Binaries of the following sub-patch(es) have been applied successfully: Featureset Sub-patches Log file ---------- ----------- -------- oracle.sysman.top.oms_13.1.0.0.0 1111126 1111126_opatch2015-12-01_01-07-32AM_3.log Binaries of the following sub-patch(es) failed to get applied: Featureset Sub-patches Log file ---------- ----------- -------- oracle.sysman.emas.oms.plugin_13.1.1.0.0 1111137 1111137_opatch2015-12-01_01-08-06AM_4.log The following sub-patches are incompatible with components installed in the OMS system: 1111155 OMSPatcher failed to execute some of the patching steps. Please check the Patching summary,individual logs and try to resolve the issue. Once the issue is resolved,Please execute below script to complete patching session: "/scratch/mw/.omspatcher_storage/oms_session/scripts_2015-12-01_01-06-42AM/run_script_singleoms_resume.sh" ------------------------------------------------------------------------------------------------ OMSPatcher wont allow any other patching operations unless the script is executed successfully ------------------------------------------------------------------------------------------------ [ Error during Patch and deploy artifacts Phase]. Detail: OMSPatcher failed to apply some of the patches to the OMS instance home(s). OMSPatcher failed: OMSPatcher failed to execute some of the OMS operations. Please refer log file(s) for details. -------------------------------------------------------------------------------- The following warnings have occurred during OPatch execution: 1) Could not apply the patch "1111155" because the "oracle.samples.xohs.oms.plugin with version 13.1.4.0.0" core component of the OMS or the plug-in for which the patch is intended is either not deployed or deployed with another version in your Enterprise Manager system. -------------------------------------------------------------------------------- Log file location: /scratch/mw/cfgtoollogs/omspatcher/1111191/omspatcher_2015-12-01_01-06-50AM_deploy.log Recommended actions: Please refer log file(s) for more details on the errors. Please contact Oracle Support.
OMS Administrator cannot start a new patching session when there are remnants of an incomplete patching session. OMSPatcher clearly errors out with the detailed information regarding the failure and what action need to be taken to fix this issue.
Example:
OMSPatcher/omspatcher apply /scratch/patch_2nd_nov/em13_1/bundle_patches/1111191 OMSPatcher Automation Tool Copyright (c) 2015, Oracle Corporation. All rights reserved. OMSPatcher version : 13.6.0.0.0 OUI version : 13.6.0.0.0 Running from : /scratch/mw Log file location : /scratch/mw/cfgtoollogs/omspatcher/opatch2015-12-01_01-15-09AM_1.log OMSPatcher failed: OMSPatcher finds that previous patching session is not yet completed. Please refer log file "/scratch/mw/cfgtoollogs/omspatcher/1111191/omspatcher_2015-12-01_01-06-50AM_deploy.log" for the previous session and execute the script "/scratch/mw/.omspatcher_storage/oms_session/scripts_2015-12-01_01-06-42AM/run_script_singleoms_resume.sh" to complete the previous session. OMSPatcher can proceed to execute new operations only if previous session is completed successfully. Log file location: /scratch/mw/cfgtoollogs/omspatcher/opatch2015-12-01_01-15-09AM_1.log OMSPatcher failed with error code 73
Now OMS Administrator can run the single-OMS Resume script to finish the failed patching session.
Example:
/scratch/mw/.omspatcher_storage/oms_session/scripts_2015-12-01_01-06-42AM/run_script_singleoms_resume.sh Verifying embedded script host-address "myserver.myco.com" against the network interface for a match... Trying for a match with: fe80:0:0:0:221:f6ff:feb6:424%2(fe80:0:0:0:221:f6ff:feb6:424%2) Trying for a match with: myserver.myco.com(10.252.41.52) Script-host address matched with host network interface. Please provide credential for OMS repository SYSMAN user: Command to execute (Step 1): echo /scratch/patch_2nd_nov/em13_1/bundle_patches/1111191/1111137 >> /scratch/mw/.phBaseFile2015-12-01_01-06-42AM.txt Command to execute (Step 1): /scratch/mw/OPatch/opatch napply -phBaseFile /scratch/mw/.phBaseFile2015-12-01_01-06-42AM.txt -invPtrLoc /scratch/mw/oraInst.loc -oh /scratch/mw -silent Command to execute (Step 1): rm /scratch/mw/.phBaseFile2015-12-01_01-06-42AM.txt Command to execute (Step 1): mkdir -p /scratch/mw/.omspatcher_storage/1111137_Aug_31_2015_01_01_58; cp -Rf /scratch/mw/.patch_storage/1111137_Aug_31_2015_01_01_58/original_patch /scratch/mw/.omspatcher_storage/1111137_Aug_31_2015_01_01_58 Oracle Interim Patch Installer version 13.6.0.0.0 Copyright (c) 2015, Oracle Corporation. All rights reserved. Oracle Home : /scratch/mw Central Inventory : /scratch/oraInventory from : /scratch/mw/oraInst.loc OPatch version : 13.6.0.0.0 OUI version : 13.6.0.0.0 Log file location : /scratch/mw/cfgtoollogs/opatch/opatch2015-12-01_01-16-33AM_1.log OPatch detects the Middleware Home as "/scratch/mw" Verifying environment and performing prerequisite checks... OPatch continues with these patches: 1111137 Do you want to proceed? [y|n] y Y (auto-answered by -silent) User Responded with: Y All checks passed. Backing up files... Applying interim patch '1111137' to OH '/scratch/mw' Patching component oracle.sysman.emas.oms.plugin, 13.1.1.0.0... Patch 1111137 successfully applied. Log file location: /scratch/mw/cfgtoollogs/opatch/opatch2015-12-01_01-16-33AM_1.log OPatch succeeded. Command to execute (Step 2): /scratch/mw/bin/emctl register oms metadata -service eventsaux -file /scratch/mw/sysman/metadata/events/auxiliary/metric_alert_aux.xml -core -sysman_pwd %EM_REPOS_PASSWORD% Oracle Enterprise Manager Cloud Control 13c Release 1 Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved. Metadata registration successful Command to execute (Step 3): /scratch/mw/bin/emctl register oms metadata -service VCPUUtilization -file /scratch/mw/plugins/oracle.sysman.emas.oms.plugin_13.1.1.0.0/metadata/vcpu/vcpu-exalogic-registration.xml -pluginId oracle.sysman.emas -sysman_pwd %EM_REPOS_PASSWORD% Oracle Enterprise Manager Cloud Control 13c Release 1 Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved. Metadata registration successful Command to execute (Step 4): /scratch/mw/OMSPatcher/omspatcher commit -id 1111126 -oh /scratch/mw -invPtrLoc /scratch/mw/oraInst.loc OMSPatcher Automation Tool Copyright (c) 2015, Oracle Corporation. All rights reserved. OMSPatcher version : 13.6.0.0.0 OUI version : 13.6.0.0.0 Running from : /scratch/mw Log file location : /scratch/mw/cfgtoollogs/omspatcher/opatch2015-12-01_01-17-14AM_1.log OMSPatcher will now mark the patch "1111126,1111137" as auto-executed. Log file location: /scratch/mw/cfgtoollogs/omspatcher/opatch2015-12-01_01-17-14AM_1.log OMSPatcher succeeded.
OMSPatcher prompts for the SYSMAN password at the start of the script. OMSPatcher cannot execute patching steps on a multi-OMS configuration; it generates a bash script containing the entire patching steps specific to each host for all the nodes. The name of the script contains the hostname and username. The OMS administrator can run a specific script for each host on all nodes to complete patching session.
OMSPatcher apply executes successfully as it generates only patching instructions without executing bash scripts.
Example:
$ OMSPatcher/omspatcher apply /scratch/opatchdev/targetPatchingImplRegistration/1111118 OMSPatcher Automation Tool Copyright (c) 2015, Oracle Corporation. All rights reserved. OMSPatcher version : 13.6.0.0.0 OUI version : 13.6.0.0.0 Running from : /scratch/aime1/work/midnew9693/oms Log file location : /scratch/aime1/work/midnew9693/oms/cfgtoollogs/opatch/opatch2014-05-05_22-43-08PM_1.log OMSPatcher log file: /scratch/aime1/work/midnew9693/oms/cfgtoollogs/omspatcher/1111118/opatch_oms_2014-05-05_22-43-14PM_deploy.log Please enter OMS weblogic admin server URL(t3s://linux01amd.myco.com:7101):> Please enter OMS weblogic admin server username:> weblogic Please enter OMS weblogic admin server password:> Configuration Validation: Success WARNING: OMSPatcher cannot run patching steps in multi-OMS environment. Please perform the following steps to complete patching operations. ------------------------------------------------------------------- 1. Please copy the script "/scratch/aime1/work/midnew9693/oms/.omspatcher_storage/oms_session/scripts_2014-05-05_22-43-51/run_script#1_on_host_linux07jdx_us_oracle_com_as_user_aime1.sh" to "linux07jdx.myco.com" and execute the script. 2. Please execute the script "/scratch/aime1/work/midnew9693/oms/.omspatcher_storage/oms_session/scripts_2014-05-05_22-43-51/run_script#2_on_host_linux01amd_us_oracle_com_as_user_aime1.sh" on local host. -------------------------------------------------------------------------------- The following warnings have occurred during OMSPatcher execution: 1) OMSPatcher cannot run patching steps in multi-OMS environment. -------------------------------------------------------------------------------- OMSPatcher Session completed with warnings. Log file location: /scratch/aime1/work/midnew9693/oms/cfgtoollogs/omspatcher/1111118/opatch_oms_2014-05-05_22-43-14PM_deploy.log OMSPatcher completed with warnings.
Run the bash script corresponding to the local host (primary host on a Multi-OMS configuration). Script execution has failed because of issue in connecting to database repository because of incorrect sysman password.
Example:
$ /scratch/aime1/work/midnew9693/oms/.omspatcher _storage/oms_session/scripts_2014-05-05_22-43-51/run_script#2_on_host_linux01amd_us_oracle_com_as_user_aime1.sh Creating master log file /scratch/aime1/work/midnew9693/oms/.omspathcer_storage/oms_session/oms_session_log_2014-05-05_22-43-08PM... Creating session file /scratch/aime1/work/midnew9693/oms/.omspatcher_storage/oms_session/oms_session_2014-05-05_22-43-08PM... Please provide credential for OMS repository SYSMAN user: Command to execute (Step 2): /scratch/aime1/work/midnew9693/oms/OMSPatcher/omspatcher checkApplicable -ph /scratch/opatchdev/targetPatchingImplRegistration/1111118 -oh /scratch/aime1/work/midnew9693/oms -invPtrLoc /scratch/aime1/work/midnew9693/oms/oraInst.loc OMSPatcher Automation Tool Copyright (c) 2015, Oracle Corporation. All rights reserved. OMSPatcher version : 13.6.0.0.0 OUI version : 13.6.0.0.0 Running from : /scratch/aime1/work/midnew9693/oms Log file location : /scratch/aime1/work/midnew9693/oms/cfgtoollogs/opatch/opatch2014-05-05_22-45-52PM_1.log OMSPatcher log file: /scratch/aime1/work/midnew9693/oms/cfgtoollogs/omspatcher/1111118/opatch_oms_2014-05-05_22-45-53PM_analyze.log Running apply prerequisite checks for sub-patch(es) "1111118" and Oracle Home "/scratch/aime1/work/midnew9693/oms"... Please monitor OPatch log file: /scratch/aime1/work/midnew9693/oms/cfgtoollogs/opatch/1111118_May_05_2014_22_45_52/ApplyPrereq2014-05-05_22-45-57PM_2.log Sub-patch(es) "1111118" are successfully analyzed for Oracle Home "/scratch/aime1/work/midnew9693/oms" Complete Summary ================ All log file names referenced below can be accessed from the directory "/scratch/aime1/work/midnew9693/oms/cfgtoollogs/opatch/2014-05-05_22-45-52PM_SystemPatch_1111118_1" Prerequisites analysis summary: ------------------------------- The following sub-patch(es) are applicable: Oracle Home Name Sub-patches Log file ---------------- ----------- -------- oms12c1 1111118 1111118_ApplyPrereq2014-05-05_22-45-57PM_2.log Log file location: /scratch/aime1/work/midnew9693/oms/cfgtoollogs/omspatcher/1111118/opatch_oms_2014-05-05_22-45-53PM_analyze.log OMSPatcher succeeded. Command to execute (Step 4): echo /scratch/opatchdev/targetPatchingImplRegistration/1111118/1111118 >> /scratch/aime1/work/midnew9693/oms/.phBaseFile2014-05-05_22-43-08PM.txt Command to execute (Step 4): /scratch/aime1/work/midnew9693/oms/OPatch/opatch napply -phBaseFile /scratch/aime1/work/midnew9693/oms/.phBaseFile2014-05-05_22-43-08PM.txt -invPtrLoc /scratch/aime1/work/midnew9693/oms/oraInst.loc -oh /scratch/aime1/work/midnew9693/oms -silent Command to execute (Step 4): rm /scratch/aime1/work/midnew9693/oms/.phBaseFile2014-05-05_22-43-08PM.txt Oracle Interim Patch Installer version 13.6.0.0.0 Copyright (c) 2014, Oracle Corporation. All rights reserved. Oracle Home : /scratch/aime1/work/midnew9693/oms Central Inventory : /ade/aime1_opatchauto_fix_lat/oracle/work/DB112/oraInventory from : /scratch/aime1/work/midnew9693/oms/oraInst.loc OPatch version : 13.6.0.0.0 OUI version : 13.6.0.0.0 Log file location : /scratch/aime1/work/midnew9693/oms/cfgtoollogs/opatch/opatch2014-05-05_22-46-00PM_1.log OPatch detects the Middleware Home as "/scratch/aime1/work/midnew9693" Verifying environment and performing prerequisite checks... OPatch continues with these patches: 1111118 Do you want to proceed? [y|n] Y (auto-answered by -silent) User Responded with: Y All checks passed. Backing up files... Applying interim patch '1111118' to OH '/scratch/aime1/work/midnew9693/oms' Patching component oracle.sysman.oms.core, 13.1.0.0.0... Verifying the update... Patch 1111118 successfully applied. Log file location: /scratch/aime1/work/midnew9693/oms/cfgtoollogs/opatch/opatch2014-05-05_22-46-00PM_1.log OPatch succeeded. Command to execute (Step 6): /scratch/aime1/work/midnew9693/oms/bin/emctl register oms metadata -service TargetPatchingImplRegistration -debug -file /scratch/aime1/work/midnew9693/oms/sysman/metadata/targetpatchingregister/RegisterAgentTarget.xml -core -sysman_pwd %EM_REPOS_PASSWORD% Oracle Enterprise Manager Cloud Control 12c Release 4 Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved. Starting output for debug mode. Debug logs will be written to /scratch/aime1/work/insthome9693/em/EMGC_OMS1/sysman/log/emctl.log EM-04036: Unable to get a connection to the repository! Exiting... The command failed with error code 36 Script execution has failed. Please refer to log file: /scratch/aime1/work/midnew9693/oms/.omspatcher_storage/oms_session/oms_session_log_2014-05-05_22-43-08PM for more details Please fix the failures and re-run the same script to complete the patching session.
OMS Administrator can re-run the script by fixing the issue (provide correct sysman password to connect to database repository.). Script resumes execution from the failure point and executes successfully.
Example:
$ /scratch/aime1/work/midnew9693/oms/.omspatcher _storage/oms_session/scripts_2014-05-05_22-43-51/run_script#2_on_host_linux01amd_us_oracle_com_as_user_aime1.sh Please provide credential for OMS repository SYSMAN user: Command to execute (Step 2): /scratch/aime1/work/midnew9693/oms/OMSPatcher/omspatcher checkApplicable -ph /scratch/opatchdev/targetPatchingImplRegistration/1111118 -oh /scratch/aime1/work/midnew9693/oms -invPtrLoc /scratch/aime1/work/midnew9693/oms/oraInst.loc SKIP command for step 2... Command to execute (Step 4): echo /scratch/opatchdev/targetPatchingImplRegistration/1111118/1111118 >> /scratch/aime1/work/midnew9693/oms/.phBaseFile2014-05-05_22-43-08PM.txt Command to execute (Step 4): /scratch/aime1/work/midnew9693/oms/OPatch/opatch napply -phBaseFile /scratch/aime1/work/midnew9693/oms/.phBaseFile2014-05-05_22-43-08PM.txt -invPtrLoc /scratch/aime1/work/midnew9693/oms/oraInst.loc -oh /scratch/aime1/work/midnew9693/oms -silent Command to execute (Step 4): rm /scratch/aime1/work/midnew9693/oms/.phBaseFile2014-05-05_22-43-08PM.txt SKIP command for step 4... Command to execute (Step 6): /scratch/aime1/work/midnew9693/oms/bin/emctl register oms metadata -service TargetPatchingImplRegistration -debug -file /scratch/aime1/work/midnew9693/oms/sysman/metadata/targetpatchingregister/RegisterAgentTarget.xml -core -sysman_pwd %EM_REPOS_PASSWORD% Oracle Enterprise Manager Cloud Control 12c Release 4 Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved. Starting output for debug mode. Debug logs will be written to /scratch/aime1/work/insthome9693/em/EMGC_OMS1/sysman/log/emctl.log Metadata registration successful Command to execute (Step 7): /scratch/aime1/work/midnew9693/oms/OMSPatcher/omspatcher commit -id 1111118 -oh /scratch/aime1/work/midnew9693/oms -invPtrLoc /scratch/aime1/work/midnew9693/oms/oraInst.loc OMSPatcher Automation Tool Copyright (c) 2015, Oracle Corporation. All rights reserved. OMSPatcher version : 13.6.0.0.0 OUI version : 13.6.0.0.0 Running from : /scratch/aime1/work/midnew9693/oms Log file location : /scratch/aime1/work/midnew9693/oms/cfgtoollogs/opatch/opatch2014-05-05_22-49-34PM_1.log OMSPatcher will now mark the patch "1111118" as auto-executed. Log file location: /scratch/aime1/work/midnew9693/oms/cfgtoollogs/opatch/opatch2014-05-05_22-49-34PM_1.log OMSPatcher succeeded. All operations for this script are appended to log file: /scratch/aime1/work/midnew9693/oms/.omspatcher_storage/oms_session/oms_session_log_2014-05-05_22-43-08PM