Example 2: SIGTERM Handling | Basic Teradata Query - Example 2 – SIGTERM Handling - Basic Teradata Query

Basic Teradata® Query Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Basic Teradata Query
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2025-04-02
dita:mapPath
gxl1691484661681.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
psp1479308573013
Product Category
Teradata Tools and Utilities

SIGTERM issued when BTEQ is waiting on CLI for some SQL response:

BTEQ -- Enter your SQL request or BTEQ command:
SELECT * FROM dbc.tables a, dbc.tables b, dbc.tables c;

SELECT * FROM dbc.tables a, dbc.tables b, dbc.tables c;
<<< SIGTERM trapped here >>>
*** Exiting BTEQ Because Of Terminate Signal...
*** RC (return code) = 16
A SIGTERM signal is different than SIGKILL signal. While BTEQ traps the SIGTERM signal and exits with a non-0 severity, a SIGKILL signal cannot be trapped and BTEQ process will terminate abruptly. BTEQ’s return code upon SIGKILL will be system defined which is usually 265 for any process that is killed using SIGKILL.

A SIGKILL signal can be issued by running the following command:

kill -9 PID