Skip to content

Instantly share code, notes, and snippets.

@mikeblas
mikeblas / in_flight_queries.sql
Created Nov 27, 2020
SQL Server: show currently running queries by CPU time
View in_flight_queries.sql
-- in flight queries by CPU time
-- author: mike@blaszczak.com
-- Date: 2020-11-27
SELECT s.session_id,
DB_NAME(r.database_id) as DBName,
r.status,
r.blocking_session_id 'Blk by',
r.wait_type,