19 Patching Oracle Management Service and the Repository

Important:

The patching methodology discussed in this chapter can only be used with Enterprise Manager Cloud Control Release 12.1.0.4 and later.

OPatchauto (introduced with version 11.1 of the OPatch utility) 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:

19.1 OPatch Automation

With OPatchauto, you can automatically patch a typical OMS configuration (core, plug-in homes) with minimal intervention.

OPatchauto performs many of the pre-patch checks such as:

  • Configuration-based prerequisite checks

  • Patch-based binary prerequisite checks

OPatchauto 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, OPatchauto is able to simplify patching tasks by automating most of the steps.

19.1.1 Supported OMS Configurations and OPatchauto Patchability

  • Single OMS – OMS application that runs from a single OMS instance of the system. OPatchauto 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. OPatchauto 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 OPatchAuto.

  • Standby OMS – A HA (high availability) OMS configuration of Enterprise Manager which permits servicing requests when the primary OMS is down. When configured in this way, the standby OMS is managed by a different domain (managed by Oracle WebLogic Administration Server). OPatchauto 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, the administrator needs to follow the steps given by OPatchauto.

  • 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 OPatchauto.

  • 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.

Figure 19-1 Simple Multi-OMS System

OMS architecture

For a single OMS system (primary), OPatchauto will execute the patching steps. For a multi-OMS UNIX system, OPatchauto generates bash scripts for execution, one per OMS instance; follow the instructions given by OPatchauto to find those scripts. (Requires OPatch 11.1.0.10.4 or later) For Windows multi-OMS systems, OPatchauto 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.

19.1.2 OUI Inventory Configurations

Apart from the target (or) instance-based configurations, OPatchauto utilizes installation configuration relationships established in the Oracle Universal Installer (OUI) inventory as core and plug-in Oracle Homes. A typical OMS 12c home from the OUI inventory is organized as follows:

   <Middleware Home>
    |_____platform home         
    |_____plugin homes
         |_____oracle.sysman.db.oms.plugin_12.1.0.4.0
         |_____oracle.sysman.emas.oms.plugin_12.1.0.4.0
         |_____oracle.sysman.mos.oms.plugin_12.1.0.4.0
               .
               .
               .

19.1.3 Supported Patch Format

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
                |_____ etc/config/actions.xml
                |_____ files/Subpatch1 &rsquor;payload'
       Sub-patch2
                |_____  etc/config/inventory.xml
                |_____ etc/config/actions.xml
                |_____ files/Subpatch1 &rsquor;payload'

Notes:

  • For Enterprise Manager release 12.1.0.2 or below, OPatchauto is not supported for the released one-off patches. For these older releases, you must use OPatch and follow the patch README instructions.

  • OPatchauto and System patches are only supported by Enterprise Manager release 12.1.0.3 and above.

19.1.4 Supported Patching Methodologies

OPatchauto supports rolling mode only for System patches without any automation (binary-only patching through OPatchauto). For all other artifacts (MRS, SQL), OPatchAuto only supports complete system downtime patching operations.

Refer to the patch README for the explicit information on supported patching methodologies.

19.2 Required OPatchauto Parameters

OPatchauto 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 OPatchauto requires this input for each patching operation, OPatchauto provides the ability to encrypt the username and password via WebLogic encryption APIs and pass this information using a property file when running OPatchauto apply and rollback operations. The next section discusses how to create a property file.

19.2.1 Creating a Property File

The automated patching functionality achieved using opatchauto 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. OPatch 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 OPatch property file:

  1. Run the following script to create the WebLogic encrypted configuration and key files.

    On UNIX:

    $ OPatch/wlskeys/createkeys.sh –oh <full path of platform home> -location <location to put the encrypted files>
    

    On Windows:

    $ OPatch\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.

  2. 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 a Oracle Home.
    
    $ORACLE_HOME/bin/emctl status oms -details
    Oracle Enterprise Manager Cloud Control 12c Release 4  
    Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
    Enter Enterprise Manager Root (SYSMAN) Password : 
    Console Server Host        : my_console_server.oracle.com
    HTTP Console Port          : 7788
    HTTPS Console Port         : 7799
    HTTP Upload Port           : 4889
    HTTPS Upload Port          : 4900
    EM Instance Home           : /scratch/hkumars/oms_install_dir/gc_inst/em/EMGC_OMS2
    OMS Log Directory Location : /scratch/hkumars/oms_install_dir/gc_inst/em/EMGC_OMS2/sysman/log
    OMS is not configured with SLB or virtual hostname
    Agent Upload is locked.
    OMS Console is locked.
    Active CA ID: 1
    Console URL: https://my_console_server.oracle.com:7799/em
    Upload URL: https://my_console_server.oracle.com:4900/empbs/upload
     
    WLS Domain Information
    Domain Name            : GCDomain
    Admin Server Host      : my_admin_server.oracle.com
    Admin Server HTTPS Port: 7101
     
    Oracle Management Server Information
    Managed Server Instance Name: EMGC_OMS2
    Oracle Management Server Instance Host: my_console_server.oracle.com
    WebTier is Up
    Oracle Management Server is Up
     
    BI Publisher Server is not functioning because of the following reason:
    Unexpected error occurred. Check error and log files.
    Check the following log files:
    EM log files: /scratch/hkumars/oms_install_dir/gc_inst/em/EMGC_OMS2/sysman/log/emctl.log, emoms.trc, emoms_pbs.trc
    BI Publisher Server Logs: /scratch/hkumars/oms_install_dir/gc_inst/user_projects/domains/GCDomain/servers/BIP2/logs/
    BI Publisher Log        : /scratch/hkumars/oms_install_dir/gc_inst/user_projects/domains/GCDomain/servers/BIP2/logs/bipublisher/bipublisher.log
    
    Following is the example of how a property file (constructed by the above mentioned guidelines) should appear:
     
    AdminServerURL=t3s://my_admin_server.oracle.com:7101
    AdminConfigFile=/scratch/hkumars/oms_install_dir/middleware/oms/config/config
    AdminKeyFile=/scratch/hkumars/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

19.3 Prerequisites for Running OPatchauto

Before running an OPatchauto 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 11.1.0.0.0 and Patch 6880880

    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 OPatchauto patching session, Oracle recommends running the following commands on each OMS instance (in your OMS system).

