If you had run the query, you may be able to get it back if you run the following, replacing the text between <> with part of your query:SELECT plan_handle, pvt.set_options, pvt.sql_handle, textFROM ( SELECT plan_handle, epa.attribute, epa.value, st.text FROM sys.dm_exec_cached_plans OUTER APPLY sys.dm_exec_plan_attributes(plan_handle) AS epa CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS st WHERE cacheobjtype = 'Compiled Plan' and st.text like '%<defining part of you query>%') AS ecpa PIVOT (MAX(ecpa.value) FOR ecpa.attribute IN (set_options,sql_handle)) AS pvt;