Hello Guys!
Today one procedure in my company after job for recompile, was no cache stored when I find with this select:
SELECT [cp].[refcounts]
, [cp].[usecounts]
, [cp].[objtype]
, [st].[dbid]
, [st].[objectid]
, [st].[text]
, [qp].[query_plan]
FROM sys.dm_exec_cached_plans cp
CROSS APPLY sys.dm_exec_sql_text ( cp.plan_handle ) st
CROSS APPLY sys.dm_exec_query_plan ( cp.plan_handle ) qp
where st.objectid = OBJECT_ID('usp_xyzasdasdjkl')
OPTION (RECOMPILE);
This is one bug? What you think about this?
Thanks!
Vithor da Silva e Silva | MCTS - SQL Server 2008, Implementation and Maintenance Site: http://www.vssti.com.br Blog: http://vssti.blogspot.com