magritton
7/3/2015 - 12:26 PM

SQL DMV to get the cached plans

SQL DMV to get the cached plans

SELECT plan_handle, st.text
FROM sys.dm_exec_cached_plans 
CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS st
WHERE text LIKE N'select * from t1%';