How To Deinstall OEM12c agent and Remove Its Targets from OMS repository?

Recently we have added target with wrong name hence it was required to deinstall OEM12c agent and associated targets from OMS repository.

Below steps would help you to perform this activity.


1. Deinstall agent from host/target

Export EM Agent HOme

$export EMAGENT_HOME=/u01/app/oracle/product/emagent/core/12.1.0.5.0

Deinstall Agent

$perl $EMAGENT_HOME/sysman/install/AgentDeinstall.pl -agentHome $EMAGENT_HOME

Note: 

Above step will only deinstall EM agent from host. It will not remove the targets from OMS repository. Make sure to delete the targets manually from the Cloud Control Console for a successful de-installation. To remove those targets you have to follow below steps. 

2. Once agent get deinstall, remove that target and associated monitored target from OMS repository

Login to emcli

$ cd $OMS_HOME/bin

$ ./emcli login -username=SYSMAN -password=

Delete target from OMS

$ ./emcli delete_target -name="db01.company.com:3872" -type="oracle_emd" -delete_monitored_targets

It should remove database host target and all associated targets from OMS repository.

1 comment: