The situation: Every time your reboot an AWS server (EC2 instance - you may to do this to reattach an EBS volume that is in an LVM), - the Enterprise Manager in Oracle gets confused with the temporary host name (since the elastic IP is detached on restart). So when you assign the elastic IP back to the instance Enterprise Manager is referring to the temp hostname it got when the server rebooted.What is the recommended path to handling a server restart on elastic IPs without breaking OEM?
I found these two items on web which may be useful:
Both mention using this process at instance boot time:
1. export ORACLE_HOSTNAME=`wget -q -O - http://169.254.169.254/latest/meta-data/public-hostname`
2. export EMKEY_LOCATION=/u02/admin/$ORACLE_SID/
3. dbs emca -config dbcontrol db