Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2014

    Unanswered: Simultaneous processing of an Update procedure


    I have a database on that there are nearly 1000 tables each having 1000+ records. Now I am trying to update all these records on all these tables.
    My requirement is I already created one dynamic update procedure & these 1000 tables has to be segregated as 10 process(each process contain 100 tables). I am thinking to run these 10 process simultaneously with that update procedure running 10 times .I mean all these 10 process has to run parallel irrespective of one another.

    Can some one give me an outer view how this can be possible on db2luw.

  2. #2
    Join Date
    Apr 2012
    Provided Answers: 27
    That is a programming question - it is not a db2 question.

    You can use different approaches: either a multiple-process solution or a multiple thread solution.

    With either solution you have to ensure that the db has sufficient resources and that you have relevant backups and proven restore capability.
    With either solution the code has to be robust and capable of anticipating, detecting and handling and reporting all of the likely errors.

    A single db2-connection can synchronously call a single sproc at a moment in time. Here are two approaches:

    (1) A shell-script can have a single type-1 db-connection. It's easy to parameterise and parallelise shell-scripts on unix like environments. Tools like ppss can help optionally. A competent scripter will script stuff like this in a very short time.

    (2) A suitably designed app that is multi-threaded can spawn multiple-threads each with its own db-connection and in that thread process a specific group of tables, and all threads run concurrently. This is more expensive to write and test and debug, but arguably has a finer degree of control, and if done in java then can be run on different operating-systems if that is a requirement.

  3. #3
    Join Date
    Jul 2014
    Thank You. On Iseries I can run these as jobs. I don't know the complete Db2luw. So, just to initiate my thoughts , made it.
    I will follow the way you mentioned.
    Its a great help .

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts