cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC sender adapter provides incomplete data

Former Member
0 Kudos

Hi,

I have a JDBC sender adapter which reads data from a MySQL table, and passes it to a proxy which writes the data then in a SAP table.

- Query SQL statement = SELECT Field1, Field2, Field3, Field4 FROM jdbctest WHERE Processed = 'N'

- Update SQL statement = UPDATE jdbctest SET Processed='Y' WHERE Processed='N'

I did a stress test with a program that writes data simultaneously to the MySQL table (up to 10000 records), and the JDBC sender adapter which checks the table every 15 seconds.

At the end, my SAP table contained only 9965 records.

This means that probably there have been records added between the Query and the Update statement (So they haven't been read, but their status is changed).

Does anyone have a solution for this?

Best regards,

Nicolas De Corte

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello Nicolas,

Set the Isolation level to Serializable

regards

Gangaprasad

Former Member
0 Kudos

Setting the parameter Isolation level to Serializable has solved my problem, thanks a lot for the help!

Answers (2)

Answers (2)

dharamveer_gaur2
Active Contributor
0 Kudos

hi nic

i think that i told that first check your database table is there duplicate record exist.

coming towards solution of your problem, do one think update before selecting record. so that record would be committ in database.

your updation only takes place in database when committ done.

for example you might used sql plus of oracle, when we insert record through it. at the end we have to committ otherwise it will not appear in your selection in *next session*

dharamveer_gaur2
Active Contributor
0 Kudos

internaly Jdbc adpter will committ already.

so check is there duplicate records in your table persist

Former Member
0 Kudos

Hello Dharamveer,

I don't really understand your answer.

My point is that the JDBC adapter only processed 9965 records out of 10000, but it updated all 10000.

So now in my MySQL table there are 10000 records with status Processed, but only 9965 have been really processed. And I think this is because records have been added between the execution of query and the update statement.