nerdexam
Microsoft

70-465 · Question #65

You need to recommend a change to USP_3 to ensure that the procedure continues to execute even if one of the UPDATE statements fails. Which change should you recommend?

The correct answer is A. Set the XACT_ABORT option to off.. This question tests knowledge of SQL Server session options that control transaction behavior when a runtime error occurs. Specifically, XACT_ABORT determines whether a transaction is automatically rolled back when a statement error occurs.

Submitted by viktor_hu· Mar 5, 2026Design and implement database solutions for SQL Server

Question

You need to recommend a change to USP_3 to ensure that the procedure continues to execute even if one of the UPDATE statements fails. Which change should you recommend?

Options

  • ASet the XACT_ABORT option to off.
  • BSet the XACT_ABORT option to on.
  • CSet the IMPLICIT_TRANSACTIONS option to off.
  • DSet the IMPLICIT_TRANSACTIONS option to on.

How the community answered

(30 responses)
  • A
    73% (22)
  • B
    7% (2)
  • C
    17% (5)
  • D
    3% (1)

Why each option

This question tests knowledge of SQL Server session options that control transaction behavior when a runtime error occurs. Specifically, XACT_ABORT determines whether a transaction is automatically rolled back when a statement error occurs.

ASet the XACT_ABORT option to off.Correct

When XACT_ABORT is OFF (the default), SQL Server only rolls back the individual statement that caused the error, allowing the stored procedure to continue executing subsequent statements. This means if one UPDATE fails, the procedure will handle the error at that statement level and proceed to the next UPDATE rather than terminating the entire batch or transaction.

BSet the XACT_ABORT option to on.

Setting XACT_ABORT to ON causes SQL Server to automatically roll back the entire current transaction and terminate the batch whenever a run-time error occurs, which would stop execution of the procedure rather than allowing it to continue after a failed UPDATE.

CSet the IMPLICIT_TRANSACTIONS option to off.

IMPLICIT_TRANSACTIONS OFF means each statement runs in autocommit mode unless explicitly wrapped in a transaction, which does not directly address whether the procedure continues executing after an individual UPDATE statement fails.

DSet the IMPLICIT_TRANSACTIONS option to on.

Setting IMPLICIT_TRANSACTIONS to ON causes SQL Server to automatically start a transaction for DML statements, but this does not allow the procedure to continue executing after a failed UPDATE; it controls transaction scope, not error-continuation behavior.

Concept tested: SQL Server XACT_ABORT session option error handling

Source: https://learn.microsoft.com/en-us/sql/t-sql/statements/set-xact-abort-transact-sql

Topics

#T-SQL transactions#XACT_ABORT#Error handling

Community Discussion

No community discussion yet for this question.

Full 70-465 Practice