cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC RECEIVER ADAPTER ISSUE ..

Former Member
0 Kudos

I am unable to update the records in sql database .. the structure and primary keys are everything fine .. when i am trying to update one single record it was getting updated ..

the error was ...: Violation of PRIMARY KEY constraint 'PK_MCHB'. Cannot insert duplicate key in object 'dbo.MCHB'. The duplicate key value is (300, 000000000001000670, 1106, ML01, 10600104, 20160224).

awaiting for valuable answers from the experts ..

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi all ,

Awaiting for answer for the track post .. Kindly do needful any one please ..

Even to day also there are so many messages are in error status .. and I am having following quires in parallel ..

1. If any limitation for JDBC adapter for happening update_insert operation.

2. why at run time the action is changing in CC level (while see the message continent XML payload at run it will show as update_insert only But in error it was showing as follow ...

"JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'LIPS' (structure 'Table'): com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'PK_LIPS'. Cannot insert duplicate key in object 'dbo.LIPS'. The duplicate key value is (300, 0101800049, 000040)."


Regards,

Azmath.

former_member312864
Active Participant
0 Kudos

Hello,

Try using one parameter in receiver JDBC adapter comm channel configuration advanced tab . You can check the actual query in comm channel log which will help you to understand the problem.

Parameter : logSQLStatment   

value : true

Kind Regards,

Sarojkanta Parida

iaki_vila
Active Contributor
0 Kudos

Hi Shaik,

If you are using UPDATE_INSERT and MS SQL DB there is a known issue (Q19 in  831162 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 / PI 7.3 JDBC Adapter )

From the DB they have to do: `CREATE UNIQUE INDEX TEST_INDEX ON TEST(id) WITH IGNORE_DUP_KEY; `

Regards.

AbdulHammed
Explorer
0 Kudos

Hi Azmathulla,

As per my knowledge when you get this error either because the value is a duplicate in the source data, or because your query produces duplicate rows because of an incorrect join condition.

vadimklimov
Active Contributor
0 Kudos

Hi Shaik,

Can you check that you perform an update operation and not insert? From the error details, it looks like PI attempts to insert an entry instead of updating it.

Regards,

Vadim

Former Member
0 Kudos

Hi Vadim,

Thanks for earliest reply ...

As per the log insert only happening . . But I am maintaining in message action as "update_insert" only .....I did cache refresh also .But no luck ...