The following query shows you the long running queries in the database by combination of few dynamic management views. It’s quite useful to get the “bottleneck” on-the-fly when your system is super busy.
Select dmText.text as 'Executed Query',dmStats.last_execution_time as 'Last Executed Time', dmstats.*
from
sys.dm_exec_query_stats as dmStats
Cross apply
sys.dm_exec_sql_text(dmStats.sql_handle) as dmText
Order By
total_elapsed_time desc,
dmStats.last_execution_time desc
What’s up, this weekend iis good for me, because this moment i am reading
this impressive informative post here at my house.
Comment by casino — July 20, 2014 @ 10:14 pm