有没有人知道这个查询是否可以转换并在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
由于
答案 0 :(得分: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