Return to Snippet

Revision: 25516
at April 1, 2010 08:30 by PCurd


Updated Code
select usecounts,cacheobjtype,objtype,query.text,executionplan.query_plan from sys.dm_exec_cached_plans outer apply sys.dm_exec_sql_text(plan_handle) as query outer apply sys.dm_exec_query_plan(plan_handle) as executionplan where text not like '%sys%'and cacheobjtype ='compiled plan'

Revision: 25515
at April 1, 2010 08:15 by PCurd


Initial Code
select usecounts,cacheobjtype,objtype,query.text,executionplan.query_plan from sys.dm_exec_cached_plansouter apply sys.dm_exec_sql_text(plan_handle) as queryouter apply sys.dm_exec_query_plan(plan_handle) as executionplanwhere text not like '%sys%'and cacheobjtype ='compiled plan'

Initial URL

                                

Initial Description

                                

Initial Title
Return Cached Query Plans

Initial Tags
query

Initial Language
SQL