nerdexam
Microsoft

70-465 · Question #115

You use SQL Azure to store data used by an e-commerce application. You develop a stored procedure named sp1. Sp1 is used to read and change the price of all the products sold on the e-commerce site…

The correct answer is D. serializable. To prevent other transactions from updating product data while sp1 is executing, the SERIALIZABLE transaction isolation level must be used. This level ensures the highest data consistency by blocking concurrent modifications to the dataset sp1 operates on.

Submitted by packet_pusher· Mar 5, 2026Design and implement database solutions for Azure SQL Database

Question

You use SQL Azure to store data used by an e-commerce application. You develop a stored procedure named sp1. Sp1 is used to read and change the price of all the products sold on the e-commerce site. You need to ensure that other transactions are blocked from updating product data while sp1 is executing. Which transaction isolation level should you use in sp1?

Options

  • Aread committed
  • Brepeatable read
  • Csnapshot
  • Dserializable

How the community answered

(66 responses)
  • A
    14% (9)
  • B
    8% (5)
  • C
    3% (2)
  • D
    76% (50)

Why each option

To prevent other transactions from updating product data while `sp1` is executing, the `SERIALIZABLE` transaction isolation level must be used. This level ensures the highest data consistency by blocking concurrent modifications to the dataset `sp1` operates on.

Aread committed

`READ COMMITTED` prevents dirty reads but allows non-repeatable reads and phantom reads, meaning other transactions can still modify or insert rows that `sp1` has read or would read, failing to block updates effectively.

Brepeatable read

`REPEATABLE READ` prevents dirty reads and non-repeatable reads by placing shared locks on data read, but it does not prevent phantom reads (new rows being inserted), so the overall 'product data' set could still be altered by new additions.

Csnapshot

`SNAPSHOT` isolation uses row versioning to allow transactions to read a consistent view of the data without blocking other transactions, meaning it explicitly does not block other transactions from updating data, which contradicts the requirement.

DserializableCorrect

The `SERIALIZABLE` isolation level provides the highest level of isolation. It ensures that any data read by the transaction cannot be modified by other transactions until the serializable transaction completes, and it also prevents other transactions from inserting new rows that would fall into the range of data read by the serializable transaction. This effectively blocks all other updates and insertions to the relevant product data for the duration of `sp1`'s execution.

Concept tested: SQL Server transaction isolation levels

Source: https://learn.microsoft.com/en-us/sql/relational-databases/transactions/set-transaction-isolation-level-transact-sql?view=sql-server-ver16

Topics

#Transaction isolation levels#SQL Azure concurrency#Serializable isolation

Community Discussion

No community discussion yet for this question.

Full 70-465 Practice