ORACLE EM DBA

Problems, Solutions, Test Cases from my professional and personal experience in technologies like Oracle Enterprise Manager 13 c,Oracle Enterprise Manager 12c, Oracle Configuration Manager and some other stuff.

Category: 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“.

Host=HANTESTAP5.dksharma.com 
Target type=Host
Target name=
HANTESTAP5.dksharma.com 
Categories=Availability
Message=
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. 
Severity=Fatal
Event reported time=Sep 4, 2017 1:02:25 AM CDT
Target Lifecycle Status=Production
Line of Business=BI
Department=DBA
Operating System=Linux
Platform=x86_64
Associated Incident Id=
99071
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.
Rule Owner=DKSHARMA
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

Host=hanpap1.dksharma.com 
Target type=Host
Target name=
hanpap1.dksharma.com 
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 
Severity=Warning
Incident ID=90359
Event count=1
Incident Status=New
Escalated=No
Priority=None
Incident owner=DKSHARMA
Incident Acknowledged By Owner=Yes
Categories=Availability
Rule Name=RuleSet for all Production Targets, Acknowledgement Rule
Rule Owner=DKSHARMA
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"
from 
EM_AGENT_BUDDY_MAP eabm, 
mgmt_targets target_agent, 
mgmt_targets partner_agent 
where 
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= hanproddb1.dksharma.com:3872 -partner_agent=hanprodap1.dksharma.com:3872
 $ Manage Agent Partnership operation completed successfully

 

Step 4: Add a new partner agent

$ ./emcli manage_agent_partnership -add_agent_partnership -monitored_agent= hanproddb1.dksharma.com:3872 -partner_agent=hanprodap1.dksharma.com:3872
$ Manage Agent Partnership operation completed successfully

For more information on “emcli” verbs check: http://docs.oracle.com/cd/E24628_01/em.121/e17786/cli_verb_ref.htm#EMCLI200

 

Thanks

ADDKS

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:

● EM_PATCH_DESIGNER

● EM_PATCH_OPERATOR

● EM_PATCH_ADMINISTRATOR

 

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 ”

clip_image002[5]

Click on Create and put the required Details.

 

clip_image004[5]

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

 

clip_image006[5]

 

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.

 

clip_image008[9]

 

clip_image010[6]

 

clip_image012[4]

 

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)

 

clip_image014[4]

 

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

 

clip_image016[4]

 

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)

clip_image018[4]

 

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.

 

clip_image020[4]

 

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.

 

clip_image022[4]

 

Particular Patch Details

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

 

clip_image024[4]

 

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.

 

clip_image026

 

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

 

clip_image028

 

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

 

clip_image030[4]

 

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.

 

clip_image032[4]

 

Patches

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

clip_image034[4]

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

clip_image036[4]

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}

Customization

Notification {Email notifications phase}

Rollback {Rollback option in-case of failure}

Conflict Check {If any existing patch is conflicting}

clip_image038[4]

 

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 12.1.0.4.0 as there is BUG reported in OEM12cR4.

 

clip_image040

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

 

clip_image042

 

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

clip_image044

 

Validation

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

clip_image046

clip_image048

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

clip_image050

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.

clip_image052

 

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.

 

Regards

ADDKS

EM12c login FAILED for all users after database upgrade from 11.2.0.2 to 12.1.0.2

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 11.2.0.2 to 12.1.0.1 followed by upgrade to 12.1.0.2.

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.

em12c-login-failed

Regards

ADDKS

 

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

image1

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

image10

 

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

image11

 

  • Click on “Next” button.

image12

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

image13

image14

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

image15

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

image9

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

 

Thanks

ADDKS

 

© 2017 ORACLE EM DBA

Theme by Anders NorenUp ↑