use [데이터베이스명]

select name, lastdate
from (
    SELECT b.name,
      max(a.last_execution_time) as lastdate
   FROM sys.dm_exec_procedure_stats a
      INNER JOIN sys.objects b
      ON a.object_id = b.object_id
   WHERE  Db_name(a.database_id) = '데이터베이스명'
   group by b.name
)z
order by lastdate desc

'Database > SQL Server' 카테고리의 다른 글

In-Memory Demo  (0) 2020.08.28
포트 에 대한 TCP/IP 연결에 실패했습니다  (0) 2020.08.28
DB 주의대상  (0) 2020.08.28
In-Memory OLTP  (0) 2020.08.28
Backup Script  (0) 2020.08.28

+ Recent posts