Toad World® Forums

TOAD - Automation Designer - Need to globalize SET commands

I am new to Automation Designer, and I am tasked with setting up a Continuous Integration service that keys off Jenkins deployment via a Git source repository which then makes a command line call to execute a dynamic build on a windows server. Within the Automation Designer App it first connects to the respective DB depending on which branch the code was deployed to… i.e. Develop branch will deploy to all 3 Dev servers… Master branch will deploy to our SIT servers. Shell commands are executed to Telnet to the proper server and perform Git checkouts to get the most recent source code to be deployed. Then within the same “Connection Iterator” it performs a series of “Folder Iterator” operations to deploy “MISC Scripts” first, then “Triggers”, “Packages” and so forth until the build is complete, then a series of validation scripts are executed with a call to zip up all the log files and send them as an attachment via email to our teams distribution list. For the most part everything is pretty much working fine except for each “Folder Iterator” it appears to make a new connection every time and loses the SET commands that were executed at the beginning of the process. I have attempted to create a new “Execute Script” process and even hard coded the SET commands as “Script Source” = “Text”, however that script seems to drop into a separate session as well. Is there any way to globalize the SET commands for all scripts executed from every single Folder Iterator? I don’t want to have to update hundreds of scripts with the prefixed SET commands… please help!

PS. I also don’t want to hard code any script file names, we want a fully automated solution to give us the flexibility to check in new program files to be deployed without having to go back and modify the deployment process.

Does TOAD have a default SET configuration similar to how SQL*Plus used to do it?
www.adp-gmbh.ch/…/login.html

Go to options -> Oracle -> Transactions. If “Execute scripts in Toad Session” is unchecked, check it. I think that will cause the same session to be used for each script.

Hmm... I already had that box checked by default :frowning:

I think I might have found what I need, thanks for your tip.... I scrolled a little farther down and found the "Scripts" area which has a link to the glogin.sql file that appears to be referenced from TOAD, I'll try to update my SET statements there and see if that does the trick... unfortunately our server was just shut down for maintenance and I won't get to test this until next Monday.. fingers crossed!

*** In contrast I wonder if I were to uncheck the "Restore SET defaults prior to script execution" would net the same effect I need as well :wink:

I also wonder if I can get the desired result if I were to uncheck the “Restore SET defaults prior to script execution”

I just did a quick test.

It does use the same connection by using that trick, but having the same connection does not make your script settings like TERM, SCAN, DEFINE persist.

So I tried putting the SET commands in login.sql as the same folder as Toad.exe, then checking “execute login scripts”, and the script settings were applied to all execute script actions.

I tried unchecking “Restore SET defaults prior to script execution” and couldn’t get it to work that way.

But either login.sql or glogin.sql will get it done.

So just to confirm… I checked the box “Execute login scripts” and edited the first script glogin.sql to include the SET commands I needed and this worked perfectly.

There are a few other quirks I need to work out with Automation Designer but will address those separately so not to go too far off topic from this thread.

Thanks for all the assistance!