Toad World® Forums

how to run a script, "looping" through a list of parameters


#1

Is there any straight-forward method in Toad to a run a script multiple times passing in a different parameter for each iteration?

I have tried the Automation Designer List Iterator action with an Execute Script child action but I see no way to pass the %List Iterator1% variable to a script file.or a script text. I tried a Parameter file, but that applies only to the Execute Script, and not the List Iterator. I see no way in Script Manager to do anything like this.

I know I can use the SQL*Plus method of spooling and executing a dynamically created script file, but I thought I’d check if there’s some way to do this via the power of Toad.


#2

Not sure what you mean by the power of Toad in the mere execution of a script, but there is also Toad Script Runner (TSR.exe) installed in the same directory
as Toad.exe which you can use in conjunction with your favorite iterator-supporting language.

From: droeschley_109 [mailto:bounce-droeschley_109@toadworld.com]

Sent: Tuesday, May 26, 2015 3:18 PM

To: toadoraclebeta@toadworld.com

Subject: [Toad for Oracle - Beta Discussion Forum] how to run a script, “looping” through a list of parameters

how to run a script, “looping” through a list of parameters

Thread created by droeschley_109

Is there any straight-forward method in Toad to a run a script multiple times passing in a different parameter for each iteration?

I have tried the Automation Designer List Iterator action with an Execute Script child action but I see no way to pass the %List Iterator1% variable to a script file.or a script text. I tried
a Parameter file, but that applies only to the Execute Script, and not the List Iterator. I see no way in Script Manager to do anything like this.

I know I can use the SQL*Plus method of spooling and executing a dynamically created script file, but I thought I’d check if there’s some way to do this via the power of Toad.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.


#3

My current iterator-supporting language is a Linux emulator for Windows.

for envid in q1 q2 q3 q4 q5 fc; do sqlplus /@ @“C:\Users\roeschley\OneDri~1\sql\create_dev_svr_accounts-4_shell_loop.sql” $envid svr dltr; done

When I want to execute the script once, I just do it within Toad. When I want to execute it 6 times for 6 different values, I resort to my Linux emulator because I haven’t found any way in Toad to do this.

I thought the Automation Designer with its List Iterator and Execute Script actions might be the answer, but I find no way to pass a parameter (in this case %List Iterator1%) to the script in the Execute Script action.


#4

I thought the Automation Designer with its List Iterator


#5

for envid in q1 q2 q3 q4 q5 fc; do sqlplus /@ @“C:\Users\roeschley\OneDri~1\sql\create_dev_svr_accounts-4_shell_loop.sql” $envid svr dltr; done

i would like to help you but please answer in which partof you task Toad would be a helper?

what i can say is right variable usage in windows script loops:

FOR %%G IN (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) DO (md C:\demo%%G)


#6

Within any part of Toad is there a way to automate the following:

execute script S1 with parameter P1

execute script S1 with parameter P2

execute script S1 with parameter Pn

The same script, just the number and value of the parameters would change.

I know I can do this via FOR loops in linux or in Windows or generate a SQL script that does this. I’d like to be able to do this using some feature within Toad.


#7

Search in online, it will show lots of options