Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 LOCK ESCALATION

Author  Topic 

niranjankumark
Posting Yak Master

164 Posts

Posted - 2008-04-02 : 00:35:57
Deletion statement with not in clause will escalate table loack or any kind of lock ???

Suppose i am selecting one table.It has locked at that time. is it possible to find what kind of lock occured on this scenario ?. SQL SERVER STORES THIS ANY TABLE ???

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-04-02 : 09:20:30
In activity monitor you can see.Or with sp_lock
Go to Top of Page

tal.olier
Starting Member

1 Post

Posted - 2008-04-03 : 12:13:34
Check the resource_type within:

select object_name(tl.resource_associated_entity_id%2147483647) obj, tl.request_session_id , tl.request_mode, tl.request_status,
tl.resource_type, object_name (pa.object_id) owner_obj, pa.index_id, pa.rows, tl.resource_description
from sys.dm_tran_locks tl left outer join sys.partitions pa on tl.resource_associated_entity_id = pa.hobt_id
where resource_type not like 'DATABASE'
order by tl.request_session_id, tl.resource_type
go

Tal Olier
--tal.olier@gmail.com
Go to Top of Page
   

- Advertisement -