Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 845

inserting data to multiple DB tables sequentially

$
0
0

Hi Gurus,

 

I am writing my requirement and also my approach to achieve; could you please validate and share your thoughts:

 

Requirement: To insert data to multiple database tables say 8 tables in a sequential manner. If by any chance the insertion is failed in 3rd table then it should revert back or do not commit the records in the first two tables. In other way, commit should happen on all DB tables only when the insertion is successful on all 8 tables.

 

Approach: Create multiple target statement(one statement for each table) and do multiple inserts using different receiver interfaces. In ICO, check the maintain order at runtime, and create only one receiver comm.channel. This way if any of the insertion fails, commit will not happen in DB table.

 

Please let me know if my understanding is correct and request to share if any better approach.

 

Thank You...


Viewing all articles
Browse latest Browse all 845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>