Karthick P.K on SQL Server

Archive for February, 2009

Script to get all the Query and cached plans

Posted by Karthick P.K on February 18, 2009





 FROM sys.dm_exec_cached_plans cp


  CROSS APPLY sys.dm_exec_query_plan(cp.plan_handle) eqp


  CROSS APPLY sys.dm_exec_sql_text(cp.plan_handle) est


 --WHERE   est.dbid = DB_ID('DBNMAE')

Posted in SQL Query | Tagged: , | 1 Comment »

%d bloggers like this: