Training: Reporting in SQL Monitor. Watch now.

Querying and Updating Alerts


I'm looking for a way to automatically clear certain messages from the Alerts inbox.  I'd be filtering on the process full command.  For example, when I click into a Long Running Query, I see a bunch of "xp_delete_file" queries which I would like to clear (this is related to a data warehouse and moving files around).  They muddy the water.

Previously, I had a set of scripts to allow me to search and clear alerts provided by Redgate.  These are scripts for a much older version though.

Currently, I am running 9.0.2.



  • Hi @clivestrong,

    I do believe it used to be easier in older versions the query text wasn't compressed as it is now and I think they abstracted some parts out to save space, which makes this a bit more difficult now.

    Having said that - I think you would be better served filtering out the alerts from being created rather than clearing them out in bulk after the fact.  To do this, go to the Configuration > Alert settings and select the Long-running query alert and customize it to include this in the exclude section:

    If you have customized this alert at lower levels you will need to add this in at those levels as well since the more specific has precedence of the more general levels of the hierarchy.

    We don't support direct querying of the data repository, but if you did still need to query the SQL text of the command, you will need to have a look at on decompressing the query text, though looking at the query there it's for the top queries section of the server overview rather than the long-running query alert - so it may need to be done for a different table and then it would need to be tied into the alert as well to be able to clear it

    I hope that helps point you in the right direction.

    Kind regards,

    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.