Manually purge alerts from the Event Console
search cancel

Manually purge alerts from the Event Console

book

Article ID: 180375

calendar_today

Updated On:

Products

IT Management Suite Client Management Suite

Issue/Introduction

 The default purging maintenance for the Event Console runs nightly. It will incrementally purge alerts in a batch format which takes time. 

Environment

ITMS 8.x

Resolution

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 @purge_remain=@purge_remain__auto OUTPUT, @removed_alerts=@removed_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 @removed_alerts=@removed_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.