Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Transaction/Locking issues


Transaction/Locking issues

Author
Message
karend211 34657
karend211 34657
SSC Rookie
SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)

Group: General Forum Members
Points: 46 Visits: 200
Hi,
I've been having issues with a process aquiring a lock on a table and blocking any other process that attempts to access it. I am dealing with a very old third party system, all embedded sql from the app on a sql server 2005 x64 SP2.

When I look at dm_tran_locks, I see there is an IX request mode lock on a table, two key locks with X request mode and one page IX request mode... page & key locks are on the same table. When in the activity monitor, I find the head lock & right click on details to view the sql statement causing the lock... the sql statement does not involve in any way the table that the head blocker process has locked, in fact the sql is not an update or insert it is a simple select statement.

When I look in dm_tran_active_transactions, I see the transaction in there with the begin time of 4 hours earlier and the state as active.

What am i missing here, how is this sql statement aquiring a lock on a table that is not part of the select statement?
I appreciate any help with this,
Thank you,
kjd
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47143 Visits: 44346
Any chance of seeing the code and the table definitions?


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search