With Toad v8.6.1, the following script performed perfectly:
%ProgramFiles%\Quest Software\Toad for Oracle\TOAD.exe CONNECT=username/password@DB C:\Folder_Name\File_name.sql /exec
When the same script is run with Toad 9.7.2.5 however, the connect window appears and the sql is loaded in the background, but it is not executed and the Run or Execute buttonis not available under any menu option. The sql statement is invoked by a batch file.
The error message ORA-00922: Missing or Invalid Option also appears.
Some of the syntax has changed between version 8.6.1 and 9.7.2.5. The problem is being caused by the /EXEC at the end of the code.
In addition to the -c & -f commands which have since been introduced, it is also required to change the last part of the code,/EXEC to /SCRIPT.
/EXEC means it will execute the script in Toad via the F9 key. /SCRIPT means it will execute the script in Toad via the F5 key.
Below is an example for Toad for Oracle v9.7.2.5, which can be referenced for your own script:
%ProgramFiles%\Quest Software\Toad for Oracle 9.7.2\TOAD.exe -c username/password@DB -f C:\Folder_Name\File_Name.sql /SCRIPT
This can also be run through the AppDesigner now.
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center