Migrating 11g Agents to new OMS RepositoryAfter replacing our old OMS to brand new and better gear, we needed to re-point our existing agents to new OMS.
One way was to to un-install and then re-install the agents, obviously the crude way, we choose the other, more refined way, which was easy and less time-consuming.
We re-secured the agent as follows with new OMS..
# export AGENT_HOME=/u01/app/oracle/product/11.1.0/agent11g
# cd $AGENT_HOME/bin
# ./emctl secure agent -emdWalletSrcUrl https://oem.localdomain:7799/em
And that's the end of it.
However, it didn't went smoothly for some of the servers (regardless of what Oracle says) and we have to dig a bit deeper. After some analysis we figured out the re-configuring the agent failed as our emd.properties was not getting updated, hence we are left to do it manually.
Following are the manual steps to fix it.
-- Take the backup of your existing emd.properties file
#cp $AGENT_HOME/sysman/config/emd.properties $AGENT_HOME/sysman/config/emd.properties.bkp
-- open the file for editing and Replace old OMS Host and port values as needed.
-- Go to REPOSITORY_URL line and do change from your old OMS to new OMS
-- Replace EMD_URL if the port is changed; otherwise leave it as it is.
-- In my case the port stays the same
#Replace following two parameters as needed.
-- Save and exit the file.
-- Next you have to clear the state of the agent and re-secure it again with new OMS
#$AGENT_HOME/bin/emctl clearstate agent
#$AGENT_HOME/bin/emctl secure agent
#$AGENT_HOME/bin/emctl start agent
#$AGENT_HOME/bin/emctl upload agent
That is it. check the status of the agent that will confirm you are now successfully on new OMS!