blocking

  • how to understand blocking in sqlserver2000 and how to find solutions?

  • I can share with you a small overview of blockings in sql 2000. Blocking happens when an object is being locked by a process (say process 100) and before the lock is released another process (Process 101) wants to lock same object, but Process B can not lock the same object because that object is already locked by Process 100.

    At this time if look at the result of sp_who2, you will notice that process 101 is locked by process 100. As soon as process 100 is completed or you explicitly kill process 100 it releases the lock, then process 101 will start executing.

    There are number of locks like shared lock, exclusive locks, update locks etc. I have just provided a very basic idea of blocking to start with, however, this is big concept in itself not only limited to blockings but also includes locking, deadlocks, various isolation levels etc.

    Hope this will help to understand.

    Swarndeep

    http://talksql.blogspot.com

  • Always there is a reason for blocking. The blocking happens for the time when the process is active and runnable. You need to point out why the process is runnable for long time. There might be poor query/joins, you need to verify the query and optimize it if possible. Add nolock to queries, if possible.

    If blocking is because of hardware, there might be CPU bottlenecks, you need to check CPU usage for that. There might be memory bottlenecks, for that you need to confirm if the memory allocated to SQL Server is enough. There might hardware issues, like latency in writing and reading, than you need better IO devices or controllers.

    There could be some jobs running in parallel to the queries which are consuming resources, you may check that too.

    It is not easy to identify bottleneck easily, but is possible enhance the performance to avoid blocking.

    Swarndeep

    http://talksql.blogspot.com

  • http://support.microsoft.com/kb/271509

    http://www.databasejournal.com/features/mssql/article.php/3422471/Monitor-Blocking-in-SQL-Server-2000---Part-1.htm

    http://www.sqlservercentral.com/articles/Performance+Tuning/67134/

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Hi

    This is Jayapal reddy

    i was read u r ans for blocking.it is good to understood about blocking

    i need a small help.

    am new to server 2005

    plz give me wat is the processes to avoid blocking in realtime senarios

    plz help me

    Regards,

    Jayapal

  • Jaypal,

    Start a new thread for your question.

  • Hi Deepa,

    how ?

  • Pls use add topic link below

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply