Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] General Discussion

Thread Tools Rate Thread Display Modes
Old 05-26-2011, 06:08 PM
joe12 joe12 is online now
Registered User
Join Date: 05-26-2011
Posts: 8
Question 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).

Reply With Quote
Old 05-27-2011, 07:14 AM
kinook kinook is online now
Join Date: 03-06-2001
Location: Colorado
Posts: 5,874
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).
Reply With Quote

multi-thread , multi-threading , multithread , multithreading

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

All times are GMT -5. The time now is 11:44 PM.

Copyright 1999-2022 Kinook Software, Inc.