PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

A.
ReadCommitted

B.
Serializable

C.
Repeatable

D.
ReadUncommitted

12 Comments on “Which isolation level should you use?

  1. Angelo says:

    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




    2



    0
  2. Daniel says:

    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.




    4



    0
  3. Psehgaft says:

    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.




    1



    0
  4. bob says:

    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.




    0



    0

Leave a Reply