In order to do that, we used the following query:
SELECT r.total_elapsed_time,text, task_state
FROM
sys.dm_exec_sessions s
LEFT JOIN sys.dm_exec_connections c
ON s.session_id = c.session_id
LEFT JOIN sys.dm_db_task_space_usage tsu
ON tsu.session_id = s.session_id
LEFT JOIN sys.dm_os_tasks t
ON t.session_id = tsu.session_id
AND t.request_id = tsu.request_id
LEFT JOIN sys.dm_exec_requests r
ON r.session_id = tsu.session_id
AND r.request_id = tsu.request_id
OUTER APPLY sys.dm_exec_sql_text(r.sql_handle) TSQL
where r.total_elapsed_time >1
I only select relevant columns for me and an elapsed time filter.
Ref:
http://stackoverflow.com/questions/7503456/nhibernate-to-linq-3-2-generate-error-sql-on-operator
No comments:
Post a Comment