You are developing an ASP.NET MVC application that reads and writes data from a SQL
Server database.
You need to prevent the application from reading data that is locked by other transactions.
You also need to prevent exclusive range locks.
Which isolation level should you use?
A.
ReadCommitted
B.
Serializable
C.
Repeatable
D.
ReadUncommitted
WRONG again
You got a correct answer to share with the rest of us?
I think the answer for this is A
Answer is A.
I still think it’s option D.
The question states :
– “an ASP.NET MVC application that reads and writes data”
– “You need to prevent the application from reading data that is locked by other transactions.”
==> A write transaction results in an exclusive lock.
==> A ReadCommited is locked by definition when it tries to get on SharedLock on a resource that is already Exclusively Locked.
A
You need to prevent the application from reading data that is locked by other transactions.
It’s A: readcommited: https://msdn.microsoft.com/en-us/library/tcbchxcb(v=vs.110).aspx
Unfortunately neither in comments is correct one.
It’s B Serializable as this is only one matching requirement of preventing exclusive range logs:
https://docs.microsoft.com/en-us/sql/t-sql/statements/set-transaction-isolation-level-transact-sql