-- 1.저장프로시져별 실행수 뽑기 select db_name(st.dbid) DBName ,object_schema_name(st.objectid,dbid) SchemaName ,object_name(st.objectid,dbid) StoredProcedure ,sum(qs.execution_count) Execution_count from sys.dm_exec_cached_plans cp join sys.dm_exec_query_stats qs on cp.plan_handle=qs.plan_handle cross apply sys.dm_exec_sql_text(cp.plan_handle)st where DB_Name(st.dbid) is not null and cp.objtype = 'proc' gr..