Category Archives: EM12c

Manage Partner Agent in Oracle Enterprise Manager using “emcli”

Recently I fixed Partner Agent issue for one of my production Target Agent, which had a partner agent assigned  but was on development server. This ideally should not be the case as partner agent plays a very important role in monitoring. When primary agent is unavailable, it is very important to pick correct Partner agent to make sure monitoring is not affected.

Partner Agent is an agent which in addition to performing its regular functions, also remotely monitors the status of its assigned Management Agent and its host. OMS automatically assigns Partner Agent using built-in algorithm.

Partner Agent can be changed anytime, by using emcli verbmanage_agent_partnership“.

Few common alerts from Partner Agent.

 “Partner Agent could not connect to Host. Host might be down“. 
Target type=Host
Target name= 
Partner Agent could not connect to Host. Host might be down. Refer to MOS Note (Doc ID 2101383.1) for additional information if you see the alert for more than few minutes. 
Event reported time=Sep 4, 2017 1:02:25 AM CDT
Target Lifecycle Status=Production
Line of Business=BI
Operating System=Linux
Associated Incident Id=
Associated Incident Status=New
Associated Incident Owner=
Associated Incident Acknowledged By Owner=No
Associated Incident Priority=None
Associated Incident Escalation Level=0
Event Type=Target Availability
Event name=Status
Availability status=Down
Root Cause Analysis Status=Neither Cause Nor Symptom
Causal analysis result=Neither a cause nor a symptom
Rule Name=RuleSet for all Production Targets,Incident creation Rule for target down.
Update Details:
Partner Agent could not connect to Host. Host might be down. Refer to MOS Note (Doc ID 2101383.1) for additional information if you see the alert for more than few minutes.

Warning: – Host Up (Monitored) – Detected by Partner Agent 
Target type=Host
Target name= 
Incident creation time=Apr 9, 2017 12:52:22 AM CDT
Last updated time=Apr 9, 2017 3:05:00 AM CDT
Message=Host Up (Unmonitored) – Detected by Partner Agent 
Incident ID=90359
Event count=1
Incident Status=New
Incident owner=DKSHARMA
Incident Acknowledged By Owner=Yes
Rule Name=RuleSet for all Production Targets, Acknowledgement Rule
Root Cause Analysis Status=Neither Cause Nor Symptom
This incident has an event that is neither a cause nor a symptom.
Update Details:
Acknowledged by DKSHARMA

You can check the associated partner agent by either using SQL statement or from the Console.

select target_agent.target_name "Target Agent", 
partner_agent.target_name "Partner Agent"
mgmt_targets target_agent, 
mgmt_targets partner_agent 
eabm.buddy_target_guid = partner_agent.target_guid and
eabm.agent_target_guid = target_agent.target_guid and
target_agent.target_name = 'mention_agent_name';


Steps to change Partner Agent for any of the Target Agent.

Step 1:  Log into Enterprise Manager Command Line Interface “emcli”.

Step 2:  Run emcli sync.

Step 3: Crosscheck and Remove the old partnership.

$ ./emcli manage_agent_partnership –remove_agent_partnership -monitored_agent=
 $ Manage Agent Partnership operation completed successfully


Step 4: Add a new partner agent

$ ./emcli manage_agent_partnership -add_agent_partnership -monitored_agent=
$ Manage Agent Partnership operation completed successfully

For more information on “emcli” verbs check:




Offline Database Patching in OEM12c


This is the step by step document of how you do database patching from OEM. Before we start I’ll just give small introduction about Patching in OEM.

There are two different methods by which we can do patching in OEM:

● Out-Of-Box Patching

● In-Place Patching

Out-Of-Box patching is the recommended method by Oracle, the advantage of using this method is that it reduces your downtime. On the contrary you need to have some extra (almost double to you ORACLE_HOME) space on your disk as this method CLONE your ORACLE_HOME so that in case of failure revert back is easily possible.

In-Place patching is also known as Offline patching, in this method downtime is more as compare to Out-Of-Box patching. So if you have planned maintenance window you can easily adopt this method.

In this blog we will be performing In-Place patching. So let’s see what are some prerequisites required before patching your database.


Required Roles and Permission:





Step 1: Create Normal and Privilege Credentials for Host

Before we start with the patching process make sure we have “Normal and Privilege” credentials set. Login to OEM console and create Normal and Privilege credentials if already not created.

Navigate to “Setup -> Security -> Named Credentials ”


Click on Create and put the required Details.



Make sure you TEST credentials before you SAVE them. So that the credentials are validated.




Step 2: Download Patches and Upload them to Software Library.

Download the patches to be applied from MOS and upload them to Software Library. Navigate to “Enterprise -> Provisioning and Patching -> Saved Patches” and follow the below mentioned steps.








