New to SQL Sentry – possible to find a specific sql statement?

jjones64 2016-09-21 17:20:49

I'm looking for a sql statement that some of our other monitoring tools are telling us has run during the selected timeframe. The sql statement is not showing up in the "top" sql tab, so I wanted to know if there's a way to lookup a specific sql statement that ran on the server. I searched for similar questions before posting, so sorry if this is something that's already been discussed.
Aaron Bertrand 2016-09-21 17:23:14
If it's not showing up on the Top SQL tab, then this just means that there were no instances of that query that executed during the selected timeframe that exceeded our individual query collection thresholds (5 seconds by default, but you can customize duration / reads). Did you see if the query was represented in that time frame on the Top SQL -> query stats tab (or procedure stats, if the query is part of a stored procedure)?
jjones64 2016-09-21 17:29:39
Thanks for the information – very helpful. Will check those other tabs as well. Have watched a ton of yours and Kevin's videos online – you guys are awesome, as is SQL Sentry!
jjones64 2016-09-21 17:57:36
Don't see the query on either of those other tabs. What I'm really trying to confirm is whether or not I can see passed parameters in SQL Sentry when prepared SQL statements are being used by the app (sp_execute, sp_prepexec). I suspect not because I'm seeing other prepared sql statements that show either the ? or the @p1, @p2, etc., but not the passed values.
Aaron Bertrand 2016-09-21 18:00:15
You will only see runtime values if the query was manually captured due to exceeding our capture thresholds and in cases where we actually have access to the runtime parameter values (this is not always true, as we rely on trace to be honest about these). Query stats / procedure stats show aggregates, so that info definitely won't be there unless the values are literals within the query text and parameterization does not happen.