How to remove Agent/targets from Grid Control neatly

6 08 2008

I was given the task to remove the target host/agents and other listed targets of Server1 from Oracle grid control. At first I thought it was very easy and I was definitely correct. Here’s what happened:

From OEM Grid Control I clicked on targets and selected the Server1 from the list. Then from its homepage I clicked on the the targets and then I eventually select all the targets except of course from the agent. Note: (the management agent of server1 must be running to do this). The targets were successfully deleted and now the only thing left is the host and the agent of Server1.

To remove the agent and host form the list, I stop the management agent of server1 then I went back to my OEM Grid control to remove the host Server1. Now there comes the challenge, No matter how many times I tried to delete the host Server1 from oem grid control It seems like the page is just running and nothing happens. No matter how long I’ve waited the host Server1 still remains on the list.

Now to clean it manually, I connect to the OEM Grid Repository and perform the following:

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

This command show me the list of all the registered targets from my OEM and I can see that Server1 is still there. Then to manually remove Server1 from the list, I then execute:

SQL> exec mgmt_admin.cleanup_agent(‘Server1:3872’);

It will take a while at least 3 to 5 mins the most. Once it was completed  I quickly checked my OEM Grid Control Target List and voila!!! Server1 was successfully removed from the target list together with its agent.

Thanks to Metalink Note:454081.1 and to Luis Cardenas post (  who gave me the idea to solve my problem.



2 responses

13 02 2009
Anuj Pandey

It’s really helpfull to me to remove the target from OEM, i was very upset because i updated the all the parameter from target.xml and stop the agent and deleted from OEM GC also, but nothing was work out.

Finaly after lot of surfeing i got it, and work done.

I am very glad to see such things here.


13 02 2009

I’m glad you found it helpful. Have a wonderful day!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: