Kye
Kye

Reputation: 107

What is isolation level, when 2 concurrent transaction trying to change it

I have two transaction working on same table.

BEGIN TRAN
SET TRAN ISOLATION LEVEL SERIALIZABLE
--something more

and second one

BEGIN TRAN
SET TRAN ISOLATION LEVEL REPEATABLE READ
--something more

will be they working together on one of this level, or will be working on their own level ? What happend if one of this isolation level will be snapshot ?

Upvotes: 2

Views: 1114

Answers (1)

Damien_The_Unbeliever
Damien_The_Unbeliever

Reputation: 239636

SET TRANSACTION ISOLATION LEVEL affects the connection it's called on.

It specifies what this connection will tolerate, what locking strategies this connection will use, etc. If another connection uses a different isolation level, both levels are "in effect" at the same time, for their respective connections. To understand how they'd interact, you need to consider them from each connection's perspective individually.

Upvotes: 4

Related Questions