3

有谁知道这个查询是否可以转换并在 sql 2000 中运行

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
WHERE dest.TEXT like '%sp_OACreate%'
ORDER BY deqs.last_execution_time DESC

谢谢

4

1 回答 1

2

可能这对你有帮助-

SELECT 
      spid
    , login_time
    , last_batch
    , [status]
    , loginame
    , [db_name] = DB_NAME([dbid])
    , (SELECT [text] FROM ::fn_get_sql(sp.[sql_handle])) Command 
FROM [master].dbo.sysprocesses sp 
WHERE spid = @@SPID
于 2013-05-17T05:54:36.610 回答