Tuesday, 9 December 2014

Forced remove of targets from OEM repository


[oracle@Sunil -01 bin]$ ./emctl upload agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload error: Failed to upload file A0000001.xml: Fatal Error.
Response received: 500|ORA-20618: The specified agent is in the process of being                      deleted from the repository, wait for deletion to complete before restarting the agent.(agent name = Sunil.speechmachines.biz:3872)(agent guid = E16A                     7D58F0F8FF622D8F7DCDB885C540)

Initially I tried to clean up as like below But it didn't worked 

exec mgmt_admin.cleanup_agent('mq1-racs-dep-01.speechmachines.biz:3872');

You may receive below error while running “mgmt_admin.cleanup_agent”

ERROR at line 1:
ORA-20206: Target does not exist: Target1:3673'
ORA-06512: at "SYSMAN.MGMT_ADMIN", line 846

ORA-06512: at line 1

After I tried below statement

execute sysman.mgmt_admin.delete_target_internal ('Sunil:3872','oracle_emd');


For Dynamic Sql for above one is :- 


select 'execute sysman.mgmt_admin.delete_target_internal ('''||target_name||''','''||target_type||'''); ' fro

m sysman.mgmt_targets_delete;

No comments:

Post a Comment