This section describes the BTEQ process.
- Issue BTEQ commands and submit SQL requests in a batch- or interactive-mode BTEQ session.
- The Call-Level Interface (CLI) packages the input and forwards it to the Teradata Director Program (TDP), in mainframe-attached systems, or the Micro Teradata Director Program (MTDP) in workstation-attached systems.
- The TDP, or MTDP, establishes a session and manages communication between the CLI and the Teradata server.
- The Teradata Server parses, interprets, plans access for, and dispatches the request to the Teradata Database.
- The Teradata Database processes the request and sends a response message back to the TDP or MTDP.
- The TDP, or MTDP, unpackages the response and makes it available to the CLI.
- The CLI makes the response available to BTEQ, which routes the output to the specified terminal, file, or printer.
By default, BTEQ enables CLI's configuration parameter wait_across_delay, which means that once BTEQ has submitted a request, CLI will wait to return control to BTEQ if there is delay in the response due to a crashed, restarting or slow database. CLI will automatically redrive the request depending on its Automatic Redrive and Recoverable Network Protocol settings.
This can lead to scenarios where a logon attempt from BTEQ to a database that is down, might be seen as a hang in BTEQ. Similar hanging can be experienced if after a successful logon, a request is sent from BTEQ and database goes down while the request is being processed. This would be due to CLI trying to automatically redrive the request indefinitely.
For interactive mode, such hangs can be halted using BTEQ's BREAK key sequence (typically Ctrl-C) to abort the in-progress request or exit BTEQ. See Discarding Input and Abort Requests for details.
To prevent such hang situations, one could make use of BTEQ's EXITONDELAY command. Timers will then be employed on CLI calls so that CLI can return process control to BTEQ after the timer expires, even while allowing CLI to run with its Automatic Redrive feature for the duration of the timer.
See EXITONDELAY for details.