How to manually purge alerts from the Event Console

book

Article ID: 180375

calendar_today

Updated On:

Products

Management Platform (Formerly known as Notification Server)

Issue/Introduction

 

Resolution

Important:  This article only pertains to the Event Console version SP5 / 7.0.8641 and greater

The default purging maintenance for the Event Console runs nightly. It will incrementally purge alerts in a batch format which takes time. If an issue has occurred where the purging maintenance is no longer functioning properly, it may be necessary to manually purge the alerts in SQL directly. To manually purge the alerts, follow these steps:

  1. On the SQL server which hosts the CMDB, open Microsoft SQL Server Management Studio and connect to the correct instance
      
  2. From the Available Databases drop-down list, choose the name of the CMDB (e.i. "Symantec_CMDB")
      
  3. Choose New Query and enter the following SQL:

DECLARE @purge_remain__auto AS int;   DECLARE @removed_alerts__auto AS int;   EXECUTE _sp_ec_purge_alerts @[email protected]_remain__auto OUTPUT, @[email protected]_alerts__auto OUTPUT, @batch_size=5000, @max_alerts=50000

Note:  Adjust the @max_alerts=50000 variable to the desired amount of alerts you wish to retain. Choose @max_alerts=0 if you wish to purge all alerts. 
  1. Proceed with choosing the Execute button until the Messages pane displays:  Command(s) completed successfully.
      
  2. Choose New Query and enter the following SQL:
DECLARE @removed_alerts__auto AS int;   EXECUTE _sp_ec_purge_alerts_pooled @[email protected]_alerts__auto OUTPUT
  
  1. Choose the Execute button to complete this procedure
 
Note:  If you choose to purge all alerts from the Event Console, this may cause a mis-match of information with machines that have the Monitor Agent installed. It is recommended to run a Reset Monitored Resource Task against all Network Resources after purging all alerts to ensure everything is properly synchronized.