Establishing a Session - Call-Level Interface Version 2

Teradata Call-Level Interface Version 2 Reference for Workstation-Attached Systems

Product
Call-Level Interface Version 2
Release Number
15.00
Language
English (United States)
Last Update
2018-09-25
dita:id
B035-2418
lifecycle
previous
Product Category
Teradata Tools and Utilities

Establishing a Session

Before logging a session, check for entries of COPs in the following files:

  • /etc/hosts on UNIX systems
  • %windir%\system32\drivers\etc\hosts on Windows systems
  • If Distributed Name Service (DNS) is enabled, these files will be resident on the appropriate DNS servers.

    If a Teradata Database has four COPs that can be connected to, the COP entries in the hosts file should look as follows:

     

    Note: NODENAME should be the same for all the nodes.

    CLI assumes that the COP entries are serial, cop1, cop2, cop3..., cop100. If the environment variable is set, CLI will keep connecting the COPs until the value specified in the environment variable is reached.

    Example:

     

    In the above example, CLI will ignore NODE5 and NODE6 and connect all requested sessions to NODE1 and NODE2.The performance of the logon process can be improved by setting an environment variable with the name equal to the machine (NODENAME) name, and by specifying the number of COPs available for it. In the previous example, if an environment variable NODENAME with a value of 3 exists before initiating the first CONNECT request, CLI will try to connect to the first three nodes only. In the previous example, if an environment variable NODENAME with a value of 3 exists before initiating the first CONNECT request, CLI will try to connect to the first three nodes only. However, if an environment variable NODENAME with a value of 7 exists, CLI will try to connect all available notes, NODE1, NODE2, NODE5, and NODE6, in this case.

    Note: The NODENAME=x environmental variable must be upper‑case.

    Note: The format of a COP name is dbcnameCOPn, where dbcname must begin with an alphabetic character. The remaining characters can be alphanumeric.

    Before establishing a session, check for Teradata service entries in the following files:

  • /etc/services on UNIX systems
  • This file should contain the following entries:

    tdmst ‑ 1025/udp

    If the gateway service on a NODE is configured to listen on a port other than 1025, these entries should be modified to reflect the port on which the gateway is listening. Another way of changing the default tdmst port (1025) is to set the environment variable TDMSTPORT to the appropriate port. CLI and the gateway must use the same port for communication.

    In the DBCAREA, the application program provides a pointer to the logon string, its length, and, optionally, a pointer to the run string (partition name) and its length. The application program provides the maximum length of the Request Buffer and Response Buffer in the DBCAREA. Optionally, it modifies the processing options in the DBCAREA. It then sets the function code in the DBCAREA to DBFCON and calls DBCHCL.