Question 530
An application team must address both issues before release. A shared lookup function returns different results because it uses an unstated session setting and the client pool has mixed defaults. A stored procedure catches an error yet commits partially completed inventory deductions and returns success to the caller. Which course of action addresses the stated issues?
Explanation
Correct Answer
First, reusable database logic should not silently depend on varying client session state. Second, transactional failure handling must preserve atomicity and communicate that the operation did not complete.
Incorrect Answers
Review whether controlled procedures or a suitable INSTEAD OF trigger provide a supported update interface; use TRY/CATCH with transaction rollback and consistent failure signaling so partial business changes are not reported as committed: reusable database logic should not silently depend on varying client session state.
Make the calculation's assumptions explicit and validate session-sensitive behavior in repeatable integration tests.
Make the calculation's assumptions explicit and validate session-sensitive behavior in repeatable integration tests; Move external side effects to a reliable asynchronous integration path and keep the trigger transaction short: transactional failure handling must preserve atomicity and communicate that the operation did not complete.



Developing AI-Enabled Database Solutions (DP-800) Practice Tests