Removing alerts from Enterprise manager Grid Control
Posted by John Hallas on February 18, 2009
We have an Enterprise manager Grid control morning check report that indicates issues across all our environments.
The list of checks include :
Usable flash recovery area less than 20%
Filesystems over 90% used
Databases not backed up within 1 day and not blacked out and not a physical standby
Dataguard status (targets not blacked out)
Alert log errors
Various specific job checks
The alert log query we use is a view based on this query
However that still requires us to logon to each database and click on the alert_log link under diagnostic options on the home purge. We then need to purge the alerts.
Looking for a better way to do this I traced an EM session on the OMS repository database whilst purging these alerts. This provided me with the following statement which can be used to delete all outstanding alerts for every system.
This is set up as a script on the OMS database server. There is no commit within the script. This is intentional so that the count of deleted records should match the number of alerts outstanding on the morning check report. It is also intentional that we have not created this as a EM job. The reason is that it will then perform an auto-commit which does not allow any regression if the record count is different from the number of alerts.
I hope the idea of a morning check report proves useful and the sql statements listed can be utilised.