Microsoft SQL Server

Microsoft SQL Server #

Show Active queries on Microsoft SQL Server #

SELECT sqltext.TEXT,
    req.start_time,
    eq.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

Microsoft SQL Server wait types #

sys.dm_os_wait_stats (Transact-SQL)