Follow Us on Twitter

EM Cloud Control – Applying system patches

by Tony van Esch on May 2, 2014 · 0 comments

Patching system software is a  common undertaking, that should be smooth and easy. Software projects delivering  artifacts, (should) have some kind of deployment pipeline to get to production. The same holds true for 3rd party/vendor software patches. Also with today’s ever expanding interconnected systems, and thus possible exposure to bugs/undocumented features, it’s crucial to have an active patching/lifecycle strategy.

Let’s look at how EM Cloud Control facilitates patching itself.

First make sure EM is connected to Oracle support.


Add proxy, if needed.


Add MOS credentials. Do not use your personal EM & MOS account for the catalog refresh job. I’ve created a separate account on MOS just for downloading metadata and patches.


Force an update.



On the EM home page, there’s a patch widget, which will bring us to the available patches for our monitored targets.


Select only agent target type to view all targets, needing patching.


Create  new patchplan from the selected patch/agent.


Next open the new plan just follow all the steps in the wizard. In the analyze step Cloud Control will validate all necessary prerequisites to be able to succesfully patch the target.

Last step is to execute the patchplan. A job will be created.

Next step would be to deploy the patches to whole group of agents. This is simple to achieve with a patch template.

First create a patch template from the patch plan, executed earlier.


From this patch template, we can create a new patchplan with all the targets we want to patch at one. The rest of the steps are the same as described earlier.

Now all agents should have their latest core patches applied.

But I actually missed the plug-in patches in the ‘patches & updates’ overview. They are not visible for some reason. But these so-called ‘system’ patches (or opatch) were needed to fix some annoying bugs in our Coud Control environment.

This requires some additional work and we will patch the following components:

  • OPatch of the Oracle Management Server (OMS)
  • Apply latest PSU to the OMS
  • Apply latest patches to plug-ins OMS-side
  • Apply latest patches to plug-ins agent-side
  • Upgrade  JVMD/ADP engines with latest patches
  • UPgrade JVMD/ADP agents with latest patches

Patch OPatch

unzip –d $ORACLE_HOME

Apply latest PSU to the OMS

