Can you still lock rows exclusively (block readers) in a SQL Server db that has Snapshot Isolation and RCSI enabled?
I want to basically do a xlock, rowlock select on a table.
Can you still lock rows exclusively (block readers) in a SQL Server db that has Snapshot Isolation and RCSI enabled?
I want to basically do a xlock, rowlock select on a table.
Copyright © 2021 Jogjafile Inc.
Yes, you can lock rows exclusively (either using DML or locking hints). But readers also using snapshot isolation will not be blocked because they don't take locks (on data).
After all, not locking and blocking is a prime advantage of snapshot isolation.