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
Why D
why not A
This is wrong, its A
“You need to prevent the application from reading data that is locked by other transactions” Makes ReadUncommitted unsuitable
D is the right answer.
Right answer is A.
A is right answer
ReadUncommitted:
No shared locks are issued; exclusive locks are not honored. The important implication is that this isolation level can result in a dirty read, which is almost always undesirable.
ReadCommitted:
Shared locks are held during reads. This has the result of avoiding dirty reads, unlike ReadUncommitted. However, the data can be changed before the end of the transaction, resulting in nonrepeatable reads or phantom data.