Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to clear thousands of alerts in Grid Control?
Chuck wrote:
> I have a couple of hosts in GC that have thousands of open alerts and
> I'd like to clear them all in bulk. Is there a way to do that? The
> closest thing I've found in GC is to go to the critical alerts page and
> click on "select all", then "clear alert". The problem is it only
> selects the 25 alerts on the current page. I have thousands to clear and
> this could be a long and tedious process. Is there a better way to clear
> them all in one operation?
>
> The alerts I don't care about because the hosts in question are win2k
> and by default EM generates an alert every time something appears in the
> windows event log. I've disabled collection of the alerts, but just want
> to clean up all the garbage left behind now.
>
> TIA
In case anyone else needs to do this, I used this solution:
Log on to the repository DB as SYSMAN and run the following procedure. Modify the cursor to fit your needs.
DECLARE
CURSOR c1 IS
SELECT s.target_guid, s.metric_guid, s.key_value FROM mgmt_targets t JOIN mgmt_current_severity s ON s.target_guid = t.target_guid WHERE LOWER(t.target_name) LIKE '%myhost%' AND t.target_type = 'host';
em_severity.delete_current_severity(r.target_guid, r.metric_guid, r.key_value); DELETE from sysman.mgmt_severity WHERE target_guid = r.target_guid AND metric_guid = r.metric_guid AND key_value = r.key_value;