Rakesh yadav
Rakesh yadav

Reputation: 29

Repeatable reads transaction level

-- TRANSACTION 1 set transaction isolation level REPEATABLE READ BEGIN TRANSACTION select name from student where id=1 waitfor delay '00:00:15' update Student set name='abc' where id=1 commit transaction

-- TRANSATION 2 SET TRANSACTION ISOLATION LEVEL REPEATABLE READ BEGIN TRANSACTION waitfor delay '00:00:01' update Student set name='xyz' where id=1 commit transaction

I run the transaction1 later transaction2 so first it will be locked for transaction1 and transaction2 should fail but its happening reverse Transaction2 is successfull and transation1 is failed

Upvotes: 0

Views: 7

Answers (0)

Related Questions