Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

blocking Expand / Collapse
Author
Message
Posted Monday, August 24, 2009 4:57 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: 2 days ago @ 2:24 AM
Points: 437, Visits: 1,088
how to understand blocking in sqlserver2000 and how to find solutions?
Post #776368
Posted Wednesday, August 26, 2009 9:41 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, October 15, 2013 8:42 AM
Points: 481, Visits: 318
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
Post #778028
Posted Wednesday, August 26, 2009 9:48 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, October 15, 2013 8:42 AM
Points: 481, Visits: 318
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
Post #778032
Posted Wednesday, August 26, 2009 11:38 PM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, December 12, 2014 12:19 AM
Points: 647, Visits: 1,311
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
*******************************************
There are two types of DBAs. Those who has skills and those who have permissions
Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help
Custom cleanup script for backups
Post #778047
Posted Tuesday, August 31, 2010 12:31 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, June 4, 2014 8:21 AM
Points: 10, Visits: 65
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
Post #977709
Posted Tuesday, August 31, 2010 1:58 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Sunday, April 24, 2011 3:52 AM
Points: 15, Visits: 45
Jaypal,

Start a new thread for your question.
Post #977742
Posted Tuesday, August 31, 2010 2:57 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, June 4, 2014 8:21 AM
Points: 10, Visits: 65
Hi Deepa,

how ?
Post #977772
Posted Tuesday, August 31, 2010 7:06 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, December 12, 2014 12:19 AM
Points: 647, Visits: 1,311
Pls use add topic link below

-- Roshan Joe
*******************************************
There are two types of DBAs. Those who has skills and those who have permissions
Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help
Custom cleanup script for backups
Post #977938
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse