Which isolation level should you use?

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?

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



Leave a Reply 7

Your email address will not be published. Required fields are marked *


esmail

esmail

Why D
why not A

Bob

Bob

This is wrong, its A

dd

dd

“You need to prevent the application from reading data that is locked by other transactions” Makes ReadUncommitted unsuitable

Sunil

Sunil

D is the right answer.

Jesus

Jesus

Right answer is A.

Sumit

Sumit

A is right answer

chilly

chilly

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.