<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Get Last Running Query Based on SPID</title>
	<atom:link href="http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 09 Feb 2012 11:29:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Brian</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-235400</link>
		<dc:creator><![CDATA[Brian]]></dc:creator>
		<pubDate>Wed, 11 Jan 2012 18:17:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-235400</guid>
		<description><![CDATA[I run:
DECLARE @sqltext VARBINARY(128)
SELECT @sqltext = sql_handle
FROM sys.sysprocesses
WHERE spid = 1535
SELECT TEXT
FROM sys.dm_exec_sql_text(@sqltext)

My blocking spid is 1535
But the result I get is 
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

Any suggestions to find what the actual problem query is?]]></description>
		<content:encoded><![CDATA[<p>I run:<br />
DECLARE @sqltext VARBINARY(128)<br />
SELECT @sqltext = sql_handle<br />
FROM sys.sysprocesses<br />
WHERE spid = 1535<br />
SELECT TEXT<br />
FROM sys.dm_exec_sql_text(@sqltext)</p>
<p>My blocking spid is 1535<br />
But the result I get is<br />
SET TRANSACTION ISOLATION LEVEL READ COMMITTED</p>
<p>Any suggestions to find what the actual problem query is?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: neeraj</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-218446</link>
		<dc:creator><![CDATA[neeraj]]></dc:creator>
		<pubDate>Thu, 15 Dec 2011 12:13:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-218446</guid>
		<description><![CDATA[hahahah
we are software engg to why we will let you know :)]]></description>
		<content:encoded><![CDATA[<p>hahahah<br />
we are software engg to why we will let you know :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: atul chauhan</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-195901</link>
		<dc:creator><![CDATA[atul chauhan]]></dc:creator>
		<pubDate>Tue, 15 Nov 2011 07:57:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-195901</guid>
		<description><![CDATA[hello, i have sql server on my system. the software engineer executed a command. now i want to know which command he executed. he also used an exe file called sql tool.]]></description>
		<content:encoded><![CDATA[<p>hello, i have sql server on my system. the software engineer executed a command. now i want to know which command he executed. he also used an exe file called sql tool.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DGilbert</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-178419</link>
		<dc:creator><![CDATA[DGilbert]]></dc:creator>
		<pubDate>Thu, 13 Oct 2011 15:13:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-178419</guid>
		<description><![CDATA[What about right to execute these sys.dm views ? They are not public.
So you need to be database admin by defaut.

Is there a &#039;public&#039; way to find Spid information such as the program_name that is running under a particular spid ?]]></description>
		<content:encoded><![CDATA[<p>What about right to execute these sys.dm views ? They are not public.<br />
So you need to be database admin by defaut.</p>
<p>Is there a &#8216;public&#8217; way to find Spid information such as the program_name that is running under a particular spid ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 13 of 31 Journey to SQLAuthority</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-147826</link>
		<dc:creator><![CDATA[SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 13 of 31 Journey to SQLAuthority]]></dc:creator>
		<pubDate>Wed, 13 Jul 2011 01:30:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-147826</guid>
		<description><![CDATA[[...] A SPID is the returns sessions ID of the current user process. And using that session ID, we can find out that the last query was executed. (Read more here) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] A SPID is the returns sessions ID of the current user process. And using that session ID, we can find out that the last query was executed. (Read more here) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rod Merritt</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-141122</link>
		<dc:creator><![CDATA[Rod Merritt]]></dc:creator>
		<pubDate>Wed, 15 Jun 2011 19:14:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-141122</guid>
		<description><![CDATA[You came through as usual, Thanks!]]></description>
		<content:encoded><![CDATA[<p>You came through as usual, Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mandar</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-137593</link>
		<dc:creator><![CDATA[Mandar]]></dc:creator>
		<pubDate>Mon, 30 May 2011 12:27:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-137593</guid>
		<description><![CDATA[This query is very useful ...and I use it all the time...

however, my question is...sometimes when the query is huge like run from an application or SSAS or something like that, even this query does not give  us the COMPLETE query...

Is there anyway to know that?

Thanks in advance...]]></description>
		<content:encoded><![CDATA[<p>This query is very useful &#8230;and I use it all the time&#8230;</p>
<p>however, my question is&#8230;sometimes when the query is huge like run from an application or SSAS or something like that, even this query does not give  us the COMPLETE query&#8230;</p>
<p>Is there anyway to know that?</p>
<p>Thanks in advance&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Get Query Running in Session Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-90414</link>
		<dc:creator><![CDATA[SQL SERVER – Get Query Running in Session Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Fri, 01 Oct 2010 01:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-90414</guid>
		<description><![CDATA[[...] to mind quickly this time. I searched online and I ended up on my own article written last year SQL SERVER – Get Last Running Query Based on SPID. I felt that I am getting old because I forgot this really simple [...]]]></description>
		<content:encoded><![CDATA[<p>[...] to mind quickly this time. I searched online and I ended up on my own article written last year SQL SERVER – Get Last Running Query Based on SPID. I felt that I am getting old because I forgot this really simple [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elangovan Kanniappan</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-85307</link>
		<dc:creator><![CDATA[Elangovan Kanniappan]]></dc:creator>
		<pubDate>Thu, 26 Aug 2010 07:03:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-85307</guid>
		<description><![CDATA[Hello..
 I need to get Killed(old) process details. 

thanks advances.

Elango]]></description>
		<content:encoded><![CDATA[<p>Hello..<br />
 I need to get Killed(old) process details. </p>
<p>thanks advances.</p>
<p>Elango</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swaraj</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-79121</link>
		<dc:creator><![CDATA[Swaraj]]></dc:creator>
		<pubDate>Wed, 07 Jul 2010 20:51:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-79121</guid>
		<description><![CDATA[Such a great thing you explain simon . thanks a lot

swaraj]]></description>
		<content:encoded><![CDATA[<p>Such a great thing you explain simon . thanks a lot</p>
<p>swaraj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Biju.K.S</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-75324</link>
		<dc:creator><![CDATA[Biju.K.S]]></dc:creator>
		<pubDate>Wed, 09 Jun 2010 13:37:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-75324</guid>
		<description><![CDATA[Great.........!!!]]></description>
		<content:encoded><![CDATA[<p>Great&#8230;&#8230;&#8230;!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ganesan</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-72506</link>
		<dc:creator><![CDATA[Ganesan]]></dc:creator>
		<pubDate>Sun, 23 May 2010 09:49:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-72506</guid>
		<description><![CDATA[Nice one.Very helpful. Thanks]]></description>
		<content:encoded><![CDATA[<p>Nice one.Very helpful. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vampua</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-61446</link>
		<dc:creator><![CDATA[vampua]]></dc:creator>
		<pubDate>Thu, 18 Feb 2010 17:33:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-61446</guid>
		<description><![CDATA[Nice tip, i was big help for me !!! 

thanks !]]></description>
		<content:encoded><![CDATA[<p>Nice tip, i was big help for me !!! </p>
<p>thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raj</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-57956</link>
		<dc:creator><![CDATA[Raj]]></dc:creator>
		<pubDate>Fri, 27 Nov 2009 09:41:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-57956</guid>
		<description><![CDATA[Hi pinal,

I am new to SQL server and want to know if there is any way to kill the sessions whoose query runs for &gt; 10 min.

Thanks for the help.]]></description>
		<content:encoded><![CDATA[<p>Hi pinal,</p>
<p>I am new to SQL server and want to know if there is any way to kill the sessions whoose query runs for &gt; 10 min.</p>
<p>Thanks for the help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pravin</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-57406</link>
		<dc:creator><![CDATA[Pravin]]></dc:creator>
		<pubDate>Sat, 07 Nov 2009 10:46:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-57406</guid>
		<description><![CDATA[Thanks Pinal. this is really helpful]]></description>
		<content:encoded><![CDATA[<p>Thanks Pinal. this is really helpful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashish</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-54305</link>
		<dc:creator><![CDATA[Ashish]]></dc:creator>
		<pubDate>Fri, 31 Jul 2009 07:57:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-54305</guid>
		<description><![CDATA[Great today i search for it and find it in your blog...
i wonder how i miss this one well nice one i really need this today..
Thanks.. for this]]></description>
		<content:encoded><![CDATA[<p>Great today i search for it and find it in your blog&#8230;<br />
i wonder how i miss this one well nice one i really need this today..<br />
Thanks.. for this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michal Neuwirth</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-54050</link>
		<dc:creator><![CDATA[Michal Neuwirth]]></dc:creator>
		<pubDate>Fri, 24 Jul 2009 07:28:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-54050</guid>
		<description><![CDATA[Hi,

imagine we have a very very long running stored procedure. When I use this method, what I get? It will be the whole procedure or the current running statement from this procedure?

Thanks.]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>imagine we have a very very long running stored procedure. When I use this method, what I get? It will be the whole procedure or the current running statement from this procedure?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jayant das</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-53952</link>
		<dc:creator><![CDATA[jayant das]]></dc:creator>
		<pubDate>Wed, 22 Jul 2009 10:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-53952</guid>
		<description><![CDATA[Dear Pinal

I tried it and  able to retrive last query which was ran  Except  current session

Regards
Jayant Das
]]></description>
		<content:encoded><![CDATA[<p>Dear Pinal</p>
<p>I tried it and  able to retrive last query which was ran  Except  current session</p>
<p>Regards<br />
Jayant Das</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Worth</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-53929</link>
		<dc:creator><![CDATA[Simon Worth]]></dc:creator>
		<pubDate>Tue, 21 Jul 2009 18:01:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-53929</guid>
		<description><![CDATA[Note that &quot;fn_get_sql&quot; is going to be removed in a future version of SQL Server, and should not be used in new development.

sys.sysprocesses is for backwards compatiibility only, and for new development BOL recommends using these views instead.
sys.dm_exec_connections
sys.dm_exec_sessions
sys.dm_exec_requests instead

You can view backward compatibility mappings here
http://msdn.microsoft.com/en-us/library/ms187997.aspx]]></description>
		<content:encoded><![CDATA[<p>Note that &#8220;fn_get_sql&#8221; is going to be removed in a future version of SQL Server, and should not be used in new development.</p>
<p>sys.sysprocesses is for backwards compatiibility only, and for new development BOL recommends using these views instead.<br />
sys.dm_exec_connections<br />
sys.dm_exec_sessions<br />
sys.dm_exec_requests instead</p>
<p>You can view backward compatibility mappings here<br />
<a href="http://msdn.microsoft.com/en-us/library/ms187997.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms187997.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-53854</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Mon, 20 Jul 2009 06:24:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-53854</guid>
		<description><![CDATA[Thanks Kuldip, 

I really like that you read almost all the blog posted.

Kind Regards,
Pinal]]></description>
		<content:encoded><![CDATA[<p>Thanks Kuldip, </p>
<p>I really like that you read almost all the blog posted.</p>
<p>Kind Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kuldip</title>
		<link>http://blog.sqlauthority.com/2009/07/19/sql-server-get-last-running-query-based-on-spid/#comment-53852</link>
		<dc:creator><![CDATA[Kuldip]]></dc:creator>
		<pubDate>Mon, 20 Jul 2009 05:14:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5934#comment-53852</guid>
		<description><![CDATA[Thanks sir, Nice article.
When we are running big scripts at that time this information
is very useful.]]></description>
		<content:encoded><![CDATA[<p>Thanks sir, Nice article.<br />
When we are running big scripts at that time this information<br />
is very useful.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

