June 15, 2007 at 3:51 pm
Can someone please explain the difference between blocking and waiting? I am running SQL Server 2005 svs pack 2.
thanks in advance
June 17, 2007 at 6:54 pm
Blocking is a manifestation of the logical locks that are needed to maintain the transactional consistency.
When the wait for locks exceed a threshold, it may impact the response time. You can use BlockedProcessThreshold configuration parameter to establish a user configured sql instance block threshold. You may want to monitor your blockings with sql profiler - use the Blocked Process Report event class under errors and warnings object.
sys.dm_db_index_operational_stats is used in sql 2005 for getting a detailed accounting of lock statistics per table, index, eventualy partition.
In conclusion, blocking is primarily waits for logical locks, such as the wait to acquire an X lock on a resource OR the wiats that results from latches. Logical lock waits occur when a request to acquire a non-compatible lock on an already locked resorce is made. This mechanism is needed to provide the data consistency based on the transaction isolation level at which a query statement is running.
For a complete list of sql 2005 wait types see the topic sys.dm_os_wait_stats (view) in BOL.
Hope this helps.
June 22, 2007 at 8:49 am
If you are blocking, you are causing someone else to wait. The reasons for blocking and waiting were explained correctly by michaela.
June 26, 2007 at 5:48 am
Michael has explained well about blocking and I have found some good KB which will also help you to understand blocking and how to troubleshoot it.
http://support.microsoft.com/kb/224453/en-us
Minaz
"More Green More Oxygen !! Plant a tree today"
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply