开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