One of the common problems with when diagnosing what appears to be a slow scenario where there may be blocking involved is determining what is blocking on SQL Server. Here is a query that I like to use. If there is no blocking occurring then this query will return nothing.   This script works on SQL Server 2008, 2008R2, 2012, …

Finding Blocking Queries Read more »

Being day 22 of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC OUTPUTBUFFER. I missed a few days on the DBCC Commands due to attending SQL Saturday in Redmond, and the release of my book on Amazon.com.  I am now back on track to finish out the rest of the month with more DBCC commands. Description: …

DBCC OutputBuffer Read more »

Being day 17 of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC INPUTBUFFER. Description: DBCC INPUTBUFFER allows access to the last query run for a specific session (SPID). DBCC INPUTBUFFER Syntax: Example: The following example we get a list of the sessions, then browse the queries that they have been running. Next if we use one …

DBCC InputBuffer Read more »