Comments
4 comments
-
Hello,
The last time this issue came up, it worked to put the whole string in square-brackets like this:[SQL Agent - TSQL JobStep] -
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 -
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
Add comment
Please sign in to leave a comment.
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.