cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Adapter - database lock

Former Member
0 Kudos

Hi all,

I have a scenario where we call a stored procedure on a Sybase database with a jdbc adapter. After the adapter picks up the data it should delete the records as a post processing step.

Can I be sure, that the database is securely locked until the jdbc adapter finishes with its post processing step? I am afraid, that after the stored procedure is done, data can be written to the database again before the post processing step of the jdbc adapter is executed. In a worse case scenario could this mean the loss of data.

Do you have any advice?

Thanks

Cornelius

Accepted Solutions (1)

Accepted Solutions (1)

former_member431549
Contributor
0 Kudos

We had problem with the update statement updating more rows than the select retrieved, even though SAP documentation says this will not happen.

We changed all of our sender jdbc channels to use a stored procedure and have the stored procedure do the update. This is the approach I would suggest, and since you are already using a stored procedure, it should be easy change.

Answers (2)

Answers (2)

justin_santhanam
Active Contributor
0 Kudos

Cornelius,

You want to select the data and delete it once its done. Am I right? In the sender comm.channel u have the <b>Query SQL Statement</b> & <b>Update SQL Statement</b> . Once the selected the data usinf query sql statement, it will use the update sql statement to delete the processed fields immediately once it done.

Is it helpful? If not please reply back.

Best regadrs,

raj.

VijayKonam
Active Contributor
0 Kudos

Hi,

Considering your JDBC adapter is working on the sender side, after selecting the records, you must be updating the flag value to something to differentiate the processed records. In this case, you can change the flag field to some intermediate value, where in the post production activity only deletes these intermediate flag value records, thus eliminating the fear of deleting unprocessed records.

VJ