15.00 - Purpose of the STARTUP String - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1184-015K
Language
English (United States)

Purpose of the STARTUP String

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 User Guide.
  • 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.