Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3756026
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:47:19+00:00 2026-05-19T09:47:19+00:00

We have a stored procedure that runs nightly that in turn kicks off a

  • 0

We have a stored procedure that runs nightly that in turn kicks off a number of other procedures. Some of those procedures could logically be run in parallel with some of the others.

  • How can I indicate to SQL Server whether a procedure should be run in parallel or serial — ie: kicked off of asynchronously or blocking?
  • What would be the implications of running them in parallel, keeping in mind that I’ve already determined that the processes won’t be competing for table access or locks- just total disk io and memory. For the most part they don’t even use the same tables.
  • Does it matter if some of those procedures are the same procedure, just with different parameters?
  • If I start a pair or procedures asynchronously, is there a good system in SQL Server to then wait for both of them to finish, or do I need to have each of them set a flag somewhere and check and poll the flag periodically using WAITFOR DELAY?

At the moment we’re still on SQL Server 2000.

As a side note, this matters because the main procedure is kicked off in response to the completion of a data dump into the server from a mainframe system. The mainframe dump takes all but about 2 hours each night, and we have no control over it. As a result, we’re constantly trying to find ways to reduce processing times.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T09:47:20+00:00Added an answer on May 19, 2026 at 9:47 am

    I had to research this recently, so found this old question that was begging for a more complete answer. Just to be totally explicit: TSQL does not (by itself) have the ability to launch other TSQL operations asynchronously.

    That doesn’t mean you don’t still have a lot of options (some of them mentioned in other answers):

    • Custom application: Write a simple custom app in the language of your choice, using asynchronous methods. Call a SQL stored proc on each application thread.
    • SQL Agent jobs: Create multiple SQL jobs, and start them asynchronously from your proc using sp_start_job. You can check to see if they have finished yet using the undocumented function xp_sqlagent_enum_jobs as described in this excellent article by Gregory A. Larsen. (Or have the jobs themselves update your own JOB_PROGRESS table as Chris suggests.) You would literally have to create separate job for each parallel process you anticipate running, even if they are running the same stored proc with different parameters.
    • OLE Automation: Use sp_oacreate and sp_oamethod to launch a new process calling the other stored proc as described in this article, also by Gregory A. Larsen.
    • DTS Package: Create a DTS or SSIS package with a simple branching task flow. DTS will launch tasks in individual spids.
    • Service Broker: If you are on SQL2005+, look into using Service Broker
    • CLR Parallel Execution: Use the CLR commands Parallel_AddSql and Parallel_Execute as described in this article by Alan Kaplan (SQL2005+ only).
    • Scheduled Windows Tasks: Listed for completeness, but I’m not a fan of this option.

    I don’t have much experience with Service Broker or CLR, so I can’t comment on those options. If it were me, I’d probably use multiple Jobs in simpler scenarios, and a DTS/SSIS package in more complex scenarios.

    One final comment: SQL already attempts to parallelize individual operations whenever it can*. This means that running 2 tasks at the same time instead of after each other is no guarantee that it will finish sooner. Test carefully to see whether it actually improves anything or not.

    We had a developer that created a DTS package to run 8 tasks at the same time. Unfortunately, it was only a 4-CPU server 🙂

    *Assuming default settings. This can be modified by altering the server’s Maximum Degree of Parallelism or Affinity Mask, or by using the MAXDOP query hint.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large auditing stored procedure that prints values and runs some SELECT
I have a stored procedure that runs custom backups for around 60 SQL servers
I have an app that runs a stored procedure in SQL Server, checking the
I have a stored procedure that runs the following: 'ALTER LOGIN ' + @Login
I have a script that runs a stored procedure in my SQL server database,
I have a SqlCommand which runs a stored procedure that contains two integer output
My limited SQL knowledge prompted this post! I have a stored procedure that runs
I have a loooooong stored procedure that runs about 15 select statements across different
I have been running up a stored procedure that runs several separate update and
I have a SQL Server stored procedure that normally runs fine. However, for one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.