Reconfigure grid control agent after database upgrade

If you’ve upgraded the database with out-of-place upgrade or started the the database from different oracle home then you’ll have to reconfigure the agent configuration in order for you to be able to monitor the newly upgraded database from Grid Control.

You have to edit targets.xml file which contains information about which targets are monitored/configured from the agent on the host.
Location : $AGENT_HOME/sysman/emd/config/targets.xml

Stop the agent:
$AGENT_HOME/emctl stop agent

Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
The Oracleagent11g1Agent service is stopping...
The Oracleagent11g1Agent service was stopped successfully.

Update the OracleHome path for all the targets on which the path is changed.
Edit the targets.xml file:

<Targets>
...
<Property NAME="ListenerOraDir" VALUE="C:appAdministratorproduct11.2.0dbhome_2networkadmin"/>
<Property NAME="LsnrName" VALUE="LISTENER"/>
<Property NAME="Machine" VALUE="db01"/>
<Property NAME="OracleHome" VALUE="C:appAdministratorproduct11.2.0dbhome_2"/>
<Property NAME="Port" VALUE="1521"/>
<Target TYPE="oracle_database" NAME="db01">
<Property NAME="OracleHome" VALUE="C:appAdministratorproduct11.2.0dbhome_2"/>
<Property NAME="UserName" VALUE="dbsnmp"/>
<Property NAME="MachineName" VALUE="db01"/>
...
</Targets>

Start the agent:

$AGENT_HOME/emctl start agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
The Oracleagent11g1Agent service is starting.......
The Oracleagent11g1Agent service was started successfully.

After few minutes check the status of the agent with emctl status agent to make sure the agent is working correctly.

Leave a Reply