문제

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