cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC receiver and sender concern

former_member229310
Active Participant
0 Kudos

Hello,

In one of the sender JDBC communication channel we have below queries,

1) Sender comm channel

select * from table1 where flag = ' '

update table1 set flag ='X' where flag = ' '

We are setting the flag to X to identify which entries are read.

Suppose while setting the flag 'X' if the user inserts new values which were not part of my selection during the retrieval then the new entries which are not part of my select query would also be set to 'X'.

2) Receiver JDBC comm channel

file to jdbc

suppose i have 1 file with 100 entries inserting into JDBC table. I see that if there is any error at 50th record during insert then database is not rolling back the 50 records that are updated.

Kindly suggest your inputs .

Accepted Solutions (0)

Answers (3)

Answers (3)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>Suppose while setting the flag 'X' if the user inserts new values which were not part of my selection during the retrieval then the new entries which are not part of my select query would also be set to 'X'.

Basically you need to make setting so that concurrent access to the database server will be avoided. For that you have to go for transaction level serializable (strongest setting)

>suppose i have 1 file with 100 entries inserting into JDBC table. I see that if there is any error at 50th record during insert then database is not rolling back the 50 records that are updated.

This might not be possible. You expect rollback in case of error occured in one record. You might need to correct the data that you send for updates. Insert is failing due to data issues. But you might want to check whether your JDBC drivers supports transaction.

Former Member
0 Kudos

2) Receiver JDBC comm channel

file to jdbc

suppose i have 1 file with 100 entries inserting into JDBC table. I see that if there is any error at 50th record during insert then database is not rolling back the 50 records that are updated.

For this, you can try and set the number of retries in the DB on sql error. Although this will not rollback but will try to retry if the error is due to network or connection issue.

Try exploring Transaction isolation level mentioned by shabarish in the area read_uncommitted and serializable.

Regards

Krish

Shabarish_Nair
Active Contributor
0 Kudos

> Suppose while setting the flag 'X' if the user inserts new values which were not part of my selection during the retrieval then the new entries which are not part of my select query would also be set to 'X'.

Set the Transaction Isolation Level in your adapter to serializable or appropriate strong setting to avoid this issue

refer - http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm