Created
November 2, 2017 22:37
-
-
Save vkhazin/26e640e813d7564c9e69e27dd2c18833 to your computer and use it in GitHub Desktop.
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
--https://blog.sqlauthority.com/2009/01/07/sql-server-find-currently-running-query-t-sql/ | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment