Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JDBC adapter - update statement

I have come to the conclusion that there is no direct connection between the select and update statement of a sender JDBC adapter, in terms of commit scope.

According to SAP documentation:

"The UPDATE statement must alter exactly those data records that have been selected by the SELECT statement. You can ensure this is the case by using an identical WHERE clause. (See Processing Parameters, SQL Statement for Query, and SQL Statement for Update below)."

But my point is: if select statement retrieves e.g. 5 rows based on a where condition, then the update statement could find 6 rows to update, if a row was inserted a split second after the select, but before the update. Result : a row is lost...

I don't think the select statement puts a lock on the table(s) it accesses, and releases this lock after update has been committed. This would ensure integrity between select and update statement.

Can anybody confirm or deny this ?

Former Member
replied

Hi,

Have you seen the<b> Isolation level for Transaction handling</b> in the sender JDBC adapter?

Make the Isolation level as Serializable and repeatable Read and the db gets locked anbd until Update happens, no Insertion can occur in the Split Second!

http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm

Regards,

Bhavesh

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question