remove_agent_gridcontrol

-- ################################################
-- # Creator: Grégory RECHIGNAC (DBA Oracle)
-- # Created: 2012/03/01
-- # Name: remove_agent_gridcontrol.sql
--  ################################################
-- #
-- # Compatible: Oracle Grid Control 10g 11g 12c
-- #
-- ################################################
-- #
-- # Remove agent and it s target from Grid Control 
-- #
-- ################################################

SELECT 'exec mgmt_admin.cleanup_agent(''' || target_name || ''');'
  FROM mgmt_targets
 WHERE target_type = 'oracle_emd' AND UPPER (target_name) LIKE 'NOM_AGENT';

-- FYI: oracle_emd = agent

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.