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 is ReadUncommitted the right answer?
Specifies that statements can read rows that have been modified by other transactions but not yet committed.
https://msdn.microsoft.com/en-us/library/ms173763.aspx
I think it should be readcomitted
READ UNCOMMITTED
Specifies that statements can read rows that have been modified by other transactions but not yet committed.
READ COMMITTED
Specifies that statements cannot read data that has been modified but not committed by other transactions. This prevents dirty reads. Data can be changed by other transactions between individual statements within the current transaction, resulting in nonrepeatable reads or phantom data. This option is the SQL Server default.
refer to this URL:
https://msdn.microsoft.com/en-us/library/ms173763.aspx
Requirement: “You need to prevent(!) the application from reading data that is locked by
other transactions.”
but “Readuncommited” does reads all data.
“Readcommited” is prevented(!) from reading locked data, and I therefore think it is the correct answer.
ReadCommitted is the right answer in similar questions.
The correct Answer is ReadCommitted
READCOMMITTED
Specifies that statements cannot read data that has been modified but not committed by other transactions. This prevents dirty reads. Data can be changed by other transactions between individual statements within the current transaction, resulting in nonrepeatable reads or phantom data. This option is the SQL Server default.
A is correct
ReadCommitted id correct answer
A – ReadCommitted
Agree, A is correct.
Why is Repeatable not also correct. It also doesn’t allow reading records which are exclusively locked by other transactions and also doesn’t issue exclusive range locks.
@bob, “repeatable” is not a valid transaction isolation name, “repetable read” is