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