Created
August 22, 2017 10:23
-
-
Save danblank000/98c155d4ad58f1af9fbe123cf0f4b066 to your computer and use it in GitHub Desktop.
See what queries are currently running
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
--Find who is responsible | |
EXEC sp_who '281' | |
--Stop query | |
KILL 401 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment