Running SQL Scripts Concurrently

I have several SQL scripts that need to run  to prep data for a final script.  How can I run the pre-process scripts concurrently?  Then how can I determine when they have completed so I can launch the final processing script?

Thanks.

J

  • You need to look into PowerShell jobs. Specifically these three commands:

    • Start-Job  # used to initiate a background job.  you can start as many as you like provided the box you run them has enough RAM
    • Get-Job  # this is used to check the status of any jobs you've initiated in a given PS console
    • Receive-Job # this is used to access the data returned by your jobs.  I's buts to use the  -Keep switch with this command otherwise, output gets flushed from memory.