How to find Last executed Query in SQL server
I am working with SQL Server 2008 I need i开发者_StackOverflownformation about last run query along with its subqueries if present there. Please tell me query for that
Get "Who is Active" by Adam Machanic:
http://whoisactive.com
http://whoisactive.com
Try
DBCC INPUTBUFFER ( session_id [ , request_id ])
[WITH NO_INFOMSGS ]
Current session is @@SPID
http://msdn.microsoft.com/en-us/library/ms187730.aspx
精彩评论