|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:43 AM
Points: 541,
Visits: 1,398
|
|
Hi - If I know the executing query whats the best way to get the plan_handle such that I can look at the plan in the plan cache?
Thanks
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:43 AM
Points: 541,
Visits: 1,398
|
|
Have figured it out by using this query:
SELECT UseCounts, Cacheobjtype, Objtype, TEXT, query_plan, plan_handle FROM sys.dm_exec_cached_plans CROSS APPLY sys.dm_exec_sql_text(plan_handle) CROSS APPLY sys.dm_exec_query_plan(plan_handle) WHERE TEXT like '%%'
|
|
|
|