17.00 - Generating the Teradata PT API Operator Log - Parallel Transporter

Teradata® Parallel Transporter Application Programming Interface Programmer Guide

prodname
Parallel Transporter
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-2516-220K

TD_TRACE_LEVEL1 / TD_TRACE_LEVEL2

To generate the Teradata PT API operator log, you must set the following two environment variables:

  • TD_TRACE_LEVEL1
  • TD_TRACE_LEVEL2

If TD_TRACE_LEVEL1 or TD_TRACE_LEVEL2 is not set, the Teradata PT API operator log is not generated.

The possible values for TD_TRACE_LEVEL1 and TD_TRACE_LEVEL2 are listed in the schema.h file.

The best value for:

  • TD_TRACE_LEVEL1 is TD_OPER_ALL
  • TD_TRACE_LEVEL2 is TD_GENERAL.

These values generate a complete Teradata PT API operator log.

TD_TRACE_OUTPUT

Setting the following environment variable TD_TRACE_OUTPUT is optional.

  • If you are setting TD_TRACE_OUTPUT, you should set it to a file in which the Teradata PT API operator log is generated.
  • If you do not set TD_TRACE_OUTPUT, Teradata PT API sets TD_TRACE_OUTPUT to a value with the operator name and timestamp.

TD_TRACE_LOGSQL

Setting the following environment variable TD_LOGSQL is optional.

If this variable is not set, the variable takes the default value, which is No.

Valid values:

  • Yes ('Y') = Output the full Teradata SQL in the trace output file when the driver's trace is enabled. The maximum length of the Teradata SQL is 1 megabyte.
  • No ('N') = Do not output the Teradata SQL in the trace output file (default).
If both the environment variables and the attributes in the application are set simultaneously, the values from environment variables are considered. The environment variables have high precedence over the attribute values.

Example 1

If:

  • TD_TRACE_LEVEL1 is set to a correct value,
  • TD_TRACE_LEVEL2 is set to a correct value,
  • TD_TRACE_OUTPUT is set,

the Teradata PT API operator log is generated in a newly created file named according to the value to which TD_TRACE_OUTPUT is set.

Example 2

If:

  • TD_TRACE_LEVEL1 is set to a correct value,
  • TD_TRACE_LEVEL2 is set to a correct value,
  • TD_TRACE_OUTPUT is not set,

the Teradata PT API operator log is generated in a newly-created file that Teradata PT API names.

Example 3

If:

  • TD_TRACE_LEVEL1 is set to a correct value,
  • TD_TRACE_LEVEL2 is set to an incorrect value or not set,
  • TD_TRACE_OUTPUT is not set,

and the above values are not set in the application as attributes,

the TPTAPI operator log is not generated.

Example 4

If:

  • TD_TRACE_LEVEL1 is not set or set to an incorrect value,
  • TD_TRACE_LEVEL2 is set to a correct value,
  • TD_TRACE_OUTPUT is not set,

and the above values are not set in the application as attributes,

the TPTAPI operator log is not generated.