Other Features
Quest ScriptRunner
Quest ScriptRunner is a small script execution utility included in your Toad directory that lets you execute DDL and DML scripts. Because of its small size, several instances of Quest ScriptRunner can be running at one time. You can run it from the executable or from the command line. It includes automatic formatting. It is not 100 percent SQL*Plus compatible, but most of the DDL and
DML scripts should be supported.
If Quest ScriptRunner is not in your Toad directory, it will not include syntax highlighting, hot keys, code templates, and all the other editor features found in the Toad Editor Options window.
The File menu contains the basic file commands.
The Edit menu contains the basic text editing commands including Find and
Replace. It lets you toggle between a full screen and split screen editor.
Edit | Options Menu
Application Options
Editor Font button
This option lets you set the editor font (top panel). The default is 10 point
Courier.
Output Font button
This option lets you set the output font (bottom panel). The default is 10 point
Courier.
Output background color dropdown
You can change the background color of the output.
207
Toad for Oracle
Default - Checked
When this option is checked, if Quest ScriptRunner is located in the Toad directory, or if the Toad editor option files have been copied to the directory where Quest ScriptRunner resides, Quest ScriptRunner will load and use them.
So your Toad options will override the fonts selections that are on this options page. This option gives you access to: autoreplace, syntax highlighting, templates, hotkeys, and the ability to schedule scripts to run. Quest
ScriptRunner first looks for Toad editor options in a User Files directory below the application, and if not found, looks in its local directory for the files.
Show Login window at startup
Default - Unchecked
If checked, the login window will be invoked when you start Quest ScriptRunner.
Default - Unchecked
If checked, when you run Quest ScriptRunner from the command line, Quest
ScriptRunner will close if you have not entered connection information on the command line, or there is no automatic logon connection information saved.
Start in Full Screen edit mode until script is executed
Default - Unchecked
If checked, will open Quest ScriptRunner in full screen mode until you execute a script. When a script is executed, the screen splits to display the results grid in the lower pane.
208
Other Features
Always exit after execution from Toad or command line
Default - Unchecked
If checked, will exit after it executes from either Toad or the command line.
The other option pages include Printing, Script (default script options), and
Toolbars (also includes toolbar buttons options).
Run Menu
The Run menu includes the following commands for running the script: Execute entire/highlighted Script, Run from Cursor, Run to Cursor, Run Current
Statement (runs only statement where cursor is positioned), Execute Script step-by-step, Step through Script from Cursor, and Connect (opens a new connection to an Oracle database).
Right-Click Menus
The editor panel and results panel right-click menus contain some of the common main menu items. The results panel right-click menu also includes commands that let you use any results your script returns.
Launching Quest ScriptRunner from
Command Line
To Launch Quest ScriptRunner from the command line
1.
Type QSR at the command prompt.
2.
Press <Enter>
3.
Quest ScriptRunner will launch and prompt for a connection.
To Launch Quest ScriptRunner and specify a connection from the command line use one of the following formats
1.
QSR <username>/<password>@<databasename>
2.
QSR demo/demo@mydatabase
209
Toad for Oracle
To Launch Quest ScriptRunner and connect using a blank/default database name from the command line
• QSR demo/demo
To get Quest ScriptRunner to attempt to connect using an OPS$ login
• QSR/
To Specify a file to load when Quest ScriptRunner is launched from command line
Use the following format, and Quest ScriptRunner will connect using the specified connection. It will load the file into the editor panel.
• QSR demo/demo@mydatabase c:\temp\mysql.sql
If the filename or path contains spaces, the entire path must be enclosed in
double quotes:
• QSR demo/demo@mydatabase "c:\temp\my sqlfiles\mysql.sql"
To pass the name of a script to load but not run use the following format
• qsr.exe jsmith/jsmith@mydatabase c:\parentscript.sql
To save output to a destination file after running the script designated in the command line use the following format
• qsr.exe jsmith/jsmith@mydatabase @c:\quest scriptrunner\sga.sql
>c:\quest scriptrunner\sgaoutput.txt
Commands Supported
Quest ScriptRunner supports many of the SQL*Plus commands such as
REM/REMARK, PROMPT/PRO, SET ECHO, SET ESCAPE/ESC, SETHEADING/HEA, and SET LINESIZE/LINES.
Refer to Toad Help for more details.
210