Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Multi-Threading Using VBP (https://www.kinook.com/Forum/showthread.php?t=4865)

joe12 05-26-2011 06:08 PM

Multi-Threading Using VBP
 
Specifically, one of the multithreading tasks I want to do is call out to SqlServer databases to run scripts against many databases at once.

I always have a bunch of new SQL scripts that must be run on hundreds of databases during our regular interval deployments.

To reduce deployment times, I need a way to thread pool this activity so that some number of DBs (maybe 20, more or less) are updated with selected SQL scripts concurrently. I don't want to simply kick off the scripts in a "loop without waiting" against all the databases, as I want to be able to throttle the thread pool dynamically based on script types.

If possible, I want to do the multi-thread work using VBP's GUI console implementation exclusively if possible, as currently I can simply use the "process files" and "run SQL" actions to upgrade the databases, which is very low maintenance, but doing it sequentially is now taking too long. I realize that multithreading will complicate my scripts but I want to mitigate as much complexity as possible.

Having the thread workers report back status is also a concern. And have them abort a particular database's upgrade if/when script output contains an error.


There may be several ways to do this, so looking for some options/opinions as we may in the future want to multithread other tasks from within VBP (like multiple node installs and "same-second" concurrent status feedbacks from multiple servers).


Thanks! :)

kinook 05-27-2011 07:14 AM

You could use the parallel builds technique demonstrated in the Chain.bld sample for that (and possibly a variation on the SingleInstance.bld sample to throttle the # of simultaneous instances).
http://www.kinook.com/VisBuildPro/Ma...hainsample.htm
http://www.kinook.com/VisBuildPro/Ma...ancesample.htm


All times are GMT -5. The time now is 06:32 PM.


Copyright © 1999-2023 Kinook Software, Inc.