Return to Snippet

Revision: 18227
at September 23, 2009 17:49 by marcocs


Initial Code
SELECT DEST.TEXT  
FROM sys.[dm_exec_connections] SDEC 
 CROSS APPLY sys.[dm_exec_sql_text](SDEC.[most_recent_sql_handle]) AS DEST 
WHERE SDEC.[most_recent_session_id] = @PID

Initial URL
http://www.mssqltips.com/tip.asp?tip=1799

Initial Description
Identify last statement run for a specific SQL Server session
Written By: Tim Ford -- 7/22/2009

Initial Title
Last statement run for a specific SQL Server session

Initial Tags

                                

Initial Language
SQL