$<Platform Home>/OPatch/opatchauto apply –analyze 

Must be run from the System patch location (for apply operations)

Note:

OMS systems need not be shut down when running opatchauto apply -analyze.

Note:

Check the Patch README and the instructions given for chosen patching methodologies.

OR

$<Platform Home>/OPatch/opatchauto rollback –analyze –id  <list of sub-patches to be rolled back for System patch>  

Example 19-1 opatchauto apply -analyze Output

$opatchauto apply /scratch/patches/targetPatchingImplRegistration/1111118 -property_file property_file -analyze
OPatch Automation Tool
Copyright (c) 2014, Oracle Corporation.  All rights reserved.

OPatchauto version : 11.1.0.10.4
OUI version        : 11.1.0.12.0
Running from       : /scratch/aime/work/midnew270/oms
Log file location  :
 /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/opatch2014-05-01_21-26-49PM_1.log

OPatchauto log file:
 /scratch/aime/work/midnew270/oms/cfgtoollogs/opatchauto/1111118/opatch_oms_2014-05-01_21-26-51PM_analyze.log

Configuration Validation: Success

Running apply prerequisite checks for sub-patch(es) "1111118" and Oracle Home "/scratch/aime/work/midnew270/oms"...
Please monitor OPatch log file:
 /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/1111118_May_01_2014_21_26_49/ApplyPrereq2014-05-01_21-27-05PM_2.log
Sub-patch(es) "1111118" are successfully analyzed for Oracle Home
 "/scratch/aime/work/midnew270/oms"


Complete Summary
================

All log file names referenced below can be accessed from the directory "/scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/2014-05-01_21-26-49PM_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-01_21-27-05PM_2.log

Log file location:
 /scratch/aime/work/midnew270/oms/cfgtoollogs/opatchauto/1111118/opatch_oms_2014-05-01_21-26-51PM_analyze.log

OPatchauto succeeded.

Example 19-2 opatchauto rollback -analyze output

$opatchauto rollback -id 1111113,17712920,1111111 -property_file property_file -analyze
OPatch Automation Tool
Copyright (c) 2014, Oracle Corporation.  All rights reserved.

OPatchauto version : 11.1.0.10.4
OUI version        : 11.1.0.12.0
Running from       : /scratch/aime/work/midnew270/oms
Log file location  : /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/May_02_2014_01_05_58/rollback2014-05-02_01-05-58AM_1.log

OPatchauto log file:
 /scratch/aime/work/midnew270/oms/cfgtoollogs/opatchauto/SystemPatch/opatch_oms_2014-05-02_01-06-00AM_analyze.log

Configuration Validation: Success

Running rollback prerequisite checks for patch(es) "1111111" and Oracle Home "/scratch/aime/work/midnew270/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0"...Please monitor OPatch log file:
 /scratch/aime/work/midnew270/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0/cfgtoollogs/opatch/1111111_May_02_2014_01_05_59/RollbackPrereq2014-05-02_01-06-07AM_2.log
Sub-patch(es) "1111111" are successfully analyzed for Oracle Home "/scratch/aime/work/midnew270/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0"

Running rollback prerequisite checks for patch(es) "17712920" and Oracle Home "/scratch/aime/work/midnew270/plugins/oracle.sysman.db.oms.plugin_12.1.0.6.0"...
Please monitor OPatch log file:
 /scratch/aime/work/midnew270/plugins/oracle.sysman.db.oms.plugin_12.1.0.6.0/cfgtoollogs/opatch/17712920_May_02_2014_01_05_59/RollbackPrereq2014-05-02_01-06-10AM_2.log
Sub-patch(es) "17712920" are successfully analyzed for Oracle Home
 "/scratch/aime/work/midnew270/plugins/oracle.sysman.db.oms.plugin_12.1.0.6.0"

Running rollback prerequisite checks for patch(es) "1111113" and Oracle Home
 "/scratch/aime/work/midnew270/oms"...
Please monitor OPatch log file:
 /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/1111113_May_02_2014_01_05_59/RollbackPrereq2014-05-02_01-06-12AM_2.log
Sub-patch(es) "1111113" are successfully analyzed for Oracle Home
 "/scratch/aime/work/midnew270/oms"

Complete Summary
================

All log file names referenced below can be accessed from the directory
 "/scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/2014-05-02_01-05-58AM_SystemPatch_2111111_1"

Prerequisites analysis summary:
-------------------------------

The following sub-patch(es) are rollbackable:

Oracle Home Name   Sub-patches                      Log file
----------------   -----------                        --------
  oracle_sysman_db11      17712920   17712920_RollbackPrereq2014-05-02_01-06-10AM_2.log
  oracle_sysman_emas11       1111111    1111111_RollbackPrereq2014-05-02_01-06-07AM_2.log
 oms12c1       1111113    1111113_RollbackPrereq2014-05-02_01-06-12AM_2.log

Log file location:
 /scratch/aime/work/midnew270/oms/cfgtoollogs/opatchauto/SystemPatch/opatch_oms_2014-05-02_01-06-00AM_analyze.log

OPatchauto succeeded.

Note

  • Once the analysis finishes, you can refer to the OPatchauto log to see what steps would be executed by OPatchauto in non –analyze mode. The log file contains references to the HTML and text output file HTML containing detailed steps.

  • If you are analyzing a standby OMS system, you must include the -standby option.

19.4 Using OPatchauto

OPatchauto 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 OPatchauto "–oh" option. For example:

<Platform Home>/OPatch/opatchauto apply <patch>

Minimum Required OPatchauto Version: 11.1.0.10.4

Ensuring You Have the Latest Version of OPatch

OPatchauto uses the OPatch utility to apply the patch. For this reason, you must ensure that you have the latest version of OPatch 11.1 on all OMS instance platform homes. If you not sure which version of OPatch resides on your system, run the following command:

<Platform Home>/OPatch/opatchauto 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 OPatchauto typically involves the following phases:

1. Determining Whether Your System Meets OPatchauto System Requirements

Run opatchauto apply -analyze

The apply -analyze command simulates an OPatchauto 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 OPatchauto" for additional information.

2. Determining What System Patches Currently Exist on Your System

