﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server 2005 Performance Tuning  / How to find the start time of query in the database / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 22 May 2013 22:28:55 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How to find the start time of query in the database</title><link>http://www.sqlservercentral.com/Forums/Topic759513-360-1.aspx</link><description>I just validated it, you can get the start time for a statement within a batch by querying sys.dm_exec_sessions. I posted a [url=http://scarydba.wordpress.com/2009/07/28/when-did-this-statement-start/]blog entry on it here[/url].</description><pubDate>Tue, 28 Jul 2009 09:27:35 GMT</pubDate><dc:creator>Grant Fritchey</dc:creator></item><item><title>RE: How to find the start time of query in the database</title><link>http://www.sqlservercentral.com/Forums/Topic759513-360-1.aspx</link><description>Do you mean to say that report sql is being repeatedly executed (maybe from diff connections) and you want to find out when this whole thing started ?</description><pubDate>Tue, 28 Jul 2009 03:15:46 GMT</pubDate><dc:creator>ChiragNS</dc:creator></item><item><title>RE: How to find the start time of query in the database</title><link>http://www.sqlservercentral.com/Forums/Topic759513-360-1.aspx</link><description>I'm not trying to be obtuse, I just don't understand what you are referring to. Do you mean queries coming from Reporting Services?</description><pubDate>Mon, 27 Jul 2009 11:08:29 GMT</pubDate><dc:creator>Grant Fritchey</dc:creator></item><item><title>RE: How to find the start time of query in the database</title><link>http://www.sqlservercentral.com/Forums/Topic759513-360-1.aspx</link><description>I mean the Report SQL which is running in the db. I am trying to identify the start time of the report SQL.</description><pubDate>Mon, 27 Jul 2009 09:53:57 GMT</pubDate><dc:creator>anusharani_c</dc:creator></item><item><title>RE: How to find the start time of query in the database</title><link>http://www.sqlservercentral.com/Forums/Topic759513-360-1.aspx</link><description>When you say SQL, do you mean an individual SQL statement? One that is currently running? I'm not entirely sure, but you may not be able to drill down to that level without capturing statements in a trace. That's one way of doing it, but you would already have to have the trace in place. You couldn't turn it on in a moment's notice.I'll have to test the DMV to see if it records a statement or a batch start time.</description><pubDate>Mon, 27 Jul 2009 08:25:37 GMT</pubDate><dc:creator>Grant Fritchey</dc:creator></item><item><title>RE: How to find the start time of query in the database</title><link>http://www.sqlservercentral.com/Forums/Topic759513-360-1.aspx</link><description>My understanding is -&gt;One SQL sends multiple requests to the db, the start time in dm_exec_* tables all point to the start time of EACH REQUEST, thus at a given point of time, I am unable to determine when the SQL started.  </description><pubDate>Mon, 27 Jul 2009 07:55:14 GMT</pubDate><dc:creator>anusharani_c</dc:creator></item><item><title>RE: How to find the start time of query in the database</title><link>http://www.sqlservercentral.com/Forums/Topic759513-360-1.aspx</link><description>This SP gets the start time of the running SQL from system table dm_exec_* and system function dm_exec_sql.My understanding is -&gt;One SQL sends multiple requests to the db, the start time in dm_* tables all point to the start time of EACH REQUEST, thus at a given point of time, I am unable to determine when the SQL started.  </description><pubDate>Mon, 27 Jul 2009 07:54:41 GMT</pubDate><dc:creator>anusharani_c</dc:creator></item><item><title>RE: How to find the start time of query in the database</title><link>http://www.sqlservercentral.com/Forums/Topic759513-360-1.aspx</link><description>SQL 2005</description><pubDate>Mon, 27 Jul 2009 07:50:58 GMT</pubDate><dc:creator>anusharani_c</dc:creator></item><item><title>RE: How to find the start time of query in the database</title><link>http://www.sqlservercentral.com/Forums/Topic759513-360-1.aspx</link><description>For 2005/2008, take a look at sys.dm_exec_syessions. It will give you a basic breakdown of information for the connections in the system, including start times on the last batch. For more detailed information, take a look at sys.dm_exec_requests. That will give you very specific information about what a process is waiting for, what it's doing, what statement it's on within the batch, etc. In some cases, not all, not even most, it will also show a percent complete, but don't rely on that value in any way. It may or may not be accurate and useful.</description><pubDate>Mon, 27 Jul 2009 06:54:35 GMT</pubDate><dc:creator>Grant Fritchey</dc:creator></item><item><title>RE: How to find the start time of query in the database</title><link>http://www.sqlservercentral.com/Forums/Topic759513-360-1.aspx</link><description>Check this article. See if this helps.[url]http://www.sqlservercentral.com/scripts/T-SQL/66830/[/url]</description><pubDate>Sat, 25 Jul 2009 01:43:15 GMT</pubDate><dc:creator>vstitte</dc:creator></item><item><title>RE: How to find the start time of query in the database</title><link>http://www.sqlservercentral.com/Forums/Topic759513-360-1.aspx</link><description>What version of SQL Server are running?</description><pubDate>Sat, 25 Jul 2009 01:38:57 GMT</pubDate><dc:creator>vstitte</dc:creator></item><item><title>How to find the start time of query in the database</title><link>http://www.sqlservercentral.com/Forums/Topic759513-360-1.aspx</link><description>I am creating a stored procedure to identify, and kill a long running Business Objects query in the SQL Server database. I am able to identify the BO SQL iin the database with the BO user id, and also able to check the status "RUNNABLE" in sys_processes table, but last_batch column keeps updating timestamp for EACH REQUEST sent to the DB for the same BO query. Hence, I am unable to identify the start time, and to find out how long the BO SQL has been running. Does anyone know, how can I accomplish this ?</description><pubDate>Fri, 24 Jul 2009 14:35:55 GMT</pubDate><dc:creator>anusharani_c</dc:creator></item></channel></rss>