开发者

How to find Last executed Query in SQL server

开发者 https://www.devze.com 2023-02-25 09:01 出处:网络
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 thatGet \"Who is Active\" by Adam Mac

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

0

精彩评论

暂无评论...
验证码 换一张
取 消