04 agosto, 2014

MS SQL - Ver query corrente - BD acima do 2005



-- Mostrar a query corrente, bd acima do 2005
SELECT sqltext.TEXT,
req.session_id,
req.status,
req.command,
req.cpu_time,
req.total_elapsed_time
FROM sys.dm_exec_requests req
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext

Nenhum comentário: