Displays the last statement sent from a client to an instance of Microsoft SQL Server.

Arguments  : session_id or request_id

Request ID can be retrieved from the below statement :

SELECT request_id
FROM sys.dm_exec_requests
WHERE session_id = @@spid



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 )

Facebook photo

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

Connecting to %s