Forced remove of targets from OEM repository
Posted by John Hallas on April 8, 2009
I blogged about how to remove targets from OEM <a href=”http://jhdba.wordpress.com/2009/01/07/removing-a-grid-target-from-the-oms/”> removing a Grid target </a> and I used my own blog entry yesterday to try and force the removal of several entries. These appeared to work but when I tried adding new targets (we were migrating databases fom one server to another) I got the error message
java.sql.SQLException: ORA-20600: The specified target is in the process of being deleted.(target name = SID)(target type = oracle_database)(target guid = 21D8EFD67CCF409D7CDB41DCFD1F9D94) ORA-06512: at “SYSMAN.TARGETS_INSERT_TRIGGER”, line 36 ORA-04088: error during execution of trigger ‘SYSMAN.TARGETS_INSERT_TRIGGER’ ORA-06512: at “SYSMAN.EM_TARGET”, line 1918 ORA-06512: at “SYSMAN.MGMT_TARGET”, line 2705 ORA-06512: at line 1A colleague, Allan Ho, looked at the problem and resolved it by looking in sysman.mgmt_targets_delete
select * from mgmt_targets_delete;To delete the entry use :
begin mgmt_admin.delete_target('SID','oracle_database'); end;You can also force deletion by using :
begin mgmt_admin.delete_target_internal('SID','oracle_database'); end;The dynamic sql would be
select 'execute sysman.mgmt_admin.delete_target_internal ('''||target_name||''','''||target_type||'''); ' from sysman.mgmt_targets_delete;
Siti said
Hi,
i’m having problem to force delete the target in grid control. So I was using your script – mgmt_admin.delete_target_internal(‘SID’,'oracle_database’); to force delete the target. upon running the above – i got the ORA-25128: No insert/update/delete on table with constraint disabled and validated. Do you have any work around that you can suggest?
Thank you.
John Hallas said
Without testing it out Siti it seems to me that the error message is self-explanatory. Why is the constraint disabled? What happens when you enable it?
Mohammad said
DO NOT use mgmt_admin.delete_target_internal unless instructed to do so (Based on bug update, etc…) This routine bypassed a number of checks which CAN create trouble.