質問

I found a query in the plan cache that needs parameterizing. Not sure which app created this query. Is there a good way in SQL to track down the app that put a given query in cache?

sql2014

役に立ちましたか?

解決

No, information about what sent the query to the server (user, application, IP, etc.) isn't stored in the plan cache or Query Store, or associated views.

You can catch that information while a query is running using sp_WhoIsActive, or logging it to a table.

If you have a good monitoring tool, it may have gathered that information. If you have a bad one, it probably didn't.

ライセンス: CC-BY-SA帰属
所属していません dba.stackexchange
scroll top