September 18, 2013 at 11:57 pm
Comments posted to this topic are about the item Blocking Chain (SQL Spackle)
September 19, 2013 at 2:39 am
Hi,
First of all, this is a good article.
Yet, in the Sql 2014 CTP1 the behavior it's quite diferent. Altough the engine detects a conflict, the engine itself deals with it and don't mark blocking sessions.
Please try it.... 🙂
Regards,
September 19, 2013 at 3:30 am
I guys,
In Sql 2014 CTP1, I'd perform the operation in another sequence, so the behaviour, of course, was diferent.
If you perform step by step, like the article, you have the same results.
Regards,
September 19, 2013 at 3:52 am
Nice article Paul.
Built-in activity monitor too can be used to check the "Head Blocker".
There is a column "Head Blocker" under the Processes tab which returns 0 or 1 for a head blocker session.
September 19, 2013 at 5:11 am
Thanks for the feedback all - my first article so it's certainly a learning experience.
I haven't had a chance to play with 2014 yet - hopefully getting to that in the next few weeks - so I had not yet had the opportunity to test it out in that regard.
Divine - yes you can garner this sort of information from activity monitor but I wanted to present the reader with an understanding of what the blocking chain is and how it appears under the covers of SQL server. In my experience using the DMV's allows a DBA to better customize their administration experience as well as develops a better understanding of what is happening rather than using a pointy clicky gui interface.
In any regard to all I definitely appreciate the feedback and hopefully will be able to write another article soon!
September 19, 2013 at 5:39 am
thanks for the script, very handy!
One request/suggestion... Be mindful of CASE as this doesn't work on case-sensitive instances (only requires minor find/replace)
September 19, 2013 at 6:42 am
plamber (9/19/2013)
In my experience using the DMV's allows a DBA to better customize their administration experience as well as develops a better understanding of what is happening rather than using a pointy clicky gui interface.
Yes, exactly. I didn't intend to say that one should not use the scripts. I also always encourage everybody to write the code & using the scripts rather than using GUI as i also don't find any good in GUI. I just pointed out that this information is captured in activity monitor as I thought might be not many people are aware about it yet. It just pointed an alternative, nothing else.
September 19, 2013 at 6:49 am
Thanks Paul - very useful - 5 stars
.
September 19, 2013 at 10:23 am
Thanks Paul, great contribution.
----------------------------------------------------------------------------
Sacramento SQL Server users group - http://sac.sqlpass.org
Follow me on Twitter - @SQLDCH
----------------------------------------------------------------------------
September 19, 2013 at 12:57 pm
Good Artcle !
The same can be achived with some additional results from teh activity monitor script where it has the root blocker .
You can get the script in this way
Run teh acivity monitor --> check the current sessions using the DMV and find the spid for the Activity monitor and use dbcc inputbuffer to catch the query what activity monitor is running or using SQL profiler
Here is the script[/url]
September 19, 2013 at 10:21 pm
Hi Paul,
Nice article, but we may miss few of the session ids by using "sys.dm_exec_request" like below
Select Session_ID,Blocking_Session_ID
From Sys.DM_Exec_Requests
Where Session_ID > 50
And Blocking_Session_Id <> 0
Better to use
select
r.command,
r.plan_handle,
r.wait_type,
r.wait_resource,
r.wait_time,
r.session_id,
r.blocking_session_id
from
sys.dm_exec_requests r
inner join
sys.dm_exec_sessions s
on
r.session_id=s.session_id
where
s.is_user_process=1
as from SQL 2005 onward its not guaranteed that only SPID>50 will be the User Process ids.
September 20, 2013 at 9:09 am
Excellent article and one to add to the toolkit. Many thanks Paul.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply