0


  Is it possible that a fluctuating DB connection causes insert statement to execute multiple times?
Thanks

1 Answer 1

0

An interrupted client connection can lead up to a scenario where the insert statement executes multiple times. It is possible for the client to miss the commit message. This scenario is documented in the manual: "A crash occurring after a successful write to the log can prevent the success message from returning to the client. In this case the client cannot tell whether or not the transaction committed." If the client is designed to retry in such a scenario, then the insert statement will run twice.

Oracle 12c feature "Transaction Guard" is designed to protect against such a scenario. Transaction Guard guarantees "At-Most-Once Execution".

http://docs.oracle.com/cd/E16655_01/appdev.121/e17620/adfns_trans_idemp_guard.htm#ADFNS8000

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.