Home » Microsoft » 70-487 » 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 maintain data integrity including retrieving identical sets across reads in all situations that use transactions.
Which isolation level should you use?
A. Repeatable
B. Serializable
C. ReadUncommitted
D. ReadCommitted
Correct Answer: A
Explanation/Reference:
REPEATABLE READ
Specifies that statements cannot read data that has been modified but not yet committed by other transactions and that no other transactions can modify data that has been read by the current transaction until the current transaction completes.
The answer is wrong.
The correct answer is B: Serializable.
Serializable isolation level prevents phantom reads which are retrieving identical sets across reads.
See https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/transaction-isolation-levels?view=sql-server-2017