Skip to Content
0

How to reprocess in case of failure of multiple table JDBC Insert

Aug 29, 2017 at 09:36 PM

49

avatar image
Former Member

Hi All,

I have a scenario where I am inserting 5 table with the single inteface.

MT_Rever

--Stat1TableInsert

--Stat2TableInsert

--Stat3TableInsert

--Stat4TableInsert

--Stat5TableInsert

How do we reprocess the message when first 3 table inserted successfully but failed while inserting into 4th table. What should be approach to reprocess this?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

avatar image
Former Member Aug 30, 2017 at 04:54 AM
0

Hi Evgeniy,

Thanks for your response. I do agree with you, but I am seeing that if there is some data issue in the 3rd or 4th Insert, all the messages above getting inserted into table before it error out. Is there any setting in the adapter which prevent data to commit in database? I have DB2 as receiver database.

Thanks

Vinay

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Aug 30, 2017 at 07:10 AM
0

Hi Vinay!

You could try this:

Regards, Evgeniy.


Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Aug 29, 2017 at 10:35 PM
0

Hi Vinay!

As far as I know, all statements within one message are processed in single transaction by JDBC adapter. So, if your fourth insert is failed by any reason, transaction in the whole won't be commited.

Regards, Evgeniy.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Vinay ,

Just adding to Eve's suggestion if you are doing insert operation in one table only then its not a good idea of repeating the statment multiple times instead of the create one statement with multiple access node by this a single SQL query is executed on DB with multiple values like :

INSERTINTO MyTable ( Column1, Column2 )VALUES( Value1, Value2 ),( Value1, Value2 )

Br,

Manoj

1

Hi Manoj!

Yes, you're absolutely right. But I guess that insert opertaion is performed upon 5 tables sequentially.

How do we reprocess the message when first 3 table inserted successfully but failed while inserting into 4th table

Regards, Evgeniy.

0