Sunday, October 19, 2008

Command line reference

The documentation of what command line options are available on the Toad.exe is not necessarily that well covered in the documentation. True there is rarely any need to specify anything on it unless something goes wrong. I just thought I'd go through what is available.

First of all the format. Toad allows any parameters to be specified regardless of if it knows what they are or not because some plugins might want to read it later on unbeknown to the original startup code. All parameters are specified using this format.

toad /{parameter name}={value} {files to open on startup}

Also if you want to specify an option with space in it you can quote it like this.

toad "/{parameter name}={value}" "{A file to open}"

Here are the following parameters that we support in Toad as of version 4.1.

datadirDirectory Specify an alternative data directory for Toad to read it's settings from instead of the default location.
profile"true"Start Toad and generate profiling information. This is sometimes used by us if you Toad is behaving very slow to track down what is wrong. The information generated is included in the support bundle if it is available.
batch "true" Run toad in batch mode. This means that it will just open all available files without opening up the user interface and then exit. Used by automation.
prestart "true" Pre start Toad. This means that toad is run in the background to be available to "pop up" when you actually want it. This feature is never actually used but if you are ok with pre loading on windows startup you can add toad /prestart=true to your startup menu and have lightning fast startups when you actually need Toad. Will use memory even if you are not using Toad. This is how a lot of other apps fake quick startup times like for instance Adobe Reader.
installinit "true" Used by installation to initialize a cache of the available plugins of to the application. When run by this it needs to write to the install directory, but in case you have this which is normally the case you can rerun this as many times you want.
feedback "true" Enable usage reporting.
license "edit" Display the license entry form on startup.
transpose "1" Allow transposing when exporting grids. That means switching X and Y axises of the grid.
exportbenchmark "1" Generate a log file to help benchmarking the export engine. The file will be included in your next support bundle
excelverbose "1" Generate a lot of verbose info when exporting into Excel.
profilevc "1" Generate a profiling log to help benchmarking the version control code. The file will be included in your next support bundle
debuglog Filename Generate a log of some debugging events. The file will always be placed in the application data directory.
yukondebuglog "1" Generates debugging information for the SqlServer 2005 debugger. The file will be included in your next support bundle.
dbmsverbose "1" Generate very verbose DBMS_OUTPUT output.
oraclelastplan "1" Include the latest Oracle explain plan to your support bundle.
db2debuglogreports "1" Generate debugging information for the DB2 debugger. The file will be included in your next support bundle.
db2debuglog "1" Generate debugging information for the db2 command line executions. The file will be included in your next support bundle.

To end with an example running Toad like this will enable usage reporting and using a new application data directory and then open a file on startup.

toad /feedback=true "/datadir=c:\Users\MyUser\My Documents\ToadDir" "c:\Users\MyUser\My Documents\A Sql File.sql"

No comments: