16.20 - Purpose of the STARTUP String - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Detailed Topics

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1184-162K
Language
English (United States)

The user startup string is a limited sequence of SQL requests that you can submit at any time after a session has been established. The length of a startup string is limited to 255 characters.

The startup string is processed when:
  • You log on to Teradata Database through BTEQ.
  • You establish a JDBC connection using the Teradata JDBC Driver and have specified the connection parameter RUNSTARTUP=ON. For more information about using a startup string with the Teradata JDBC Driver, see the Teradata JDBC Driver Reference, available at https://developer.teradata.com/connectivity/reference/jdbc-driver .
  • An application that uses CLIv2 invokes the startup string using the CLIv2 RunStartUp function. If a startup string is not defined for the user, the Teradata Database returns an error to the requestor.

Only BTEQ, the Teradata JDBC Driver, and CLIv2 support startup strings.

The remainder of this section describes how to use a startup string with BTEQ.

The following BTEQ example shows how the system invokes a startup string. Suppose you define the startup string for a user as 'ECHO ''.SHOW CONTROLS'';' .17. The .SHOW CONTROLS command returns the current settings of the BTEQ formatting command options.

When the user logs onto Teradata Database, the following events occur in the indicated order.

  1. BTEQ submits a RunStartUp request to Teradata Database.
  2. Teradata Database executes the specified ECHO request and returns the BTEQ command string .SHOW CONTROLS.
  3. BTEQ executes the command returned to it, .SHOW CONTROLS.
  4. Teradata Database returns the settings of the BTEQ formatting command options for the current session.

Suppose you define the startup string for another user as ‘SELECT DATE, TIME;’

When this user logs onto Teradata Database, the following events occur in the indicated order.

  1. BTEQ submits a RunStartUp request to Teradata Database.
  2. Teradata Database executes the SELECT DATE, TIME request and returns the answer set.
  3. BTEQ displays the returned answer set.