Monday, March 31, 2008

Rebuild targets.xml for Oracle Enterprise Manager Grid Control Agent

1. Agents installations before 10.2.0.3 have a bug in the 'agentca' command that prevents the targets.xml file from getting populated with the initial parameters (AGENT_TOKEN, ORACLE_EMD, and/or HOST) when the file does not already exist. To work around this we will need to manually create a targets.xml file if it does not exist.

Windows
create the new file in the Agent %ORACLE_HOME%\sysman\emd\ directory. (Where %ORACLE_HOME% is the agent’s home)
Unix$

$ cd $ORACLE_HOME/sysman/emd (where $ORACLE_HOME is the Agent's home)
$ touch targets.xml.

2. Once you have created the targets.xml file, view the Agent's $ORACLE_HOME/sysman/config/emd.properties file. Copy the values for:
agentSeed=12345EMD_URL=http://hostname.oracle.com:9876/emd/main

3. Manually update the new targets.xml and add the following entries to the file following the syntax exactly:






For example:





4. Force target re-discovery:
a. Verify that the environment variables are setup for the Management Agent:
$ORACLE_HOME set$ORACLE_HOME/bin in $PATH

b. The agentca utility is expecting the oraInst.loc to be located in the root of the Agent's $ORACLE_HOME

NOTE: Solaris puts the oraInst.loc in /var/opt/oracle. Agentca will not fine the oraInst.loc on a Solaris platform. For Solaris platforms you need to create a soft link:
$ORACLE_HOME/oraInst.loc to /var/opt/oracle/oraInst.loc
c. Run agentca -d to force a new discovery of the targets on the host

agentca -d

1 comment:

Anonymous said...

I realize this post is over 4 years old, but it still contains useful information. To that end, I cannot see the examples cited in Step 3. Can those be re-added?