Tuesday, 25 April 2017

How to Delete a Target in EM12C/EM13c

1. The proper way of deleting the target is via EM COnsole or EMCLI command
    EM CONSOLE => Login via manage target priv account=> search the target => Click Target Name
    => target Type => target Setup => remove target

    alternatively usinh emcli
     emcli delete_target -name="<target_Name>" -type="target_type" -delete_monitored_targets
       for example
 emcli delete_target -name="test.as.in.com:3832" -type="oracle_emd" -delete_monitored_targets
   
  Please note to delete an agent, all the related targets should be deleted first.



2. for some reason if if the host or agent is unreachable or down during target removal
   the above step will not work , you may want to use the following command
    BEGIN mgmt_admin.cleanup_agent('test.as.in.com:3832'); END;

3. Sometime while deleting the target, the connection from OEM and agent got disconnected
   we may get into the following error message

ORA-20238: Target LSNR_TEST:oracle_listener is currently in the process of being deleted
do the following steps.. if the first step failed move on the second step
exec sysman.mgmt_admin.delete_target('TARGET_NAME','TARGET_TYPE');
exec sysman.mgmt_admin.delete_target_internal('TARGET_NAME','TARGET_TYPE');
for example:
exec sysman.mgmt_admin.delete_target('ORCLE12CHOME_1','oracle_home');
exec sysman.mgmt_admin.delete_target_internal('ORCLE12CHOME_1','oracle_home');

No comments:

Post a Comment

ZFS

Public Cloud tools comparison