SELECT TOP 2000
ST.text AS '执行的SQL语句',
QS.creation_time AS '执行时间'
FROM sys.dm_exec_query_stats QS
CROSS APPLY
sys.dm_exec_sql_text(QS.sql_handle) ST
ORDER BY
QS.creation_time DESC
SELECT TOP 2000
ST.text AS '执行的SQL语句',
QS.creation_time AS '执行时间'
FROM sys.dm_exec_query_stats QS
CROSS APPLY
sys.dm_exec_sql_text(QS.sql_handle) ST
ORDER BY
QS.creation_time DESC