rm –rf /tmp/orapatch/*
unzip -d /tmp/orapatch/
cd /tmp/orapatch/*
emctl stop oms
opatchauto apply -analyze -property_file $ORACLE_HOME/OPatch/
opatchauto apply -property_file $ORACLE_HOME/OPatch/

Make sure you sync all emcli clients after patching the OMS.

emcli login -username='t3'
emcli sync

Next we will patch the plug-ins on the OMS-side. This involves the same steps, but each plug-in has its own patch.

# repeat the following steps for all OMS side plugin patches
rm -rf /tmp/orapatch/*
unzip -d /tmp/orapatch/
emctl stop oms
cd /tmp/orapatch/*
opatchauto apply -analyze -property_file $ORACLE_HOME/OPatch/
opatchauto apply -property_file $ORACLE_HOME/OPatch/

After all patches are done, we can start the OMS again.

emctl start oms

Next step is to patch all agent plug-ins. We need to manually patch a plug-in and then create a ‘custom plugin update’ from that image. The custom plugin update can be used to ‘redeploy’ the patched plugin on all your other agents.

Each agent can have a different set of plug-ins, depending on the type of components running on the managed node. Plug-ins are patched separately. Patches are applied to the separate plug-in installations. Be aware that plug-ins are sometimes split into a monitoring and a discovery installation (PLUGIN_HOME). The custom plugin update will encompass both monitoring and discovery patches.

export ORACLE_BASE=/apps/oracle
export AGENT_BASE=$ORACLE_BASE/agent12c
mkdir /tmp/orapatch/$(whoami)/

Blackout and stop the ‘test’ agent

$ORACLE_HOME/bin/emctl start blackout Patch_agent_$(hostname) –nodeLevel
$ORACLE_HOME/bin/emctl status blackout
$ORACLE_HOME/bin/emctl stop agent

Patch the Oracle database discovery plugin (version

export PLUGIN_HOME=$AGENT_BASE/plugins/oracle.sysman.db.discovery.plugin_12.
rm -rf /tmp/orapatch/$(whoami)/*
unzip -d /tmp/orapatch/$(whoami)/
cd /tmp/orapatch/$(whoami)/*
opatch apply -analyze -oh $PLUGIN_HOME
opatch apply -oh $PLUGIN_HOME

You can repeat the steps for all other plug-ins. Just change the PLUGIN_HOME and unzip the accompanying patch file.

After finishing patching, start the agent and end the blackout.

$ORACLE_HOME/bin/emctl start agent
$ORACLE_HOME/bin/emctl stop blackout Patch_agent_$(hostname)

So now we patched one agent. Next step is to deploy these patched plugins to other agents. This can be done entirely through ’emcli’.

Enter password  ********
Login successful
  emcli create_custom_plugin_update
create_custom_plugin_update(agent_name="" ,plugin_id="oracle.sysman.db" ,overwrite=True)
create_custom_plugin_update(agent_name="" ,plugin_id="oracle.sysman.oh")
create_custom_plugin_update(agent_name="" ,plugin_id="oracle.sysman.emas" ,overwrite=True)

I now have create custom plugin updates for the Oracle database, Fusion middleware and the ‘Oracle Home’ plug-in.

All information can be queried through ’emcli’.

Plug-in Name                            Plug-in ID               Version [revision]       Created on                    Source
Oracle Fusion Middleware                oracle.sysman.emas               Apr 30, 2014 11:13:18 AM CEST Agent
Oracle Database                         oracle.sysman.db               Apr 29, 2014 4:19:42 PM CEST  Agent
Oracle Home                             oracle.sysman.oh               Apr 29, 2014 4:21:34 PM CEST  Agent

Querying the specific patch contents (for discovery patch add ,discovery=True  to the command)

Oracle Interim Patch Installer version
Copyright (c) 2013, Oracle Corporation.  All rights reserved.
Oracle Home       : /apps/oracle/product/agent12c/plugins/oracle.sysman.db.agent.plugin_12.
Central Inventory : /apps/oracle/11.0.2/oraInventory
   from           : /apps/oracle/product/agent12c/core/
OPatch version    :
OUI version       :
Log file location : /apps/oracle/product/agent12c/plugins/oracle.sysman.db.agent.plugin_12.
Lsinventory Output file location : /apps/oracle/product/agent12c/plugins/oracle.sysman.db.agent.plugin_12.
Installed Top-level Products (1):
Enterprise Manager plug-in for Oracle Database             
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch  18356442     : applied on Tue Apr 29 15:55:58 CEST 2014
Unique Patch ID:  17475043
   Created on 12 Mar 2014, 04:30:30 hrs PST8PDT
   Bugs fixed:
     18136919, 17652710, 17971467, 18026077, 18336314, 18336315, 17594934
     18012965, 17902923, 18356442, 18104700, 16006270, 18307270
OPatch succeeded.

Now that we have created the necessary custom plugin updates, we can redeploy them to other agents.

  emcli redeploy_plugin_on_agent
        {-agent_names="agent1[;agent2...]" | -group_name="group1"}
redeploy_plugin_on_agent(agent_names=";", plugin="oracle.sysman.db:", redeploy_noprompt=True)

A job is started from the OMS that will patch all the provided targets.

After patching all agents, we can upgrade the APM components (JVMD,ADP). This can be done through the UI.

Make sure you blackout and shutdown the engines, then go to Middleware Management > APM.


You will see a blue sign indicating that there is an upgrade available.


Next apply the correct credentials and a job is submitted to upgrade the engines. When the job has succeeded the engines will be live again.

Patching the APM agent follows a similar procedure. From the APM homepage click the ‘Manage Diagnostics agents’ button.


Select the agents you want to upgrade.


Make sure you apply the correct credentials to each agent and submit the upgrade.

The patch management of Enterprise Manager Cloud Control is quite robust. There are still some parts that need some work (automatic system patching of plug-ins), but all in all it works really well.


EM Cloud Control - Applying system patches, 4.5 out of 5 based on 2 ratings
VN:F [1.9.22_1171]
Rating: 4.5/5 (2 votes cast)

{ 0 comments… add one now }

Leave a Comment


Previous post:

Next post:

About Whitehorses
Company profile

Whitehorses website

Home page

Follow us
Blog post RSS
Comment RSS