Step 3: Check Recommended Patches and their details.

In order to check the recommended patches and details about them. Login to OEM using your credentials and Navigate to “Patching” Home Page as shown in the screenshot below. (Enterprise -> Provisioning and Patching -> Patches & Updates)




Patch Recommendations Details are shown on this homepage in the bottom left corner. (Classification View)




You can either see the details by selecting Classification View as shown in the above screenshot or by Target View as shown below. Else we also have “All Recommendations” link as well which will show all details together.

(Target View)



Click on “Database Instance” to check recommended patches. Patches are displayed in the form of table with details like Patch Name, Description, Release, Platform etc.

If you further want to check information for specific patch, select the particular patch row and further details like SPU’s include, Bugs resolved will be displayed below. You will also get the option to download the patch or add to Patch Plan.




If you click on “All Recommendation” link on the “Patches & Updates” Home page you will get something like this . All patches for different targets clubbed together in single table.




Particular Patch Details

Click on single row to check the details about that patch.




Step 4: Create a Patch Plan and add patches

After we have confirm the patches to be applied and their details. Next step is to add particular patch to a Patch Plan. Select a particular row and Click on “Add to Plan” followed by “ Add to New ” as shown in the below screenshot.




Create New Plan pop-up window will open, please enter a meaningful name and click on “Create Plan” button.




Now Click on “View Plan” to check the Plan details.




Step 5: Deploy Patch

Patch deployment is a 5-step process,

1. Plan Information

2. Patches

3. Deployment Options

4. Validations

5. Review & Deploy

Once you have created a Patch Plan, follow the above mentioned process and step by step and at last deploy the patch.


Plan Information

This step involved Plan description and the permissions, Enter the plan information details followed by granting permissions to existing users.





In this step you can add multiple patches to existing Patch Plan.


You can search the patches in three different ways, using Patch Number, using Advanced Method or by Recommended Patch Advisor.


Deployment Options

This is further multi-step process. Screenshot for each step is show below.

How to Patch {In Place or Out-Of-Box method}

What to Patch {Database Instance Targets details}

Where to Stage {Location of staging directory}

Credentials Information {Host Credentials with sudo permissions}


Notification {Email notifications phase}

Rollback {Rollback option in-case of failure}

Conflict Check {If any existing patch is conflicting}



Select the tested Named Credentials and Privilege Credentials for the host on which you are deploying the Patch. Do not forget to Validate them.

Make sure “Named Credentials and Privilege Credentials” are different if your OEM is as there is BUG reported in OEM12cR4.



Verify effected Database Instance Targets and Staging Directory by default it goes to “%emd_emstagedir%” directory.




Verify Customization, Notification, Rollback and Conflict Options before proceeding further.




Click on the “Analyze” button to start the Validation process, this process can take time depending on the Patches and Targets involved.



Check if any Issue remains even after Validation, Review them and then resolve them before proceeding further.


In-case there is some failures like I got the one shown below during the Review Process, make sure you fix them and then proceed with the “Deployment” process.



Review & Deploy

This is the last option, this page will display all information make sure you review the information thoroughly and if everything looks good click on “Deploy” button to start the deployment process.




EM12c login FAILED for all users after database upgrade from to

Two days back I ran into an issue where I was not able to login to my OEM12c test environment using any of the account. This happened after OEM database upgrade. Recently I did upgrade of my OEM database from to followed by upgrade to

After upgrade was done successfully I tried to login to OEM using my account “dksharma” it gave me error, then I tried using the “sysman” but login failed again. All other users also  reported the same issue.

I have document all  my findings and solution to that in the attached document. If you also face the same Issue you use to document to fix your problem.





Add Targets in OEM12c Using Guided Process

In this Blog I have explained step by step procedure to discover and add targets  on a HOST on which Agent is already installed.

Note: Oracle Agent installation is mandatory on the host for which you want to discover and push targets in OEM.

  • Navigate to the “Add Targets Manually” screen using the menu at the top-right of the screen (Setup > Add Target > Add Targets Manually).


  • Select the “Add Targets using Guided Process” option, select the target types to be discovered (eg. lets say in this blog I have taken “Oracle Database, Listener and Automatic Storage Manager”) and click the “Add Using guided Discovery…” button.



  • Under “Database Discovery: Search Criteria Agent” enter the host name on which target exists and agent in installed. Click the “Continue” button.



  • Click on “Next” button.


  • Click the “Configure” icon for any discovered targets and enter the required details.



  • Specifying Global Target Properties for Notifications and Administrations Groups and click “OK”.


  • When all the configuration steps are complete, click the “Submit” button, followed by the “Save” button, then finally the “OK” button.


You can now see the recently added “database Instance” target listed on the relevant target {Databases} screen (Targets > Databases).