Tuesday, June 5, 2012

Migrating 11g Agents to new OMS Repository

After 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.
#vi $AGENT_HOME/sysman/config/emd.properties
#
-- Go to REPOSITORY_URL line and do change from your old OMS to new OMS
#
#REPOSITORY_URL=https://oms10g.localdomain:1159/em/upload 
REPOSITORY_URL=http://oem.localdomain:7799/em/upload
#
-- Replace EMD_URL if the port is changed; otherwise leave it as it is.
-- In my case the port stays the same
#
EMD_URL=https://drracnode1.localdomain:3872/emd/main/
#
#Replace following two parameters as needed.
#
#emdWalletSrcUrl=https://oms10g.localdomain:1159/em/wallets/emd  
emdWalletSrcUrl=http://oem.localdomain:7799/em/wallets/emd


#emdWalletDest=/u01/app/oracle/11.2.0.1/product/agent/agent11g/sysman/config/server  
emdWalletDest=/u01/app/oracle/11.2.0.1/product/agent/agent11g/sysman/config/server


-- 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!

No comments:

Post a Comment