Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

Problem in stored Procedure to make database consistance.

$
0
0

Hi Experts,

I am facing an issue when trying to post data in database table by stored procedure. Suppose in one message the stored procedure is calling for 5 times as it has five repeated segment for StatementName and first call is inserting data in header table and next four calls are inserting data in detail table. Now in the four records insertion in detail table, one has bad data(say the last segment), so the stored procedure has failed. But what is happening, the stored procedure is inserting one record in header table and three records in detail table and for fourth it is failing in communication channel. And with a time interval again the whole message is trying to execute in database side and again inserting one record in header table and three records in detail table and for fourth it is failing in communication channel. and so on. What I need to do to make the database consistent, I need to fail the whole message, means either insert all the records in header and detail table or not a single record should be inserted in database.

 

How I can achive this?

 

Thanks,

Anirban Dutta.


Viewing all articles
Browse latest Browse all 7030

Trending Articles



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