Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

How to find current statement start time.

$
0
0

If a batch which consists of multiple statements is being executed I can find out the start time for the batch from exec_requests (SELECT start_time FROM sys.dm_exec_requests WHERE session_id = @SPID) but is there any way to find the current executing statement's start time?

(SELECT request_time, grant_time FROM sys.dm_exec_query_memory_grants WHERE session_id = @spid) gives me a hint of it, I can find the last memory grant and request times which is related to the last statement but I was wondering if I can find the exact start time of the current executing batch.

Thank you


Gokhan Varol


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>