Startup Parameters - SQL Assistant

Teradata SQL Assistant for Microsoft Windows User Guide

Product
SQL Assistant
Release Number
15.00
Language
English (United States)
Last Update
2018-09-27
dita:id
B035-2430
lifecycle
previous
Product Category
Teradata Tools and Utilities

Startup Parameters

The following startup parameters can be passed to Teradata SQL Assistant on the command line.

When using startup parameters, any parameter value that contains spaces must be enclosed in double quotes.

For example:

sqla.exe -c Production1 -s “Select * From MyTbl

Not:

sqla.exe -c Production1 -s Select * From MyTbl

Note: Normally the casual user does not use these startup parameters. This is normally used by DBAs or programmers.

To enter the parameter, from the Start button, select Run.

 

Table 36: Startup Parameters 

Enter this parameter...

to do the following...

-a <name>

Automatically load the data contained in the tab delimited file named <name> into an Answerset window.

-c <dsn>[ [ \<user> ] \<pwd> ]

Automatically connect to the data source named <dsn>, with optional <user> and <password> parameters.

-p <type>

The provider type:

  • Td - Connect using Teradata.NET
  • Odbc - Connect using ODBC
  • Ora - Connect using Oracle.NET
  • -m [ <mech>\ ] <mechparm>

    Connect to the data source using a mechanism. Use this parameter in conjunction with the -c parameter above if a mechanism is required.

    -s <SQL>

    Load this SQL. Automatically execute it if the -c parameter is also specified.

    -f <name>

    Automatically load the SQL contained in the file named <name>. Automatically execute it if the -c parameter is also specified.

    -e <name>

    Export the results of your query to a file named <name>. The format of this file is determined with Export options currently in effect.
    If the export file is a Microsoft Access database, the file name must be followed by a backslash '\' and the tablename.

    For example: -e c:\temp\MyDatabase.mdb\MyTable

    -db <name>

    Set <name> as the default database

    -cs <name>

    Set the session character set to <name>

    For example: sqla.exe -c Production1 -s “Select * From MyTbl”

  • The parameters shown in brackets (for example, [ <mech>\ ]), are optional.
  • If -a is entered, it must be the only parameter.
  • If both -f and -s are entered, only the last one is used.
  • For automatic execution, use -c with either -s or -f.
  • If the data source requires additional information, you are prompted for that information.

    If you provide -c, -e and either -s or -f parameters, Teradata SQL Assistant effectively runs as a batch job. It executes the query, writes any output to the export file, then terminates.

    You can also use the Windows Explorer to drag and drop a file onto the Teradata SQL Assistant executable instead of using the -f <name> startup parameter. Alternatively, you can associate a specific file type (such as .sql) with Teradata SQL Assistant. You can then start Teradata SQL Assistant and automatically load the contents of any .sql file by simply double-clicking on the file.