Screwball Host Names

Note: Hostnames in images have been blurred out on purpose.

There is always one thing you can count on when working with Oracle products; you will always learn something new.  Today, while I was working with OEM12c, I manually added a host with no issues.  I provided the host name, port number, directory for the agent install and passwords required.  When the agent install was complete, I checked out the target just to make sure everything was fine.  What I found out was that the host name target did not include the domain name.

This got me to thinking, why did it do this?  In previous versions, it was difficult to change the name of a host target. In OEM 12c, it appears not that easy as well.  So, how did I solve this problem?


After digging around for a bit, I figured out that the host name when adding manually; the domain name ( needs to be provided with the hostname.  Before this can be fixed, the existing target needs to be removed.  I make my life easy, I’m opting for removing the target via removing the agent.

Enter EMCLI!

The easiest way to remove the target is to do the following:

  1. Stop the agent on the host that we want to change.

cd $AGENT_HOME/core/ stop agent

2. Go to the OMS home and login to the OMS with emcli

$ cd $OMS_HOME/bin/emcli login –username=sysman –password=<password>

$ emcli sync

4. Remove the agent from the repository with monitored targets.

       $ emcli delete_target –name=”<agent/host>:3872” –type=”oracle_emd” –delete_monitored_targets

Removing the agent this way, will force all the monitored targets to be removed as well.  Once the agent and associated targets are removed emcli will indicate successful.

      Target “<agent/host>:3872:oracle_emd” deleted successfully

Back on the target server, remove the directory for the agent and clean up the inventory.xml file if you want to use the same directory structure for the new agent.

$ rm –rf ./12.1

Now, let’s re-add the agent and associated host target.

Just go through the normal manual process for adding a target host.  When providing the hostname, you’ll need to add the domain name as part of the host.


Once the agent has been redeployed to the host target; it will come up in OEM listed with the domain name.


I know that sometimes it is not idea to add an agent, remove the agent and then add it again.  If you are like me, I like to have clean environment to look at and understand.  Let me know what your thoughts are on this issue.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Pardy DBA

ORA-00001: unique constraint (ORA.BLOG_TAGLINE_PK) violated

Martin Widlake's Yet Another Oracle Blog

Oracle performance, Oracle statistics and VLDBs


Heli's thoughts on Database Designing, Oracle SQL Developer Data Modeler, User Groups etc.

Julian Dontcheff's Database Blog

The good DBA is one who learns from his mistakes, the best DBA is one who learns from other DBA's mistakes

Martins Blog

Trying to explain complex things in simple terms

The Data Warrior

Changing the world, one data model at a time. How can I help you?

Maaz Anjum's Blog

A life yet to be lived...

Stuff that interests me, if not you!

Uwe Hesse

about Database Technology

%d bloggers like this: