Free2Code
 
Time: 2008-11-21, 09:22pm
MSSQL Profiler and Deadlocks
Subject: MSSQL Profiler and Deadlocks  ·  Posted: 2005-12-07, 09:13am
Rank: ? (1)
Member #: 26025
I'm taking over in replacement of someone who got fired and has apparently not done much troubleshooting. I am running into issues with deadlocks on a daily basis with the data entry team here at my work. I don't know much about MS applications as I studied on linux systems. I have found enough information to lead me to the MSSQL Profiler adn started monitoring for deadlocks. This is nice, but I need a bit of help figuring out what i can do to dig into the sql that is actually causing these deadlocks. (or any other means to help me fix the issue)

Thanks in advance for your adivice.


 
  Reply to this ·  Post link ·  Top
Subject: Re: MSSQL Profiler and Deadlocks  ·  Posted: 2005-12-12, 06:14pm
Rank: ? (11)
Member #: 25820
So tables are being locked is that it ? Well to perform certain operations you need to lock the table. There is certain amount of locking that you can't avoid. Locking is normal and needed, however it should not affect the productivity of your users. First you need to determine how often is it locking ? Can you single out what queries are being ran when the problem occures ? Those will most likely be querries that are changing the state of the database (update, insert etc) even though I believe, in certain cases select querries might result in lock as well.
There is certain amout of programming improvements that you can make (for example by rewriting the offending querries so that they use temporary tables and lock is not being put on the actuall table). Another option might be to revice the workflow of your data entry people in order to minimize interfirance.
Using MS Profiler is very good idea. Once you figure out the ofending queries, post the code here (if it is not confedential) and I'll try to help you re-write them.


 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

icons