DOYENSYS Knowledge Portal

We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal

Tuesday, September 22, 2015

Manually removing targets from 12c OEM

a)  To delete an Agent and all its targets, we can use the following command:

$<EMCLI_HOME>/emcli delete_target -name="hostname:3872" -type="oracle_emd" -delete_monitored_targets -async

Note: The above deletes the Agent and ALL its monitored targets from the repository.

"-delete_monitored_targets" : Delete the targets monitored by the specified Management Agent. Applicable only with the oracle_emd target type.

Sometimes individual targets wont get deleted. For that use the below command to delete it.

b) To delete a specific target:

$<EMCLI_HOME>/emcli delete_target -name="<target_name>" -type="<target_type>"

To find the target related information run the below command in OMS database:

select distinct target_name,target_type  from SYSMAN.MGMT$TARGET where target_name like '%HOSTNAME%';

To completely remove a target from OMS database:

exec sysman.mgmt_admin.cleanup_agent('Hostname:3873');

No comments: