How to run command line batch to open and control Toad?
Can Toad be opened and controlled via the command line for Toad Subscription license users considering Toad requires an online sign in at launch?
For complete documentation on this topic, please refer to Help | Command Line Syntax or Installation Guide "Install Toad Silently from Command Line" section.
NOTE: The below commands support all license types including Subscription licenses.
Ensure product licenses are activated (automatically online or manually locally) prior to running Toad via the command line. For Subscription users, once Toad is opened via the command line, Toad requires user to sign in online for license entitlement (if it is the very first time Toad is opened), then Toad will use the command line parameters to complete the actions (connection, open script etc)
Command line syntax:
-c schema/password@db schema2/password@db as sysdba
Make connections. The second (and third and fourth and so on) connection should be within quotation marks.
-f File1 File2 File3
Load files into editor. Accepts modifiers like /exec (f9 exec) /script (script exec) and /print (print file)
-min
Minimize Toad
-max
Maximize Toad
/EXEC
Triggers execution of the loaded file as a script. You may use only one of these in a command line.
/PRINT
Triggers printing the source code. You may use only one of these in a command line.
/SCRIPT
Triggers executing the loaded file as a script. You may use only one of these in a command line.
TC=No
Suppress the prompt for a Team Coding login
HC=<options></options>
Trigger HealthCheck
Using this command structure you can do the following:
C:\>Toad.exe max c scott/tiger@db sys/sys@db as sysdba f somefile.sql /exec /print someotherfile.sql
This will launch Toad maximized, create scott and sys connections; load somefile.sql; execute it using F9 style execution, then print it and load someotherfile.sql into the editor.