Friday, March 23, 2012

How to run multiple jobs in parallel

I have five SQL jobs that I want to run at the same time to save time.
Running them in serialization costs me lot of time so running in parallel is
choice I have. However, they all need to run after 5 DBs are restored. So, I
created one job that does all the restore for these 5 DBs one after another
on nightly basis. So far so good. Now I want to run all these 5 jobs in
parallel so that they all start at the same time to save me lot of time.
Example: I have total of 6 jobs.
Restore All DBs
Step 1: Restore DBCA
Step 2: Restore DBNY
Step 3: Restore DBNJ
Step 4: Restore DBTX
Step 5: Restore DBHI
I have other 5 jobs like this:
1. ProcessDBCA
2. ProcessDBNY
3. ProcessDBNJ
4. ProcessDBTX
5. ProcessDBHI
I need to start running these 5 jobs in parallel as soon as all 5 steps from
job 1 are finished.
Any suggestions.
Thanks in advance.DTS Package can be used to run activities in parallel. So, you can create a
DTS Package, and execute it from the SQL Job.
"Mark" wrote:

> I have five SQL jobs that I want to run at the same time to save time.
> Running them in serialization costs me lot of time so running in parallel
is
> choice I have. However, they all need to run after 5 DBs are restored. So,
I
> created one job that does all the restore for these 5 DBs one after anothe
r
> on nightly basis. So far so good. Now I want to run all these 5 jobs in
> parallel so that they all start at the same time to save me lot of time.
> Example: I have total of 6 jobs.
> Restore All DBs
> Step 1: Restore DBCA
> Step 2: Restore DBNY
> Step 3: Restore DBNJ
> Step 4: Restore DBTX
> Step 5: Restore DBHI
> I have other 5 jobs like this:
> 1. ProcessDBCA
> 2. ProcessDBNY
> 3. ProcessDBNJ
> 4. ProcessDBTX
> 5. ProcessDBHI
> I need to start running these 5 jobs in parallel as soon as all 5 steps fr
om
> job 1 are finished.
> Any suggestions.
> Thanks in advance.|||Thanks for the response.
Any sample code or direction to a whitepaper will be really helpful
"Absar Ahmad" wrote:
> DTS Package can be used to run activities in parallel. So, you can create
a
> DTS Package, and execute it from the SQL Job.
> "Mark" wrote:
>|||There is plenty of information in BOL. Please search for following topics:
DTS, overview
Creating DTS Package Objects and Connections
Creating DTS Package Workflow and Tasks
You can also look for the sub-titles under the following titles in the BOL:
DTS packages
DTS Designer
Best Wishes,
Absar
"Mark" wrote:
> Thanks for the response.
> Any sample code or direction to a whitepaper will be really helpful
> "Absar Ahmad" wrote:
>

No comments:

Post a Comment