Page 1 of 1

Calling Unix script in parallel from multiple jobs

Posted: Wed Nov 24, 2010 2:05 am
by srai
Hi Team,

We have a UNIX script which read data from database (Teradata) and make the entries in a table.

We are calling same script in more than 100 datastage jobs and those jobs are running in parallel.

Just want to know that if we run the jobs in parallel do we face any issue?

If there is any issue with parallel excution of script Do we need to put any command in UNIX script or in datastage job while calling the script so that it can be executed in parallel.

Regards,
Santosh

Posted: Wed Nov 24, 2010 3:50 am
by ArndW
UNIX scripts can be run in parallel. What we cannot guess is exactly what SQL you are using in your script and if that might have problems running in parallel. Can you specify "for read only" in Teradata SELECTs so that no update locks are taken?

Posted: Thu Nov 25, 2010 12:18 am
by srai
ArndW wrote:UNIX scripts can be run in parallel. What we cannot guess is exactly what SQL you are using in your script and if that might have problems running in parallel. Can you specify "for read only" in Teradata SELECTs so that no update locks are taken?
Actually Unix is reading from a teradata table and after execution it is updating the Audit table based on the Job Audit id column.
But when we execute multiple jobs in paralle there will be multiple update statement getiing executed at DB level.

Posted: Thu Nov 25, 2010 2:06 am
by ArndW
In that case you need to ensure that you don't get deadlocks when running your script in parallel by either committing everything immediately and/or by using different records in each script.

Posted: Sun Nov 28, 2010 2:25 am
by dsa
Hi,

You have marked this topic as resolved. Could you please let us know how did you make sure that deadlock situation doesn't come?