STARTUP String | CREATE USER | Teradata Vantage - Purpose of the STARTUP String - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
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.