Sunday 15 April 2012

Recreate Targets.xml File for Grid Control agent version : 10.2

Some when you targets.xml is corrupted or accidently dropped , you need to create it manually. Steps are as below:

1. Create a blank targets.xml file :
cd $ORACLE_HOME/sysman/emd
touch targets.xml

2. After created targets.xml file you need to copy values from $ORACLE_HOME/sysman/config/emd.properties files as below format:

<Targets AGENT_SEED="agentseed from emd.properties">
               <Target TYPE="oracle_emd" NAME="hostname and port from emd.properties EMD_URL"/>
               <Target TYPE="host" NAME="hostname as it appears in the emd_url"/>
</Targets

Example :

<Targets AGENT_SEED="256896864">
<Target TYPE="oracle_emd" NAME="hostname:3872"/>
<Target TYPE="host" NAME="hostname"/>
</Targets>

First time you start the agent with above file it will itself convert AGENT_SEED parameter to AGENT_TOKEN and value comes in encrypted form

3. To force target re-discovery using below methods:

Run agentca -d as

cd <AGENT_HOME>/bin
agentca -d