You use SQL Server 2012 to store data used by an e-commerce application.
You develop a stored procedure named sp1. Sp1 is used to read the price of all the products
sold on the e-commerce site.
You need to ensure that sp1 can read data even while another transaction is modifying the
price of a product. Sp1 must only read committed data.
Which transaction isolation level should you use in sp1?
A.
Serializable
B.
Snapshot
C.
Repeatable read
D.
Read committed
Hello,
B.Snapshot
Not C because REPEATABLE READ ” no other transactions can modify data that has been read by the current transaction until the current transaction completes” is not matching the requirements.
Reference : https://msdn.microsoft.com/en-us/library/ms173763.aspx (SET TRANSACTION ISOLATION LEVEL (Transact-SQL)) “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.”
a+,=)
-=Clement=-