Thursday, January 14, 2010

Adding an Oracle home to an agent inventory

When an Oracle inventory is saved in a non-standard location, the Oracle Grid Control agent can be unable to enumerate the software that is in that Oracle Home. This is true even when it can find the home itself.
In OEM, you’ll run into an error like that below when you click on the home in the Targets list:

Error Could not find Oracle Home <ORACLE_HOME> in the inventory collected for <hostname>

We’ll use TESTSRV2 as a troubleshooting example.

Locate the oraInst.loc file

The oraInst.loc file contains the inventory for all of the Oracle software. Normally, Oracle maintains a single copy of this file, but when one is saved in a non-standard directory, it can get left out.

The first thing we’ll do is find out where all of the oraInst.loc files are located.
[root@testsrv2 ~]# locate oraInst.loc
/OLD_TREES/a18_1/oracle/install/920/scripts/silent/oraInst.loc /OLD_TREES/a18_1/oracle/install/817/scripts/silent/oraInst.loc
We can see that there are a lot of oraInst.loc files on this server. The file in the OracleHome/agent10g directory is the agent inventory. Some looking shows that the oraInst.loc file in the /app/oracle/product/102 directory is the most recent of all of the others, so we’ll use that one.

Add the additional inventory file to the agent search

There is a file that the agent uses to add inventories to its search list. This is the OUInventories.add file in the <AGENT_HOME>/sysman/config/ directory. So we edit it:
[root@testsrv2 ~]# vim /app/oracle/OracleHomes/agent10g/sysman/config/OUIinventories.add
[root@testsrv2 ~]#
And add the appropriate line:
Save that file and exit the editor.

Restart the agent

This change requires a restart of the agent:
/app/oracle/OracleHomes/agent10g/bin/emctl stop agent /app/oracle/OracleHomes/agent10g/bin/emctl start agent

Refresh the Host Configuration

Having restarted the agent, we now have to tell Grid Control to refresh its list of the software on that host:
Navigate to Depoloyments -> Refresh Host Configurationclip_image006
Add the host to the “selected hosts” pane and click on the “refresh hosts” button. This will populate the appropriate agent data, and you’re done.


  1. Thanks, This article resolved my issue.....

  2. This comment has been removed by a blog administrator.

  3. This comment has been removed by a blog administrator.

  4. First of all i am saying that i like your post very much.I am really impressed by the way in which you presented the content and also the structure of the post. Hope you can gave us more posts like this and i really appreciate your hardwork. Best Music Making Software

  5. This comment has been removed by the author.

  6. Below are the 15 best Minecraft mods everyone should try. Optifine. No matter if it's your first time playing Minecraft or you've been playing it for a long time now. Get New Minecraft Maps


Thanks for leaving a comment!