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:
- On the SQL server which hosts the CMDB, open Microsoft SQL Server Management Studio and connect to the correct instance
- From the Available Databases drop-down list, choose the name of the CMDB (e.i. "Symantec_CMDB")
- 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.
- Proceed with choosing the Execute button until the Messages pane displays: Command(s) completed successfully.
- 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
- 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.