# MS-SQL 쿼리 로그 보기(쿼리문)


select db_name(st.dbid) I3_IC ,

       qs.total_elapsed_time ,

       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 >= '2012-01-01 00:00:00' 

   --and db_name(st.dbid) is not null and cp.objtype = 'proc' --조건: 종류

   and text like '%delete%'

 order by last_execution_time desc;



오라클 관련 개발작업하다가 좋은 정보있길래 아래와 같이 링크를 걸어둡니다. 

http://bit1010.tistory.com/77

+ Recent posts