Home » Microsoft » 70-469 » Which change should you recommend?
You need to recommend a change to USP_3 to ensure that the procedure completes only if all of the UPDATE statements complete.
Which change should you recommend?
A. Set the XACT_ABORT option to off
B. Set the XACT_ABORT option to on.
C. Set the IMPLICIT_TRANSACTIONS option to off.
D. Set the IMPLICIT_TRANSACTIONS option to on.
Correct Answer: B
Explanation/Reference:
* Scenario: A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE statements called in sequence from within a transaction. Currently, if one of the UPDATE statements fails, the stored procedure continues to execute.
* When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire transaction is terminated and rolled back.