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)- A72% (23)
- B3% (1)
- C3% (1)
- D16% (5)
- E6% (2)
Community Discussion
No community discussion yet for this question.