Run opatchauto lspatches

See "lspatches" for more information.

3. Obtaining Patches from My Oracle Support (MOS)

OPatchauto requires that the required platform or plug-in System patches be obtained from My Oracle Support and downloaded to the OMS instance on which OPatchauto is to be run.

See "My Oracle Support: Searching for Patches" for more information.

4. Applying a Patch

Run $opatchauto apply <patch>

The apply command applies all patches within a specified System patch to the platform home from which OPatchauto is command is run.

See "Running opatchauto apply" for more information.

5. Deinstalling Individual Sub-patches of a System Patch

Run $opatchauto 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 opatchauto rollback command.

See "Running opatchauto rollback" for more information.

19.4.1 My Oracle Support: Searching for Patches

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.

Figure 19-2 My Oracle Support Main Page

mos overview

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.

Figure 19-3 MOS Patches and Updates

mos patch

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).

Figure 19-4 Searching by Product or Family

OMS patch search

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.

Figure 19-5 OMS Core Patch Search Results

oms core search 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.

Figure 19-6 OMS Core Patch Page

OMS core patch page

Click Download to save the patch .ZIP file to your local system.

Figure 19-7 Patch Download Dialog

Surrounding text describes Figure 19-7 .

19.4.2 Running opatchauto 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 opatchauto 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 opatchauto apply will perform patching and deployment operations.

On your local OMS instance, run the following command from the top level System patch directory:

$<Platform home>/OPatch/opatchauto apply <patch>

Note:

Unlike opatchauto analyze, you should not run opatchauto apply on every OMS instance. OPatchauto 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, OPatchauto generates bash scripts for execution, one per OMS instance; follow the instructions given by opatchauto to find those scripts. (Requires OPatch 11.1.0.10.2 or later.) For Windows multi-OMS systems, OPatchauto will generate customized patching instructions/commands for the environment in text and HTML formats; administrators must execute these instructions to patch the various OMSs.

19.4.3 Running opatchauto 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 opatchauto 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 opatchauto rollback will perform the deinstallation operations.

On your local OMS instance, run the following command from the top level System patch directory:

$<Platform home>/OPatch/opatchauto rollback -id <list of comma separated sub-patches of System patch>

Note:

  • Unlike opatchauto analyze, you should not execute the opatchauto rollback command on every OMS instance. OPatchauto 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, Opatchauto generates bash scripts for execution, one per OMS instance; follow the instructions given by opatchauto to find those scripts. (Requires OPatch 11.1.0.10.2 or later) For Windows multi-OMS systems, OPatchauto will generate customized patching instructions/commands for the environment in text and HTML formats; administrators must execute these instructions to patch the various OMSs.

19.4.4 Running opatchauto lspatches

After the patch is applied or rolled back, you can run the opatchauto lspatches command to generate a comprehensive Oracle home – patches map of the OMS instance homes and installed patches.

Example 19-3 Sample opatchauto lspatches Output

$opatchauto lspatches
OPatch Automation Tool
Copyright (c) 2014, Oracle Corporation.  All rights reserved.
 
Oracle Home:/scratch/aime/work/midnew270/oms
1111113
1111111
1111115
 
Oracle Home:/scratch/aime/work/midnew270/plugins/oracle.sysman.db.oms.plugin_12.1.0.6.0
17712920;EM DB PLUGIN BUNDLE PATCH 12.1.0.4.4
 
Oracle Home:/scratch/aime/work/midnew270/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0
1111111 
 
The following groups of patch(es) are applied as System Patch bundle(s):
1111111
1111115
1111113,17712920,1111111
 
For more details on installed patch(es) in platform, plugin homes, Please do '$ORACLE_HOME/OPatch/opatch lsinventory -details -oh <desired home path>'

19.4.5 Running opatchauto version

To determine the version numbers of the various OPatchauto utilities (Opatch, OPlan, OsysModel) that reside on your system, you can run opatchauto version.

Example 19-4 opatchauto version Output

OPatchauto Version: 11.1.0.4.0
OPlan Version: 12.1.0.2.0
OsysModel build: Fri May 23 19:23:33 PDT 2014

19.4.6 Patching a Standby OMS System

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.

OPatchauto Command Syntax

This section provides a comprehensive listing and description of all OPatchauto commands used to patch an OMS.

Important:

OPatchauto commands must be run from the OMS Platform home.

OPatchauto Commands

The OPatchauto commands are run from the OMS Platform home out of the standard OPatch directory. The Platform home must be set as $ORACLE_HOME. In the following generic example, an OPatchauto command is run from a Platform home

<Platform home>/OPatch/opatchauto apply <PATH_TO_PATCH_DIRECTORY>

where <PATH_TO_PATCH_DIRECTORY> is the full path to the System patch top level directory.

OPatchauto consists of four primary commands.

  • apply

  • rollback

  • checkapplicable

  • saveConfigurationSnapshot

  • lspatches

  • version

OPatchauto help

You can view online help for any command (except version) by specifying the -help option.

<Platform home>/OPatch/opatchauto -help
OPatch Automation Tool
Copyright (c) 2014, Oracle Corporation.  All rights reserved.
 
 
 Usage: opatchauto [ -help ] [ -analyze ] [ command ]
 
            command := apply
                       rollback
                       checkApplicable
                       query
                       lspatches
                       version
                       saveConfigurationSnapshot
 
 <global_arguments> := -help       Displays the help message for the command.
                       -analyze    Print the actions, steps to be performed without any execution.
 
 example:
   'opatchauto -help'
   'opatchauto apply -help'
   'opatchauto rollback -help'
   'opatchauto checkApplicable -help'
   'opatchauto query -help'
   'opatchauto lspatches -help'
   'opatchauto saveConfigurationSnapshot -help'

Apply

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:

OPatchauto 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 opatchauto 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. OPatchauto can pass 'x=y' properties through the command line. See "Apply Command Properties".

Syntax

<Platform home>/OPatch/opatchauto 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>]
                 [-standby]

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

Table 19-1 Apply

Option Description

jre

This option tells opatchauto to use JRE (java) from the specified location instead of the default location under Oracle Home.

nonrolling

Apply and deploy the patch in non-rolling fashion, provided it is supported by the patch.

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 administrator defined property file for OPatchauto to use. The path to the property file should be absolute.

