nerdexam
Microsoft

70-465 · Question #145

You need to implement changes to the system to reduce contention and improve performance of the SalesOrderDetail table. Which three actions should you perform? Each correct answer presents part of…

The correct answer is A. Use (SNAPSHOT] hints in the report queries B. ALTER DATABASE [ProdDB] SET READ_COMMITTED_SNAPSHOT ON F. SET TRANSACTION ISOLATION LEVEL SERIALIZABLE. To reduce contention on SalesOrderDetail, you need to enable Read Committed Snapshot Isolation (RCSI) at the database level, use SNAPSHOT hints for report queries to read committed versions without blocking, and use SERIALIZABLE isolation for update transactions to ensure data…

Submitted by amina.ke· Mar 5, 2026Design and implement database solutions for SQL Server

Question

You need to implement changes to the system to reduce contention and improve performance of the SalesOrderDetail table. Which three actions should you perform? Each correct answer presents part of the solution. Choose three.

Options

  • AUse (SNAPSHOT] hints in the report queries
  • BALTER DATABASE [ProdDB] SET READ_COMMITTED_SNAPSHOT ON
  • CALTER DATABASE [ProdDB] SET READ_COMMITTED_SNAPSHOT OFF
  • DSET TRANSACTION ISOLATION LEVEL SNAPSHOT
  • EUse (TABLOCK) hints in the report queries
  • FSET TRANSACTION ISOLATION LEVEL SERIALIZABLE
  • GALTER DATABASE [ProdDB] SET ALLOW.SNAPSHOT ISOLATION ON
  • HUse (SNAPSHOT] hints in the update statements

How the community answered

(35 responses)
  • A
    71% (25)
  • C
    3% (1)
  • E
    17% (6)
  • G
    6% (2)
  • H
    3% (1)

Why each option

To reduce contention on SalesOrderDetail, you need to enable Read Committed Snapshot Isolation (RCSI) at the database level, use SNAPSHOT hints for report queries to read committed versions without blocking, and use SERIALIZABLE isolation for update transactions to ensure data integrity.

AUse (SNAPSHOT] hints in the report queriesCorrect

Using SNAPSHOT hints in report queries directs those queries to read row versions from the tempdb version store rather than acquiring shared locks, eliminating read-write contention on the SalesOrderDetail table without requiring changes to the update transactions.

BALTER DATABASE [ProdDB] SET READ_COMMITTED_SNAPSHOT ONCorrect

ALTER DATABASE SET READ_COMMITTED_SNAPSHOT ON enables the RCSI database-level option, which activates the row versioning infrastructure in tempdb required to support snapshot-based reads, allowing SNAPSHOT hints in queries to function correctly and reducing blocking.

CALTER DATABASE [ProdDB] SET READ_COMMITTED_SNAPSHOT OFF

ALTER DATABASE SET READ_COMMITTED_SNAPSHOT OFF disables RCSI, which is the opposite of what is needed; this would prevent row versioning from being used and increase contention rather than reduce it.

DSET TRANSACTION ISOLATION LEVEL SNAPSHOT

SET TRANSACTION ISOLATION LEVEL SNAPSHOT enables snapshot isolation at the session level for DML statements, but the solution requires SERIALIZABLE isolation for updates to ensure data integrity, not SNAPSHOT isolation which can cause update conflicts.

EUse (TABLOCK) hints in the report queries

The TABLOCK hint forces a table-level lock on the target table, which would severely increase contention by blocking all other readers and writers for the duration of the query, directly contradicting the goal of reducing contention.

FSET TRANSACTION ISOLATION LEVEL SERIALIZABLECorrect

SET TRANSACTION ISOLATION LEVEL SERIALIZABLE on the update transactions ensures that the update operations acquire range locks to prevent phantom reads and maintain the highest level of consistency, protecting data integrity while the report queries use snapshot reads to avoid contention.

GALTER DATABASE [ProdDB] SET ALLOW.SNAPSHOT ISOLATION ON

ALTER DATABASE SET ALLOW_SNAPSHOT_ISOLATION ON enables snapshot isolation at the database level but does not enable the row versioning needed for READ_COMMITTED_SNAPSHOT behavior; since the solution uses SNAPSHOT hints with RCSI (option B), this separate setting is not required.

HUse (SNAPSHOT] hints in the update statements

Using SNAPSHOT hints in the update statements would cause updates to read from the version store rather than current committed data, which can lead to update conflicts and lost updates, making it inappropriate and potentially harmful for DML operations.

Concept tested: SQL Server snapshot isolation and row versioning for contention reduction

Source: https://learn.microsoft.com/en-us/sql/relational-databases/sql-server-transaction-locking-and-row-versioning-guide

Topics

#transaction isolation levels#READ_COMMITTED_SNAPSHOT#concurrency#performance tuning

Community Discussion

No community discussion yet for this question.

Full 70-465 Practice