Page 1 of 1

Running multiple instance of a job

Posted: Sat Sep 26, 2015 8:57 pm
by udayanguha
Hi All,
I have a multiple instance job which loads data from a table to a file using RCP. I want to run the job for 10 different tables at the same time.How can I do that through
1. Designer and
2. Command line?

Thanks in advance.

Posted: Sat Sep 26, 2015 9:56 pm
by chulett
What kind of advice are you looking for, exactly? You launch one after the other, using unique Invocation IDs for each one. From the command line, you include the Invocation ID after the job name with a dot "." separator:

JobName.InvocationID

From the command line you use the dsjob utility, it is well documented and supports everything you can do through the API from the O/S command line.

From the Designer / Director you simply put the Invocation ID in the appropriate property box when you launch it.

You can put intelligence in the ID if you like. For example, use the table name as the Invocation ID might be one possibility and then you can leverage it in the job using the matching macro. Don't have it memorized anymore but should be something like @InvocationID I do believe.

Posted: Sun Sep 27, 2015 11:12 am
by kduke
Running the job is easy as Craig explains. Just learning the syntax of dsjob command.

This is not easily done within the job. Unless each table has the same metadata then this might be very difficult.

Re: Running multiple instance of a job

Posted: Mon Sep 28, 2015 6:55 pm
by ray.wurlod
udayanguha wrote:I want to run the job for 10 different tables at the same time.
Why?

Aren't you concerned that you will overload (a) machine resources and (b) database licensed connections?

To run genuinely simultaneously the job requests must be executed asynchronously, for example by using nohup backgrouound processes. To run at the same time from a sequence job, simply don't link the job activities (though they may have their own triggers linking to downstream activities).