Find the Which Query is Run the Last Time in Sql Server

Unanswered Find the Which Query is Run the Last Time in Sql Server

  • 2012年7月21日 上午 05:22
     
     

    Using  below mentioned query to Achive it,

    SELECT deqs.last_execution_time AS [Time], dest.TEXT AS [Query]

    FROM sys.dm_exec_query_stats AS deqs

    CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest

    ORDER BY deqs.last_execution_time DESC

所有回覆