cancel
Showing results for 
Search instead for 
Did you mean: 

Sender JDBC adapter SELECT / UPDATE issue - updates more rows than selected

Former Member
0 Kudos

Hi,

We have configured a Sender JDBC Adapter to poll records from an Oracle table based on a flag field and then update the flag for the selected records. When tested in DEV and QA environments (where test data comes in intermittently and not in huge volumes), itu2019s working fine.

Both SELECT and UPDATE queries written in the Sender JDBC adapter are getting properly executed and are changing the status of the flag for the selected records from Y to N once read from the database.

select * from <table> where flag = 'N'.

update <table> set flag = 'Y' where flag = 'N'.

But in the PROD environment (with records getting updated in the database every second), after XI executes the SELECT query and just before the UPDATE query is executed, new records come into the Oracle table with status flag 'N". So when the UPDATE query runs just after the SELECT query, then these unselected records also get updated to 'Y'. Thus these records never get into the resultset and hence XI and thus remain unprocessed.

So when XI does a SELECT and UPDATE on the Oracle DB table and concurrently there is an INSERT happening into the table from the other end, the JDBC sender adapter is picking up a certain number of records but updating the status of more records than it picked up.

So how does XI deal with such a common scenario without dropping records?

Thanks,

Vishak

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

read point 8 Transaction handling of SAP Note 831162

Former Member
0 Kudos

The condition being checked is the same for both SELECT and UPDATE statements.

Initially I tried setting transaction isolation levels on the database to repeatable_read and serializable but it was throwing me a java.sql.SQLException error saying that these transaction levels were not valid.

I asked for these transaction level permissions for the XI user from my DBA but the DB I am accessing provides only a view into other databases and so it's not possible.