HOLDLOCK with UPDLOCK

前端 未结 3 2166
萌比男神i
萌比男神i 2020-12-31 17:22

It appears using either HOLDLOCK or UPDLOCK in a transaction (say T1), will not block read access from another transaction (say T2).

As I u

3条回答
  •  礼貌的吻别
    2020-12-31 17:45

    Serializable isolation causes a table lock to be taken if the table does not have an appropriate index for the query. HOLDLOCK causes serializable to be the effective transaction isolation level for the table that it is mentioned on.

    This together with the escalation to X that others have mentioned causes the behavior you see.

提交回复
热议问题