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

Transaction/Locking issues Expand / Collapse
Author
Message
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: Thursday, October 2, 2014 9:01 AM
Points: 36, Visits: 124
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

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


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 6:05 AM
Points: 40,258, Visits: 36,681
Any chance of seeing the code and the table definitions?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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