SQLTeam.com | Weblogs | Forums

Update with LOCK - help me

sql2014

#1

Good morning and good luck to all,
SQL 2014:
I have this problem:
from my procedure in TSQL update the table TEST and where there is the PK of the table and so everything is right;
If I try, from another session, to update the same table TEST, with a PK different course, it should not be left waiting for the procedure in terms TSQL;
What's even stranger is that only with the Table TEST makes me, with other tables works great.
Look kindly vs.


#2

That is strange.

I'd verify that someone didn't set "ALLOW_ROWS_LOCKS = OFF" on that index, although it's 99.9999% sure they did not.

Also verify that you're using the normal READ COMMITTED transaction isolation level.

When it's locked, issue a:
SELECT * FROM sys.dm_tran_locks WHERE resource_associated_entity_id = OBJECT_ID('TEST')
and see if you have resource_type of KEY or only OBJECT, and whether the request_mode has an X (exclusive) in it.

Sorry, I know this is very technical but this is a strange lock.


#3

Hello Scott,
this is my test:


what do you think ( it's very important for me, tahnks )