mssql query log
2014년 1월 13일 월요일
select db_name(st.dbid) DBName ,qs.total_elapsed_time/1000 ,creation_time ,last_execution_time,text from sys.dm_exec_query_stats qs cross apply sys.dm_exec_sql_text(qs.plan_handle)st join sys.dm_exec_cached_plans cp on qs.plan_handle = cp.plan_handle where creation_time >= '2014-01-13 14:30:00' --and db_name(st.dbid) is not null and cp.objtype = 'proc' --and text like '%delete%' order by last_execution_time desc;