Apr 27, 2011

Oracle: Removing targets from Grid Control

I was installing Oracle 11g Grid Control when I tested something and messed up the target list. An agent was listed as a target but unfortunately, I wasn't able to delete it from the console. Thus, I have manually delete it from the repository.


Before deleting it, I have to stop the management agent on the target database


% <AGENT_HOME>/bin/emctl stop agent


Then, I logged into the repository as sysdba to run the following query:


SQL> select target_name from mgmt_targets where target_type = 'oracle_emd';


This showed me all the registered agents (oracle_emd). Other target_types are hosts, oracle_database, etc. Run a distinct on target_type to see the full list.


After I've identified what agent should be deleted, I ran the following procedure:


SQL> exec mgmt_admin.cleanup_agent('dsdevdb02-tol-oracle:1830');


Went back to grid control, refreshed that targets page and it was indeed deleted.

No comments:

Post a Comment