Lock mode considers various lock types that can be applied to a resource that has to be locked:
Exclusive (X)
Shared (S)
Update (U)
Intent (I)
Schema (Sch)
Bulk update (BU)
when i execute this query then i saw IX on request_mode column for Emp1 table. what IX means ?
IX means intent lock or different ?
BEGIN TRANSACTION
UPDATE Emp1 WITH (ROWLOCK,UPDLOCK)
SET name = 'James'
WHERE ID=1
SELECT resource_type, request_mode, resource_associated_entity_id,
object_name(try_convert(int, resource_associated_entity_id)),
COUNT(*) AS [Count]
FROM sys.dm_tran_locks
WHERE request_session_id = @@spid
GROUP BY resource_type, request_mode, resource_associated_entity_id,
object_name(try_convert(int, resource_associated_entity_id))
go
select * from Emp1
ROLLBACK TRANSACTION
screen shot attached
a) UPDATE LOCK place lock on Intent or Rows ?
b) what is difference between row lock and intent lock ?
i used WITH (ROWLOCK,UPDLOCK) row lock and update lock hint but still lock is not placed on row....why?