Friday, February 17, 2012

Execute Maximum Number (that varies each month) of Concurrent Running Executables

I know that if I set the Package.MaxConcurrentExecutables Property to -1, it will execute the maximum number of concurrent running executables to equal the number of processors plus two.

I have a requirement where I have to run the maximum number of concurrent running executables. However, the number of concurrent executables to run varies each month (it is not fixed).

If I have a loop inside the package that executes each stored procedure (same sproc, different parameter), will SQL Server execute the maximum number of concurrent running executables possible? (It may execute 4 or 8 at a time and that is fine.)

Thanks,

Michael

I'm a little confused about the requiremnt, and if I understood it better, I might be able to suggest a workaround. What's the scenario that drives this requirement?

The answer to your question is no, the Loop does not perform parallel executions (not yet, at least - hoping for support in Katmai). If you are launching an asynchronous process (a process that returns a result immediately, then continues doing the work), you can have multiple processes running in parallel. However, the Execute SQL Task is not asynchronous, so you'd have to be doing something in your stored procedure to enable an asynchronous operation.

No comments:

Post a Comment