cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Sender - Different number of records selected and updated.

Former Member
0 Kudos

Hi people,

We have a JDBC -> Abap proxy scenario. The JDBC sender is pooling an Oracle database to retrieve data from a table X, each 30 minutes. The select and update statements in jdbc sender are below

SELECT FIELD1, FIELD2, FIELD3 FROM MY_TABLE WHERE STATUS = 1
UPDATE MY_TABLE SET STATUS = 2 WHERE STATUS = 1

Sometimes the message sent to Abap proxy has, for example, 400 records. Looking at runtime workbench, message monitoring, for the same message there is a log like this

Channel SENDER_JDBC_CHANNEL: Query executed successfully. Start update

Channel SENDER_JDBC_CHANNEL: 510 row(s) updated successfully

Someone has already experienced something like this? How can I handle this to guarantee to update only those read records?

regards.

roberti

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

In Sender JDBC adapter, Advanced Mode, check Transaction Isolation Level ... set it to serializable and test again

Former Member
0 Kudos

Thank you Mugdha,

It seems to be exactly this, I had changed this parameter yesterday night and today I found that this solved the issue. Thanks for your rapid response.

cheers!

roberti

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Roberti,

Use SELECT FOR UPDATE instead of pure SELECT.

Also refer sap notes 831162 point no. 8

-regards

Shamly

Former Member
0 Kudos

Thank you Shamly,

This note seems to be really usefull. Thnaks for your rapid help.

cheers!

roberti

Former Member
0 Kudos

Hi All,

Even we are facing the same problem.

In our scenario, receiver is SAPR3. (IDOC)

Will this parameter serialization work in our case?

1. SELECT XBLNR, WERKS, MATNR, MDV01, BACKFLQUANT, STATUS, SAPTIMESTAMP, PITSTIMESTAMP, PMTIMESTAMP, BATCH FROM PMBPITS.PITS_UNITY WHERE STATUS = '01' and rownum<200 .

2. UPDATE PMBPITS.PITS_UNITY SET STATUS = '02' , SAPTIMESTAMP = sysdate WHERE STATUS = '01' and rownum<200 ( currently the value is rownum < 5 )

Thanks!!

Regards

Gouri