The keys for OPatchauto are:

'AdminConfigFile' - Encrypted file for Administration Server administrator of the OMS instance domain.

'AdminKeyFile' - Encrypted file for Administration Server password of the 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 opatchauto 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 'opatchauto' invocation. In order to create encrypted files for a WebLogic Admin Server username & password, run $ORACLE_HOME/OPatch/wlskeys/createKeys.sh (.cmd for Windows) to get the files and load it thorough a custom file via the 'property_file' option.

NOTE: For Windows, ensure that directories, files in the path are separated by "\\" in the property file.

analyze

Prints out the actions without any configuration/binary change through 'opatchauto'.

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 &rsquor;opatchauto apply' with this option must be run on each OMS instance to make sure all prerequisites pass for patching operations.

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.

standby

This option should be used when patching a standby OMS infrastructure.


Apply Command Properties

Table 19-2 Apply Properties

Option Description

OPatchAuto.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.

OPatchAuto.OMS_USER=<installed OMS user>

Used when OPatchauto is not able to obtain the installed OMS administrator name.

This switch is applicable only for Microsoft Windows environments.

OPatchAuto.OMS_SCRIPTS_DIR=<existing directory>

Used to specify a single, existing directory where bash scripts (generated by OPatchauto 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.


Rollback

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 opatchauto lspatches command. See "Running opatchauto lspatches".

Important: OPatchauto must be run from the platform home. ORACLE_HOME environment variable must be set as platform home or provided via the –oh option.

When running opatchauto 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. OPatchauto can pass 'x=y' properties through the command line. See "Rollback Command Properties".

Syntax

opatchauto 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] 
                    [-oh <Platform home path>]
                    [-standby ]

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

Table 19-3 Rollback

Option Description

id

List of sub-patches of a System patch. For a complete list of sub-patches, see the System patch README.

Use 'opatchauto lspatches' option to display all patch ids for both core home and plug-in homes with relation to the System patch bundles. The patch ids can be only from one bundle in a session. The list is separated by commas.

idfile

File that contains the list of sub-patch IDs of a System patch.

invPtrLoc

The invPtrLoc option is used to locate the Central Inventory Pointer File (oraInst.loc). Input for this option is the path to the oraInst.loc file.

jre

This jre option instructs OPatchauto 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 nonrolling option instructs OPatchauto to run the patching session run in 'nonrolling' mode. Before the patching session can start, the following prerequisites must be met:

  • The stack on the local node must be running

  • All remote nodes must be down.

property_file

The administrator defined property file for opatchauto to use. The path to the property file should be absolute.

The keys for 'opatchauto' 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 opatchauto/opatch understood key and each pair is separated by newline in the property file.

In order to create encrypted files for Oracle WebLogic Administration Server username & password, Use

$ORACLE_HOME/OPatch/wlskeys/createkeys.sh (.cmd for Windows) to get the files and load it thorough a custom file by 'property_file' option.

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 &rsquor;opatchauto rollback' with this option must be run on each OMS instance to make sure all prerequisites pass for patching operations.

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.

standby

This option should be used when patching a standby OMS infrastructure.


Rollback Command Properties

Table 19-4 Rollback Properties

Option Description

OPatchAuto.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.

OPatchAuto.OMS_USER=<installed OMS user>

Used when OPatchauto is not able to obtain the installed OMS administrator name.

This switch is applicable only for Microsoft Windows environments.

OPatchAuto.OMS_SCRIPTS_DIR=<existing directory>

