1. Stop the agent: emctl stop agent
2. edit the emd.properties file REPOSITORY_URL parameter to reflect the new OMS information
3. Clean up the agent files
rm -r $ORACLE_HOME/sysman/emd/state/*
rm -r $ORACLE_HOME/sysman/emd/collection/*
rm -r $ORACLE_HOME/sysman/emd/upload/*
rm $ORACLE_HOME/sysman/emd/lastupld.xml
rm $ORACLE_HOME/sysman/emd/agntstmp.txt
rm $ORACLE_HOME/sysman/emd/blackouts.xml
rm $ORACLE_HOME/sysman/emd/protocol.ini
4. emctl clearstate
5. emctl start agent
6. emctl upload
7. emctl status agent
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
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:
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
Subscribe to:
Posts (Atom)