on 01-21-2011 3:15 PM
I have SOAP to JDBC async scenario.
One source message has multiple line items, each line item converted to separate record and inserted in database table (Using graphical mapping and INSERT command). Receiver database table has composite unique primary key constraint. Due to this, in case of any duplicate record, whole message gets error out in receiver communication channel.
Is there any way, in case of any error due to 'Primary key violation', just ignore that record and continue with next record to insert in database.
Hi Anand More,
For this issue, I do not think you can do something in PI to avoid it. But you can do some changes in Database to solve the issue.
sapnote_0000831162 [Link1|https://websmp206.sap-ag.de/notes] Q: When I construct payload using UPDATE_INSERT, I get Cannot insert duplicate key in object XXX. How do I resolve this?
A: You need to create UNIQUE INDEX for the table with 'IGNORE_DUP_KEY' option.
For instance, if the table name is TEST and its primary key is id, then following statement may be executed using Query analyzer tool.
CREATE UNIQUE INDEX TEST_INDEX ON TEST(id) WITH IGNORE_DUP_KEY
After executing the above command, please re-run the scenario.
Regards,
Raghu_Vamsee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.