T-SQL – Find running queries
Here’s a little script in T-SQL to find queries running in our SQL SERVER database: SELECT sqltext.TEXT, res.session_id, res.status, res.command, res.cpu_time, res.total_elapsed_time FROM sys.dm_exec_requests res CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext This script is also useful…