Used to specify a single, existing directory where bash scripts (generated by OPatchauto 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.


lspatches

Display patches and their Oracle home relationships with reference to OMS platform and plug-in homes. Set ORACLE_HOME as the platform home or override the it using -oh option. This command also displays sub-patches of the System patch bundles. Each System patch bundle is separated by a new line.

Syntax

opatchauto lspatches   [ -invPtrLoc <Path to oraInst.loc> ]
                       [-jre <LOC> ]
                       [-oh <Platform Oracle home> ]

Options

Table 19-5 lspatches

Option Description

jre

This jre option instructs OPatchauto to use the JRE (java) from the specified location instead of the default location under Oracle Home.

invPtrLoc

The invPtrLoc option is used to locate the Central Inventory Pointer File (oraInst.loc. Input for this option is the path to the oraInst.loc file.

oh

The location of Enterprise Manager platform home. This overrides the ORACLE_HOME environment variable.


version

The version command shows the current version number of the OPatch utility, dependent OPlan version, and the osysmodel version.

Important: OPatchauto must be run from the platform home.

Syntax

<GI_HOME>/OPatch/opatchauto 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 19-6 version Command Options

Option Description

-invPtrLoc

The invPtrLoc option is used to locate the Central Inventory Pointer File (oraInst.loc). Input for this option is the path to the oraInst.loc file.

-jre

This jre option instructs OPatchauto to use the JRE (java) from the specified location instead of the default location under Oracle Home.

-oh

The oh option specifies the Oracle Home to work on. This takes precedence over the environment variable ORACLE_HOME.


checkApplicable

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

opatchauto 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 19-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


saveConfigurationSnapshot

The saveConfigurationSnapshot command generates configuration a snapshot for the primary OMS (along with OMS repository and standby OMS) and saves it to an XML file that can be read by OPatch.

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 OPatchAuto.OMS_DISABLE_HOST_CHECK=true option from the command line.

Syntax

opatchauto 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 19-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 OPatch 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 OPatchauto to use. The path to the property file must be absolute.

The keys for 'opatchauto' are:

  • AdminConfigFile - Encrypted file for Admin Server user of the GC Domain.

  • AdminServerURL' - Admin Server URL of GC Domain (Example: t3s://<host address>:<port number>)

  • AdminKeyFile - Encrypted file for Admin Server password of the GC Domain.

The Key, value pair is of the format 'x=y' where 'x' is an OPatchauto understood key and each pair is separated by newline in the property file.

The property_file option is typically used when running OPatchauto in silent mode operation (suppress user interaction)

In order to create encrypted files for a WebLogic Admin Server username & password, run the following script:

$ORACLE_HOME/OPatch/wlskeys/createKeys.sh

(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.


Standby OMS Patching

There are two methods used to implement a standby OMS:

1. Standby OMS - Replicating OMS, Software library and Repository Components

If a standby site is set up through file system replication (Enterprise Manager 12.1.0.3 and later), there is no need to patch the standby site to keep it in sync with the primary site. When you apply patches to the primary OMS, the changes are automatically replicated at the standby site either manually or via automatic storage replication. For more details on this approach, see the chapter on "Enterprise Manager Disaster Recovery" in the Enterprise Manager Advance Installation and Configuration Guide..

Using the data and storage replication, the standby site does not need to be patched.

2. Standby OMS Configured in Parallel with the Primary OMS System

When patches are applied on the primary site OMS, they must also be applied on the standby site Management Services. Note that patches typically update the Oracle Homes (via the OPatch apply command) and may require scripts to be run against the Management Repository. On the standby site, it is sufficient to update the Oracle Homes (using OPatchauto) and skip the running of scripts on the Management Repository because database changes are automatically propagated to the standby site using Data Guard.

To patch the standby site, run opatchauto apply and opatchauto rollback with the standby option.

Troubleshooting

This chapter describes common OPatchauto problems that may occur during patching operations or the analyze phase.

This chapter covers the following:

OPatchauto Troubleshooting Architecture

In order for OPatchauto 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 OPatchauto 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, OPatchauto 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, OPatchauto uses the following internal utilities to do binary patching operations. They have separated log files generated by OPatchauto. The internal utilities are patch binary prerequisite checks and patch binary apply, rollback operations.

OPatchauto Log Management Architecture

This section refers to the information through logs published by OPatchauto 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 opatchauto apply output that displays the various log files that are created when running OPatchauto.

Sample OPatchauto Apply Output

$ OPatch/opatchauto apply /scratch/patches/targetPatchingImplRegistration/1111118 -silent -property_file property_file 
OPatch Automation Tool
Copyright (c) 2014, Oracle Corporation.  All rights reserved.
 
OPatchauto version : 11.1.0.10.4
OUI version        : 11.1.0.12.0
Running from       : /scratch/aime/work/midnew270/oms
Log file location  : /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/opatch2014-05-15_03-24-24AM_1.log
 
OPatchauto log file: /scratch/aime/work/midnew270/oms/cfgtoollogs/opatchauto/1111118/opatch_oms_2014-05-15_03-24-25AM_deploy.log
 
Configuration Validation: Success
 
Running apply prerequisite checks for sub-patch(es) "1111118" and Oracle Home "/scratch/aime/work/midnew270/oms"...
Please monitor OPatch log file: /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/1111118_May_15_2014_03_24_24/ApplyPrereq2014-05-15_03-24-41AM_2.log
Sub-patch(es) "1111118" are successfully analyzed for Oracle Home "/scratch/aime/work/midnew270/oms"
 
To continue, OPatchauto will do the following:
[Patch and deploy artifacts]   : Apply sub-patch(es) [ 1111118 ] to Oracle Home "/scratch/aime/work/midnew270/oms";
                                 Register MRS artifact "TargetPatchingImplRegistration"
 
Do you want to proceed? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
 
Applying sub-patch "1111118" to Oracle Home "/scratch/aime/work/midnew270/oms"...
Please monitor OPatch log file: /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/1111118_May_15_2014_03_24_24/apply2014-05-15_03-24-48AM_4.log
 
Registering service "TargetPatchingImplRegistration" with register file "/scratch/aime/work/midnew270/oms/sysman/metadata/targetpatchingregister/RegisterAgentTarget.xml"...
 
Complete Summary
================
 
All log file names referenced below can be accessed from the directory "/scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/2014-05-15_03-24-24AM_SystemPatch_1111118_1"
 
Patching summary:
-----------------
 
Binaries of the following sub-patch(es) have been applied successfully:
 
Oracle Home Name   Sub-patches                                   Log file
----------------   -----------                                   --------
       oms12c1       1111118   1111118_apply2014-05-15_03-24-48AM_4.log
 
Deployment summary:
-------------------
 
The following artifact(s) have been successfully deployed:
 
Artifacts            Log file
---------             --------
MRS-TargetPatchingImplRegistration   emctl_register_TargetPatchingImplRegistration_2014-05-15_03-24-58AM.log
 
 
Log file location: /scratch/aime/work/midnew270/oms/cfgtoollogs/opatchauto/1111118/opatch_oms_2014-05-15_03-24-25AM_deploy.log
 
OPatchauto 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/aime/work/midnew270/oms/cfgtoollogs/opatch/2014-05-15_03-24-24AM_SystemPatch_1111118_1"

...

This consolidated log directory would contain the following files (here with reference to the example for apply).

$ ls -l /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/2014-05-15_03-24-24AM_SystemPatch_1111118_1 
total 64
-rw-rw-r-- 1 aime svrtech  5335 May 15 03:25 1111118_ApplyPrereq2014-05-15_03-24-41AM_2.log
-rw-rw-r-- 1 aime svrtech 19665 May 15 03:25 1111118_apply2014-05-15_03-24-48AM_4.log
-rw-rw-r-- 1 aime svrtech   120 May 15 03:24 AdminServerStatusPrerequisites_2014-05-15_03-24-40AM.log
-rw-rw-r-- 1 aime svrtech    66 May 15 03:24 RepositoryStatusPrerequisites_2014-05-15_03-24-41AM.log
-rw-rw-r-- 1 aime svrtech    71 May 15 03:24 Swlib_Prerequisite_2014-05-15_03-24-41AM.log
-rw-rw-r-- 1 aime svrtech   497 May 15 03:25 emctl_register_TargetPatchingImplRegistration_2014-05-15_03-24-58AM.log
-rw-rw-r-- 1 aime svrtech  9588 May 15 03:25 opatch2014-05-15_03-24-24AM_1.log
-rw-rw-r-- 1 aime svrtech  2708 May 15 03:25 temp_apply_automation.xml
-rw-rw-r-- 1 aime svrtech  2124 May 15 03:25 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 'opatchauto' log file will refer the individual log files so that administrator can easily connect to individual files to refer to any failure.

Logs for Oracle Support

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

  • OPatchauto log file

  • Output of opatchauto lspatches command on all OMS instance homes.

OPatchauto: Cases Analysis, Error Codes, and Remedies/Suggestions

Refer to the following table for common OPatchauto error codes.

Table 19-9 OPatchauto Error Codes

Error Code Description Remedy/Suggestion

231

Wrong Oracle WebLogic Administration Server URL and/or invalid credentials

Correct the interview inputs and run OPatchauto 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 OPatchauto 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 OPatchauto, 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

  • This is a case for single OMS system. Patching steps are decided by OPatchauto but it failed to execute steps. OPatchauto will print the failed executed step and the remaining steps to be executed for completion of patching operations. Administrator need to contact Oracle support with logs, resolve why it failed and then must execute manually the failed step and steps referred by OPatchauto (in OPatchauto log file) to complete operations.

  • In case of multi OMS (or) stand by OMS patching operations, failure of individual commands that got executed through text/html output must be brought to support notice for further diagnosis. After the failure condition is resolved, administrator need to execute the failed steps and further steps mentioned in HTML (or) text output to complete the patching operations.

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 OPatchauto log file for the failure.


OPatchauto: External Utilities Error Codes

The following table lists exit codes for external utilities that OPatchauto uses for life cycle and deployment. If the deployment (or) life cycle fails through OPatchauto, the administrator can search individual log files for the error messages shown in the Error Message/Recommendation column.

Table 19-10 OPatchauto 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.


Special Error Cases for OPatchauto OMS Automation

This section provides issue resolution information for special cases when using OPatchauto. 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 OPatchauto 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.

  1. Go to ORACLE_HOME

  2. Run OPatchauto in non-analyze mode. For further instructions, refer to the patch README and Administrator guide.

    Once the OPatchauto 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, opatchauto 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
    opatchauto has stopped all OMS processes successfully.
    

    If there is a failure while stopping OMS processes, OPatchauto will accordingly error out. Refer to the OPatchauto log file for details.

  3. OPatchauto 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):

    opatchauto 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.
  4. OPatchauto 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>opatchauto apply ..\patches\cmdRcu\1111112
    OPatch Automation Tool
    Copyright (c) 2014, Oracle Corporation.  All rights reserved.
     
     
    OPatchauto version : 11.1.0.10.4
    OUI version        : 11.1.0.12.0
    Running from       : c:\MW_130518\oms
    Log file location  : c:\MW_130518\oms\cfgtoollogs\opatch\opatch2014-06-26_08-16-19AM_1.log
     
    opatchauto log file: c:\MW_130518\oms\cfgtoollogs\opatchauto\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\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, opatchauto 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
    opatchauto has stopped all OMS processes successfully.
     
     
    opatchauto 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 OPatch log file: c:\MW_130518\oms\cfgtoollogs\opatch\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, OPatch 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\.patch_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 OPatch log file: c:\MW_130518\oms\cfgtoollogs\opatch\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\.patch_storage\1111112_Feb_21_2014_06_30_38\original_patch"
     
    Copying all logs to: c:\MW_130518\oms\cfgtoollogs\opatch\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\opatchauto\1111112\opatch_oms_2013-06-26_09-01-36AM_deploy.log
     
    opatchauto succeeded.
    

Multi-OMS Execution for UNIX based Systems

This section deals with possible issues you may encounter when running bash scripts generated by OPatchauto in multi-OMS (UNIX-based systems) environment. The following OPatchauto-generated output illustrates various script-based issues.

Example 19-5 OPatchauto Output: Multi-OMS, UNIX-based Environment

$ OPatch/opatchauto apply /scratch/aime/patches/ComparisonTemplate/1111136
OPatch Automation Tool
Copyright (c) 2014, Oracle Corporation.  All rights reserved.

OPatchauto version : 11.1.0.10.4
OUI version        : 11.1.0.12.0
Running from       : /scratch/aime/work/midnew6898/oms
Log file location  :
 /scratch/aime/work/midnew6898/oms/cfgtoollogs/opatch/opatch2014-05-28_11-39-39AM_1.log

OPatchauto log file:
/scratch/aime/work/midnew6898/oms/cfgtoollogs/opatchauto/1111136/opatch_oms_2014-05-28_11-39-40AM_deploy.log

Please enter OMS weblogic admin server URL(t3s://linux07jif.myco.com:7101):>
Please enter OMS weblogic admin server username:> weblogic
Please enter OMS weblogic admin server password:>       
   Configuration Validation: Success

WARNING: OPatchauto cannot run patching steps in multi-OMS environment.

Please perform the following steps to complete patching operations.
-------------------------------------------------------------------
1. Please copy the script "/scratch/aime/work/midnew6898/oms/.patch_storage/oms/scripts_2014-05-28_11-40-01/run_script#1_on_host_linux06xlv_us_oracle_com_as_user_aime.sh" to "linux06xlv.myco.com" and execute the script.

2. Please execute the script "/scratch/aime/work/midnew6898/oms/.patch_storage/oms/scripts_2014-05-28_11-40-01/run_script#2_on_host_linux07jif_us_oracle_com_as_user_aime.sh" on local host.

--------------------------------------------------------------------------------
The following warnings have occurred during OPatchauto execution:
1)  OPatchauto cannot run patching steps in multi-OMS environment.

--------------------------------------------------------------------------------
OPatchauto Session completed with warnings.
Log file location:
/scratch/aime/work/midnew6898/oms/cfgtoollogs/opatchauto/1111136/opatch_oms_2014-05-28_11-39-40AM_deploy.log

OPatchauto completed with warnings.

Note 1:

Generation of bash scripts is only available for UNIX based systems running OPatchauto 11.1.0.10.2 and above.

Note 2:

OPatchAuto completes with warnings with clear messages For example:

WARNING: OPatchauto cannot automate patching steps in multi-OMS environment.

This means that patching and deployment are not complete until the administrator performs the bash script execution instructions generated by OPatchatuo.

Troubleshooting Bash Script Execution

The following section covers the most common issues you may encounter while executing OPatchauto-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 OPatchAuto 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 OPatchauto 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.

Features in OPatchauto Release 11.1.0.11.0 and Above

OPatchauto Release 11.1.0.11.0 and above supports resume upon failure capability for both single-OMS and multi-OMS configurations.

This section covers the following topics:

Resume capability in Single-OMS Configuration

On a single OMS System, OPatchauto executes end-to-end automation of patching steps. Beginning with release 11.1.0.11.0, once a failure has occurred, OPatchauto 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 OPatchauto to ascertain and resolve the root cause of the failure, and then run the bash script given by OPatchauto. The bash script runs the steps from the point of failure.

Example

  1. OPatchauto, while applying an auto system patch. fails due to file permission issue.

    OPatch/opatchauto apply /net/adc2100679/scratch/opack_system_patch/ps2Convertedps3/targetPatchingImplRegistration/1111118
    OPatch Automation Tool
    Copyright (c) 2014, Oracle Corporation.  All rights reserved.
     
     
    OPatchauto version : 11.1.0.11.0
    OUI version        : 11.1.0.12.0
    Running from       : /scratch/aime/work/midnew270/oms
    Log file location  : /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/opatch2014-05-05_04-56-44AM_1.log
     
    OPatchauto log file: /scratch/aime/work/midnew270/oms/cfgtoollogs/opatchauto/1111118/opatch_oms_2014-05-05_04-56-48AM_deploy.log
     
    Please enter OMS weblogic admin server URL(t3s://linux01moa.myco.com:7101):> 
    Please enter OMS weblogic admin server username:> weblogic
    Please enter OMS weblogic admin server password:>           
     
     
    Configuration Validation: Success
     
     
    Running apply prerequisite checks for sub-patch(es) "1111118" and Oracle Home "/scratch/aime/work/midnew270/oms"...
    Please monitor OPatch log file: /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/1111118_May_05_2014_04_56_44/ApplyPrereq2014-05-05_04-57-42AM_2.log
    Sub-patch(es) "1111118" are successfully analyzed for Oracle Home "/scratch/aime/work/midnew270/oms"
     
    To continue, OPatchauto will do the following:
    [Patch and deploy artifacts]   : Apply sub-patch(es) [ 1111118 ] to Oracle Home "/scratch/aime/work/midnew270/oms";
                                     Register MRS artifact "TargetPatchingImplRegistration"
     
     
    Do you want to proceed? [y|n]
    y
    User Responded with: Y
     
    Applying sub-patch "1111118" to Oracle Home "/scratch/aime/work/midnew270/oms"...
    Please monitor OPatch log file: /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/1111118_May_05_2014_04_56_44/apply2014-05-05_05-02-45AM_4.log
     
     
    OPatchauto failed to apply following patch(es) "1111118"  to core/plugin Oracle home(s).
     
    Complete Summary
    ================
     
    All log file names referenced below can be accessed from the directory "/scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/2014-05-05_04-56-44AM_SystemPatch_1111118_1"
     
    Patching summary:
    -----------------
     
    The following sub-patch(es) are applicable:
     
    Oracle Home Name   Sub-patches                 Log file
    ----------------   -----------                 --------
          oms12c1       1111118   1111118_ApplyPrereq2014-05-05_04-57-42AM_2.log
     
     
    Binaries of the following sub-patch(es) failed to get applied:
     
      Oracle Home Name   Sub-patches                Log file
      ----------------   -----------                --------
            ms12c1       1111118   1111118_apply2014-05-05_05-02-45AM_4.log
     
     
     
    OPatchauto 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/aime/work/midnew270/oms/.opatchauto_patch_storage/oms_session/scripts_2014-05-05_04-56-44AM/run_script_singleoms_resume.sh"
     
    -------------------------------------------------------------------------------
    OPatchauto wont allow any other patching operations unless the script is executed successfully
    -------------------------------------------------------------------------------
     
    [ Error during Patch and deploy artifacts Phase]. Detail: opatchauto failed to apply some of the patches to the OMS instance home(s).
    OPatchauto failed: OPatchauto failed to execute some of the OMS operations. Please refer log file(s) for details.
    Log file location: /scratch/aime/work/midnew270/oms/cfgtoollogs/opatchauto/1111118/opatch_oms_2014-05-05_04-56-48AM_deploy.log
     
    Recommended actions: Please refer log file(s) for more details on the errors. Please contact Oracle Support.
     
    OPatchauto failed with error code 241
    
  2. OMS Administrator cannot start a new patching session when there are remnants of an incomplete patching session. OPatchauto clearly errors out with the detailed information regarding the failure and what action need to be taken to fix this issue.

    $opatchauto apply /net/adc2100679/scratch/opack_system_patch/ps2Convertedps3/Probanal/9111111
    OPatch Automation Tool
    Copyright (c) 2014, Oracle Corporation.  All rights reserved.
      
    OPatchauto version : 11.1.0.11.0
    OUI version        : 11.1.0.12.0
    Running from       : /scratch/aime/work/midnew270/oms
    Log file location  : /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/opatch2014-05-05_05-20-49AM_1.log
     
    OPatchauto failed: 
     
    OPatchauto finds that previous patching session is not yet completed. Please refer log file
    "/scratch/aime/work/midnew270/oms/cfgtoollogs/opatchauto/1111118/opatch_oms_2014-05-05_04-56-48AM_deploy.log"
    for the previous session and execute the script
    "/scratch/aime/work/midnew270/oms/.opatchauto_patch_storage/oms_session/scripts_2014-05-05_04-56-44AM/run_script_singleoms_resume.sh"
    to complete the previous session. OPatchauto can proceed to execute new operations only if previous session is completed successfully.
     
    Log file location: /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/opatch2014-05-05_05-20-49AM_1.log
     
    OPatchauto failed with error code 73
    
  3. Now OMS Administrator can run the single-OMS Resume script to finish the failed patching session

    $ /scratch/aime/work/midnew270/oms/.opatchauto_patch_storage/oms_session/scripts_2014-05-05_04-56-44AM/run_script_singleoms_resume.sh
     
    Please provide credential for OMS repository SYSMAN user: 
    Command to execute (Step 1): echo /net/adc2100679/scratch/opack_system_patch/ps2Convertedps3/targetPatchingImplRegistration/1111118/1111118 >> /scratch/aime/work/midnew270/oms/.phBaseFile2014-05-05_04-56-44AM.txt
    Command to execute (Step 1): /scratch/aime/work/midnew270/oms/OPatch/opatch napply -phBaseFile /scratch/aime/work/midnew270/oms/.phBaseFile2014-05-05_04-56-44AM.txt -invPtrLoc /scratch/aime/work/midnew270/oms/oraInst.loc -oh /scratch/aime/work/midnew270/oms -silent
    Command to execute (Step 1): rm /scratch/aime/work/midnew270/oms/.phBaseFile2014-05-05_04-56-44AM.txt
    Oracle Interim Patch Installer version 11.1.0.11.0
    Copyright (c) 2014, Oracle Corporation.  All rights reserved.
     
     
    Oracle Home       : /scratch/aime/work/midnew270/oms
    Central Inventory : /ade/aime_emgcview/oracle/work/DB112/oraInventory
       from           : /scratch/aime/work/midnew270/oms/oraInst.loc
    OPatch version    : 11.1.0.11.0
    OUI version       : 11.1.0.12.0
    Log file location : /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/opatch2014-05-05_05-28-53AM_1.log
     
     
    OPatch detects the Middleware Home as "/scratch/aime/work/midnew270"
     
    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/aime/work/midnew270/oms'
     
    Patching component oracle.sysman.oms.core, 12.1.0.4.0...
     
    Verifying the update...
    Patch 1111118 successfully applied.
    Log file location: /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/opatch2014-05-05_05-28-53AM_1.log
     
    OPatch succeeded.
    Command to execute (Step 2): /scratch/aime/work/midnew270/oms/bin/emctl register oms metadata -service TargetPatchingImplRegistration -debug -file /scratch/aime/work/midnew270/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/aime/work/insthome270/em/EMGC_OMS1/sysman/log/emctl.log
    Metadata registration successful
    Command to execute (Step 3): /scratch/aime/work/midnew270/oms/OPatch/opatchauto commit -id 1111118 -oh /scratch/aime/work/midnew270/oms -invPtrLoc /scratch/aime/work/midnew270/oms/oraInst.loc
    OPatch Automation Tool
    Copyright (c) 2014, Oracle Corporation.  All rights reserved.
     
     
    OPatchauto version : 11.1.0.11.0
    OUI version        : 11.1.0.12.0
    Running from       : /scratch/aime/work/midnew270/oms
    Log file location  : /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/opatch2014-05-05_05-29-21AM_1.log
     
     
    OPatchauto will now mark the patch "1111118" as auto-executed.
    Log file location: /scratch/aime/work/midnew270/oms/cfgtoollogs/opatch/opatch2014-05-05_05-29-21AM_1.log
     
    OPatchauto succeeded.
     
    OPatchauto rollback is also supported for resume feature and it works in the same way how apply works.
    

Resume Capability in Multi-OMS Configuration

The 11.1.0.11.0 version of OPatchauto prompts for the SYSMAN password at the start of the script unlike in previous release of OPatchauto where the SYSMAN password must be entered only at the time deploy commands are executed. OPatchauto cannot execute patching steps on a multi-OMS configuration, It generates a bash script containing all the patching steps specific to each host for all the nodes. The name of the script contains hostname, username. OMS administrator can run a specific script for each host on all nodes to complete patching session.

  1. OPatchauto apply executes successfully as it generates only patching instructions without executing bash scripts.

    $ OPatch/opatchauto apply /scratch/opatchdev/targetPatchingImplRegistration/1111118
    OPatch Automation Tool
    Copyright (c) 2014, Oracle Corporation.  All rights reserved.
     
     
    OPatchauto version : 11.1.0.11.0
    OUI version        : 11.1.0.12.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
     
    OPatchauto log file: /scratch/aime1/work/midnew9693/oms/cfgtoollogs/opatchauto/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: OPatchauto 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/.opatchauto_patch_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/.opatchauto_patch_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 OPatchauto execution:
    1)  OPatchauto cannot run patching steps in multi-OMS environment.
     
    --------------------------------------------------------------------------------
    OPatchauto Session completed with warnings.
    Log file location: /scratch/aime1/work/midnew9693/oms/cfgtoollogs/opatchauto/1111118/opatch_oms_2014-05-05_22-43-14PM_deploy.log
     
    OPatchauto completed with warnings.
    
  2. 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.

    [aime1@linux01amd oms]$ /scratch/aime1/work/midnew9693/oms/.opatchauto_patch_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/.opatchauto_patch_storage/oms_session/oms_session_log_2014-05-05_22-43-08PM...
    Creating  session file /scratch/aime1/work/midnew9693/oms/.opatchauto_patch_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/OPatch/opatchauto checkApplicable -ph /scratch/opatchdev/targetPatchingImplRegistration/1111118 -oh /scratch/aime1/work/midnew9693/oms -invPtrLoc /scratch/aime1/work/midnew9693/oms/oraInst.loc
    OPatch Automation Tool
    Copyright (c) 2014, Oracle Corporation.  All rights reserved.
     
     
    OPatchauto version : 11.1.0.11.0
    OUI version        : 11.1.0.12.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
     
    OPatchauto log file: /scratch/aime1/work/midnew9693/oms/cfgtoollogs/opatchauto/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/opatchauto/1111118/opatch_oms_2014-05-05_22-45-53PM_analyze.log
     
    OPatchauto 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 11.1.0.11.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    : 11.1.0.11.0
    OUI version       : 11.1.0.12.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, 12.1.0.4.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/.opatchauto_patch_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.
    
  3. 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.

    [aime1@linux01amd oms]$ /scratch/aime1/work/midnew9693/oms/.opatchauto_patch_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/OPatch/opatchauto 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/OPatch/opatchauto commit -id 1111118 -oh /scratch/aime1/work/midnew9693/oms -invPtrLoc /scratch/aime1/work/midnew9693/oms/oraInst.loc
    OPatch Automation Tool
    Copyright (c) 2014, Oracle Corporation.  All rights reserved.
     
     
    OPatchauto version : 11.1.0.11.0
    OUI version        : 11.1.0.12.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
     
     
    OPatchauto 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
     
    OPatchauto succeeded.
     
     
    All operations for this script are appended to log file: /scratch/aime1/work/midnew9693/oms/.opatchauto_patch_storage/oms_session/oms_session_log_2014-05-05_22-43-08PM