25112
asked on
seeing historical blocking and blcoked processes thru DMV
hi,
below query was bringing results 4 hours ago, but now it is not bringing the same records.. can you infer why/what may cause it to fail?
(I am running from master database).
SELECT *
FROM
sys.dm_exec_connections AS Blocking
JOIN
sys.dm_exec_requests AS Blocked
ON
Blocking.session_id = Blocked.blocking_session_i d
JOIN sys.dm_os_waiting_tasks
AS Waits
ON Blocked.session_id = Waits.session_id
RIGHT OUTER JOIN sys.dm_exec_sessions Sess
ON Blocking.session_id = sess.session_id
CROSS APPLY sys.dm_exec_sql_text(Block ing.most_r ecent_sql_ handle) AS BlockingSQL
CROSS APPLY sys.dm_exec_sql_text(Block ed.sql_han dle) AS BlockedSQL
below query was bringing results 4 hours ago, but now it is not bringing the same records.. can you infer why/what may cause it to fail?
(I am running from master database).
SELECT *
FROM
sys.dm_exec_connections AS Blocking
JOIN
sys.dm_exec_requests AS Blocked
ON
Blocking.session_id = Blocked.blocking_session_i
JOIN sys.dm_os_waiting_tasks
AS Waits
ON Blocked.session_id = Waits.session_id
RIGHT OUTER JOIN sys.dm_exec_sessions Sess
ON Blocking.session_id = sess.session_id
CROSS APPLY sys.dm_exec_sql_text(Block
CROSS APPLY sys.dm_exec_sql_text(Block
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I do appreciate the comment, Vitor. I don't say I good at distributing it right. I will take help of mods.
thanks to both experts.
thanks to both experts.
ASKER
thank you again, experts.
thanks to mod also for quick attention!
thanks to mod also for quick attention!
That's more logical. Thank you.
Shouldn't be the opposite?