Connecting to the Teradata Database - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

Product
Preprocessor2 for Embedded SQL
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

No association exists between the PP2 connection to the Teradata Database made at precompile time and the connection made by an application at execution time. Embedded LOGON and CONNECT statements have no effect on the PP2 connection. Conversely, tdpid and userid PP2 options do not affect the application logon at execution time. For more information, refer to “USERID(userid[,password[,accountid]]) -u userid[,password[,accountid]]” on page 90.

Normal operation, however, means connecting to the Teradata Database for the precompilation and application execution phases. This requires the:

  • tdpid
  • userid
  • password for the specified userid
  • If a tdpid is not specified, the connection is made using the system default. The runtime returns a positive SQLCODE value and sets SQLWARN0 and SQLWARN2 to ‘W’.

    The next table lists the system defaults for IBM mainframes and network‑attached systems.

     

    Platform

    Default tdp

    IBM Mainframe

    The default tdp is obtained from the HSHSPB data area module (see Teradata Call-Level Interface Version 2 Reference for Mainframe-Attached Systems (B035‑2417) for details.)

    Network‑Attached System

    The mtdpid is obtained from the user‑defined clispb.dat file or the CLI2SPB data area.

    For more information about userid security, tdpids, and userids, see Teradata Director Program Reference (B035‑2416).