Lee Linares (10/29/2013)
Jason,Thanks for taking the time to post this article. One question though: What is the purpose of the WHERE clause:
WHERE st1.text like '%sys.sql_modules%'
Thanks again,
Lee
st1.text in this example was used to filter down to queries that I knew had that text I wanted to query. Replace that with the text of a known string (such as the name of a stored procedure or a table involved in the query) in the query you are trying to find.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events