STARTUP String | CREATE USER | Teradata Vantage - Purpose of the STARTUP String - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

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 the 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://teradata-docs.s3.amazonaws.com/doc/connectivity/jdbc/reference/current/frameset.html .
  • 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 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 the database, the following events occur in the indicated order.

  1. BTEQ submits a RunStartUp request to the database.
  2. The 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. The 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 the database, the following events occur in the indicated order.

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