Posted by: Pavel Ermakov | December 30, 2011

How to cleanup agent from GC 11g or EM 12c

Recently, I had have to clean up agents from EM 12c and Em 11g, after deinstall procedure where agents resides, toy have to cleanup agents from Agents page in EM. How you can do this? It’s simple:

1. Connect to OMS database at SYSMAN user.
2. Locate name for agent and port:

select target_name from mgmt_targets where target_type='oracle_emd';

3. Simple remove agent:

exec mgmt_admin.cleanup_agent('servername:3872');

In some cases I saw this:

ERROR at line 1:
ORA-20206: Target does not exist:
ORA-06512: at "SYSMAN.MGMT_ADMIN", line 630
ORA-06512: at "SYSMAN.MGMT_ADMIN", line 417
ORA-06512: at "SYSMAN.MGMT_ADMIN", line 1188
ORA-06512: at line 1

But re-run mgmt_admin.cleanup_agent help me, miracle 🙂




  1. Thanks It worked and helped to resolve my issue. I really appreciate your input.


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: