Why the DB update always fail

Hi , professions :
I have flow service which will update about 10000 records to a table . I loop 10000 times to finish it . It’s OK when I run it manually . But the loop always break up in a schedule . Any suggestion from you guys?

Why do you want to update 10.000 records? What is the context of what you wish to achieve with this? Maybe there are other options. This isn’t a very wise thing to do as each service is seen as a transaction of no explicit transactions are used.


I have a service which use recordset as input and output parameters , I want to write to output back to table which contains the input data for log viewing . I use update , so how many rows I input , how many times I execute the update . And the DB connection often corrupts in the execution .

If you meant to use a Java recordset to do this, that would not be a good idea. Not only do you need to keep the connection to the DB open, but you will have a constant memory load of all 10.000 records.
Isn’t there a way to process them in sequence or to move the processing to the Dbserver using a stored procedure?

Can you give some functional info on your assignment so we might be able to think of a higher level solution to this issue? What is it you actually have to do with the 10K records? Are you using core Java for db access of db adapter services?


Hi , Chris
As I mentioned before , I have 10k records in a table , after handled by another program , I get another 10k records about the result information . I have tried to write these 10k information back to that table to generate a report , so I have to update the records one by one . Now I have another solution , I write the 10k information to a file first and import to another table directly . My report can be generated from these 2 tables . It’s 10 times faster that before and stable . You guys have better suggestion ?

Can you show the fields for the table. Also, are there any unique keys on the table. You may be able to use the dynamicSql call in WM and save time from having to access the disk. If you want to try to pause between each update call, you can also use a “repeat” step with no body and have it loop “1” time on “success” with a “1” second backoff delay, so that will act as a pause. This will make your service horribly slow, but possibly more stable at the same time. Try without the pause first though.

Good day.

Hi, Yemi :
I don’t know exactly about the dynamicSql call you mean , I used to invoke the “execsql” in the WMDB package , so I can only update one by one . And this usually lead to the DB connection break , so I switch to file data importing .