As the situation could rise where you want to re-install your enterprise grid control server on a new server.
You want to have an easy way to migratie the agent reporting to it aswell.
After some searching on metalink i could preform the following steps to make this work.
$ORACLE_HOME/bin/emctl stop agent
[agent] xxx:bin> ./emctl stop agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
Stopping agent … stopped.
Edit the Agent’s $ORACLE_HOME/sysman/config/emd.properties file
Change the REPOSITORY_URL
REPOSITORY_URL=https://zzz:1159/em/upload
To
REPOSITORY_URL=http://yyy:1159/em/upload
( !!Change HTTPS://….. to HTTP (non-secure)!!)
Change emdWalletSrcUrl
emdWalletSrcUrl=https://zzz:4889/em/wallets/emd
To
emdWalletSrcUrl=http://yyy:4889/em/wallets/emd
(!!Change HTTPS to HTTP (non-secure)!!)
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
$ORACLE_HOME/bin/emctl clearstate agent
[agent] xxx:bin> ./emctl clearstate agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
EMD clearstate completed successfully
$ORACLE_HOME/bin/emctl secure agent
[agent] xxx:bin> ./emctl secure agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
Enter Agent Registration password :
Agent is already stopped… Done.
Securing agent… Started.
Requesting an HTTPS Upload URL from the OMS… Done.
Requesting an Oracle Wallet and Agent Key from the OMS… Done.
Check if HTTPS Upload URL is accessible from the agent… Done.
Configuring Agent for HTTPS in CENTRAL_AGENT mode… Done.
EMD_URL set in /u00/oracle/product/10.2.0/agent/sysman/config/emd.properties
Securing agent… Successful.
$ORACLE_HOME/bin/emctl start agent
[agent] xxx:bin> ./emctl start agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
Starting agent ……………. started.
$ORACLE_HOME/bin/emctl upload agent
[agent] xxx:bin> ./emctl upload agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
—————————————————————
EMD upload completed successfully
After these steps it will take a little while for the new OMS to process this information and show the newly added host and targets.
