Alert Settings Long Running Query Exclude RegEx

wwalbornwwalborn Posts: 4
edited March 19, 2014 10:47AM in SQL Monitor Previous Versions
Using: Version: 3.5.0.497

Here is an example email content for a long running query that I want to exclude (any SQLAgent jobs):

Process name: SQLAgent - TSQL JobStep (Job 0x1C32C6B680AD91468B8FB415ED990C70 : Step 6)

I have tried both of these and a few others, none of them seem to match and exclude, what am I missing?

Added to section
"Exclude queries with a SQL process name matching the following regular expressions:"

.*SQLAgent - TSQL JobStep .*

^SQLAgent.*


If are successfully filtering SQLAgent alerts, please share what is working for you. Thanks.

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    The last time this issue came up, it worked to put the whole string in square-brackets like this:
    [SQL Agent - TSQL JobStep]
    Hopefully that does the trick.
  • Changed to use brackets, will see what happens this weekend. Thanks.
  • Well, that did not appear to work with simply brackets, I am going to try a shotgun approach and list all of the variations that seem logical to me:

    [SQLAgent]
    [SQLAgent]*
    [SQLAgent].*
    .*[SQLAgent].*
    ^SQLAgent.*
    ^SQLAgent.*\n
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I tried it using just the text and the query was blocked. Maybe you did not set the restriction at the right server? You can configure the alerts differently for different servers. Here is what I have set currently, which is blocking long-running query alerts for all servers:
    Exclude queries with a SQL process name matching the following regular expressions:
    Red Gate Software - SQL Tools
    SQLAgent - TSQL JobStep
Sign In or Register to comment.