Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Transaction/Locking issues Expand / Collapse
Posted Wednesday, January 8, 2014 8:43 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, November 25, 2015 7:49 AM
Points: 46, Visits: 200
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,

Post #1529192
Posted Thursday, January 9, 2014 12:02 AM



Group: General Forum Members
Last Login: Saturday, December 3, 2016 5:18 AM
Points: 45,619, Visits: 44,147
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

Post #1529212
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse