<?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; 2005 &#8211; Last Ran Query &#8211; Recently Ran Query</title>
	<atom:link href="http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/</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: g2-902125243db7d5e697a20ae0137565ac</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-249617</link>
		<dc:creator><![CDATA[g2-902125243db7d5e697a20ae0137565ac]]></dc:creator>
		<pubDate>Tue, 07 Feb 2012 17:17:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-249617</guid>
		<description><![CDATA[Hello,
I run the query but the run I did yesterday is not showing ... it was run within the &quot;New Query&quot; box interactively... anyway to trace it? to see if it was successfull?
Thanks,
Dom]]></description>
		<content:encoded><![CDATA[<p>Hello,<br />
I run the query but the run I did yesterday is not showing &#8230; it was run within the &#8220;New Query&#8221; box interactively&#8230; anyway to trace it? to see if it was successfull?<br />
Thanks,<br />
Dom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vishal</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-173127</link>
		<dc:creator><![CDATA[Vishal]]></dc:creator>
		<pubDate>Thu, 29 Sep 2011 07:17:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-173127</guid>
		<description><![CDATA[Hello Pinal,

I want to track store procedure and its executed time by trigger.
When the store procedure is executed by application it should insert the store procedure name and its execution time in one table.

Reply soon...]]></description>
		<content:encoded><![CDATA[<p>Hello Pinal,</p>
<p>I want to track store procedure and its executed time by trigger.<br />
When the store procedure is executed by application it should insert the store procedure name and its execution time in one table.</p>
<p>Reply soon&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shankar</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-166441</link>
		<dc:creator><![CDATA[shankar]]></dc:creator>
		<pubDate>Thu, 08 Sep 2011 06:23:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-166441</guid>
		<description><![CDATA[sir i worked in oracale 9i.In tha all query all dispalying in smae window but in microsoft sql it cnt.what to do? 
first time i am working in microsoft sql thats way sir. if i want to display all previous query in  same window what to do ?]]></description>
		<content:encoded><![CDATA[<p>sir i worked in oracale 9i.In tha all query all dispalying in smae window but in microsoft sql it cnt.what to do?<br />
first time i am working in microsoft sql thats way sir. if i want to display all previous query in  same window what to do ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AnilJayanti</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-160462</link>
		<dc:creator><![CDATA[AnilJayanti]]></dc:creator>
		<pubDate>Mon, 22 Aug 2011 05:40:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-160462</guid>
		<description><![CDATA[Hi All,

I wrote and tested one complex query 2 days back.  today suddenly my system got restarted due to technical issue. So, Now any idea to get my previous complex query... Please help...

AnilJayanti]]></description>
		<content:encoded><![CDATA[<p>Hi All,</p>
<p>I wrote and tested one complex query 2 days back.  today suddenly my system got restarted due to technical issue. So, Now any idea to get my previous complex query&#8230; Please help&#8230;</p>
<p>AnilJayanti</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suba</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-151588</link>
		<dc:creator><![CDATA[suba]]></dc:creator>
		<pubDate>Fri, 29 Jul 2011 13:35:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-151588</guid>
		<description><![CDATA[Is is possible to get this as Database category ????????]]></description>
		<content:encoded><![CDATA[<p>Is is possible to get this as Database category ????????</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Purush otta ma</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-150754</link>
		<dc:creator><![CDATA[Purush otta ma]]></dc:creator>
		<pubDate>Tue, 26 Jul 2011 08:45:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-150754</guid>
		<description><![CDATA[**********Go for this it will update last ran query with username*********

SELECT c.session_id, s.host_name, s.login_name, s.status
, st.text, s.login_time, s.program_name, *
FROM sys.dm_exec_connections c
INNER JOIN sys.dm_exec_sessions s ON c.session_id = s.session_id
CROSS APPLY sys.dm_exec_sql_text(most_recent_sql_handle) AS st
ORDER BY c.session_id]]></description>
		<content:encoded><![CDATA[<p>**********Go for this it will update last ran query with username*********</p>
<p>SELECT c.session_id, s.host_name, s.login_name, s.status<br />
, st.text, s.login_time, s.program_name, *<br />
FROM sys.dm_exec_connections c<br />
INNER JOIN sys.dm_exec_sessions s ON c.session_id = s.session_id<br />
CROSS APPLY sys.dm_exec_sql_text(most_recent_sql_handle) AS st<br />
ORDER BY c.session_id</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: basava</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-136899</link>
		<dc:creator><![CDATA[basava]]></dc:creator>
		<pubDate>Thu, 26 May 2011 14:58:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-136899</guid>
		<description><![CDATA[Hi All,

I need some information about SQL SERVER &quot;DINALI&quot; and differences Btn 2008 &amp; 2011

Regards,
Basava]]></description>
		<content:encoded><![CDATA[<p>Hi All,</p>
<p>I need some information about SQL SERVER &#8220;DINALI&#8221; and differences Btn 2008 &amp; 2011</p>
<p>Regards,<br />
Basava</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: basava</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-136404</link>
		<dc:creator><![CDATA[basava]]></dc:creator>
		<pubDate>Tue, 24 May 2011 13:29:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-136404</guid>
		<description><![CDATA[how to verify last query executed in query analyser]]></description>
		<content:encoded><![CDATA[<p>how to verify last query executed in query analyser</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: preeti jaiswal</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-130590</link>
		<dc:creator><![CDATA[preeti jaiswal]]></dc:creator>
		<pubDate>Fri, 22 Apr 2011 21:43:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-130590</guid>
		<description><![CDATA[how we use sql server2005? where we write query and run it because there is no query analyzer option……. plz tell me the whole process stepwise]]></description>
		<content:encoded><![CDATA[<p>how we use sql server2005? where we write query and run it because there is no query analyzer option……. plz tell me the whole process stepwise</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: preeti jaiswal</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-130589</link>
		<dc:creator><![CDATA[preeti jaiswal]]></dc:creator>
		<pubDate>Fri, 22 Apr 2011 21:42:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-130589</guid>
		<description><![CDATA[how we use sql server2005? where we write query and run it because there is no query analyzer option....... plz tell me the whole process stepwise]]></description>
		<content:encoded><![CDATA[<p>how we use sql server2005? where we write query and run it because there is no query analyzer option&#8230;&#8230;. plz tell me the whole process stepwise</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Inder</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-126466</link>
		<dc:creator><![CDATA[Inder]]></dc:creator>
		<pubDate>Mon, 04 Apr 2011 07:54:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-126466</guid>
		<description><![CDATA[Hi 
I need to insert last executed query with user but user will come via UI(.net code). Please let me know how can I manage?
Rrds,
Inder]]></description>
		<content:encoded><![CDATA[<p>Hi<br />
I need to insert last executed query with user but user will come via UI(.net code). Please let me know how can I manage?<br />
Rrds,<br />
Inder</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doron</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-124754</link>
		<dc:creator><![CDATA[Doron]]></dc:creator>
		<pubDate>Thu, 24 Mar 2011 04:55:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-124754</guid>
		<description><![CDATA[Dave,

Thank you for the tip about the last ran queries. How ever, how can I view only USERS activity ?? not the system activity or the SQL Agent activity ?

I know that SQL Server Profiler can do the job but I would like to know the code behind...

Thanks !

Doron]]></description>
		<content:encoded><![CDATA[<p>Dave,</p>
<p>Thank you for the tip about the last ran queries. How ever, how can I view only USERS activity ?? not the system activity or the SQL Agent activity ?</p>
<p>I know that SQL Server Profiler can do the job but I would like to know the code behind&#8230;</p>
<p>Thanks !</p>
<p>Doron</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-118642</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 15 Feb 2011 15:37:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-118642</guid>
		<description><![CDATA[SQL Server help file has code example for cross aplly. Refer it]]></description>
		<content:encoded><![CDATA[<p>SQL Server help file has code example for cross aplly. Refer it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abdur Rahman</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-117860</link>
		<dc:creator><![CDATA[Abdur Rahman]]></dc:creator>
		<pubDate>Thu, 10 Feb 2011 11:10:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-117860</guid>
		<description><![CDATA[thanks...
penal dave
how to use  
cross apply in sql

thanks a lot......]]></description>
		<content:encoded><![CDATA[<p>thanks&#8230;<br />
penal dave<br />
how to use<br />
cross apply in sql</p>
<p>thanks a lot&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tas</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-114131</link>
		<dc:creator><![CDATA[Tas]]></dc:creator>
		<pubDate>Tue, 25 Jan 2011 17:29:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-114131</guid>
		<description><![CDATA[Please let me know how to get last query ran in SQL Server 2000]]></description>
		<content:encoded><![CDATA[<p>Please let me know how to get last query ran in SQL Server 2000</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-108870</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 31 Dec 2010 10:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-108870</guid>
		<description><![CDATA[Note that this will work from version 2005 onwards only]]></description>
		<content:encoded><![CDATA[<p>Note that this will work from version 2005 onwards only</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-108861</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 31 Dec 2010 10:30:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-108861</guid>
		<description><![CDATA[Not possible until you audit it]]></description>
		<content:encoded><![CDATA[<p>Not possible until you audit it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mani</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-108737</link>
		<dc:creator><![CDATA[Mani]]></dc:creator>
		<pubDate>Thu, 30 Dec 2010 23:30:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-108737</guid>
		<description><![CDATA[A very useful query. Will it be possible to filter by machine as well?]]></description>
		<content:encoded><![CDATA[<p>A very useful query. Will it be possible to filter by machine as well?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rroy</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-108342</link>
		<dc:creator><![CDATA[Rroy]]></dc:creator>
		<pubDate>Tue, 28 Dec 2010 14:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-108342</guid>
		<description><![CDATA[Hi,
     I ran the code  
SELECT deqs.last_execution_time AS [Time], dest.TEXT AS [Query]
FROM sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
ORDER BY deqs.last_execution_time DESC

but got 
Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near &#039;APPLY&#039;.


any ideas?
ran it in management studio]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
     I ran the code<br />
SELECT deqs.last_execution_time AS [Time], dest.TEXT AS [Query]<br />
FROM sys.dm_exec_query_stats AS deqs<br />
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest<br />
ORDER BY deqs.last_execution_time DESC</p>
<p>but got<br />
Msg 170, Level 15, State 1, Line 3<br />
Line 3: Incorrect syntax near &#8216;APPLY&#8217;.</p>
<p>any ideas?<br />
ran it in management studio</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seshu</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-83999</link>
		<dc:creator><![CDATA[Seshu]]></dc:creator>
		<pubDate>Fri, 13 Aug 2010 16:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-83999</guid>
		<description><![CDATA[Hi ,

How to get last updated row and its values for a particular table .


Thanks
Seshu]]></description>
		<content:encoded><![CDATA[<p>Hi ,</p>
<p>How to get last updated row and its values for a particular table .</p>
<p>Thanks<br />
Seshu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sathish</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-79170</link>
		<dc:creator><![CDATA[Sathish]]></dc:creator>
		<pubDate>Thu, 08 Jul 2010 07:18:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-79170</guid>
		<description><![CDATA[Hi

One of my table column is updated randomly and the value got changed all of a sudden. But after sometime, it may work fine. The change is constantly happening on a specific column of a specific table. Is there any way to find out which query caused that update?]]></description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>One of my table column is updated randomly and the value got changed all of a sudden. But after sometime, it may work fine. The change is constantly happening on a specific column of a specific table. Is there any way to find out which query caused that update?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-75482</link>
		<dc:creator><![CDATA[A]]></dc:creator>
		<pubDate>Thu, 10 Jun 2010 14:41:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-75482</guid>
		<description><![CDATA[Is there any way  to see the last ran queries in MS SQL 2000? I couldn&#039;t find it.]]></description>
		<content:encoded><![CDATA[<p>Is there any way  to see the last ran queries in MS SQL 2000? I couldn&#8217;t find it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: srinu</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-75325</link>
		<dc:creator><![CDATA[srinu]]></dc:creator>
		<pubDate>Wed, 09 Jun 2010 13:55:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-75325</guid>
		<description><![CDATA[Hi dave,

i have a doubt not regarding above query,

Unfortunately i have deleted one function through Object explorer.
even i don&#039;t have backup for my database.

How can i roll back recent deleted functions.

hope i am clear.

thanks 
srinu.]]></description>
		<content:encoded><![CDATA[<p>Hi dave,</p>
<p>i have a doubt not regarding above query,</p>
<p>Unfortunately i have deleted one function through Object explorer.<br />
even i don&#8217;t have backup for my database.</p>
<p>How can i roll back recent deleted functions.</p>
<p>hope i am clear.</p>
<p>thanks<br />
srinu.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tas</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-74439</link>
		<dc:creator><![CDATA[Tas]]></dc:creator>
		<pubDate>Wed, 02 Jun 2010 17:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-74439</guid>
		<description><![CDATA[Hi
Can we find out what were last 100 queries that got executed in SQL Server 2000. When I executed same query got error.
Line 4: Incorrect syntax near &#039;APPLY&#039;.
Thanks]]></description>
		<content:encoded><![CDATA[<p>Hi<br />
Can we find out what were last 100 queries that got executed in SQL Server 2000. When I executed same query got error.<br />
Line 4: Incorrect syntax near &#8216;APPLY&#8217;.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mudasser Hassan</title>
		<link>http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-57585</link>
		<dc:creator><![CDATA[Mudasser Hassan]]></dc:creator>
		<pubDate>Fri, 13 Nov 2009 06:59:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/#comment-57585</guid>
		<description><![CDATA[Hi!

Is there any way to rollback last executed query?]]></description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>Is there any way to rollback last executed query?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

