Question

I'm investigating a deadlock and I see in deadlock xml file from profiler that process process5332cf8 runs transaction under Snapshot isolation level (isolationlevel="snapshot (5)").

But somehow it holds IX lock on a page and wants to take another one.

What can be the reason for this (except that isolation level was changed to non-snapshot in the middle of thansaction which is not likely to happen ) ?

Am I missing something about Snapshot IL ?

PS: the full xml: http://ideone.com/yuU9td

Was it helpful?

Solution

Writes always take locks. IX is a write lock. As for the other processes (the two SELECTs, process process6593498 and process5cc1498) they are under read committed.

If you want to avoid contention with snapshot isolation your must use it for your read transactions first of all.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top