on 10-19-2011 12:43 AM
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 .
>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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.