Created
February 4, 2018 12:18
-
-
Save pouyaSamie/e50f45d37634be62392ae2ed0b6a4c7a to your computer and use it in GitHub Desktop.
Monitor which line of store procedure is running
This file contains hidden or 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 SUBSTRING(detail.text, | |
| requests.statement_start_offset / 2, | |
| (requests.statement_end_offset - requests.statement_start_offset) / 2) | |
| FROM sys.dm_exec_requests requests | |
| CROSS APPLY sys.dm_exec_sql_text (requests.plan_handle) detail | |
| WHERE requests.session_id = 82 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment