How to find SQL statement from SQL handle in blocked-process and blocking-process extended events data using sys.dm_exec_sql_text

How to find SQL statement from SQL handle in blocked-process and blocking-process extended events data

declare @start int=30966, @end int=33176

select substring(text,(@start/2)+1,(@end-@start/2)+1) from sys.dm_exec_sql_text(0x030005002649867c9d5db200bda5555551000000000000000000000000000000000000000000000000000000)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s