nerdexam
Microsoft

70-457 · Question #10

You create a stored procedure that will update multiple tables within a transaction. You need to ensure that if the stored procedure raises a run-time error, the entire transaction is terminated and…

The correct answer is A. SET XACT_ABORT ON. See the full explanation below for the reasoning.

Question

You create a stored procedure that will update multiple tables within a transaction. You need to ensure that if the stored procedure raises a run-time error, the entire transaction is terminated and rolled back. Which Transact-SQL statement should you include at the beginning of the stored procedure?

Options

  • ASET XACT_ABORT ON
  • BSET ARITHABORT ON
  • CTRY
  • DBEGIN
  • ESET ARITHABORT OFF
  • FSET XACT_ABORT OFF

How the community answered

(32 responses)
  • A
    72% (23)
  • B
    3% (1)
  • C
    3% (1)
  • D
    16% (5)
  • E
    6% (2)

Community Discussion

No community discussion yet for this question.

Full 70-457 Practice