on 09-12-2008 8:56 AM
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
Hello Nicolas,
Set the Isolation level to Serializable
regards
Gangaprasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
internaly Jdbc adpter will committ already.
so check is there duplicate records in your table persist
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
80 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.