Terminate the Teradata PT Connection - Parallel Transporter

Teradata® Parallel Transporter Application Programming Interface Programmer Guide - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Parallel Transporter
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2023-11-20
dita:mapPath
haz1691132518981.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
ana1478611373864
lifecycle
latest
Product Category
Teradata Tools and Utilities

Once a Teradata PT driver task completes, the connection must be terminated. Do this with the Connection object’s Terminate method.

conn->Terminate();

The Terminate method closes all sessions associated with the connection and ends the driver’s processing environment.

Your program should always call Terminate whenever any program fails prematurely, so that Teradata PT can do cleanup tasks such as releasing storage and logging off all DBS sessions. If your program cannot call Terminate and has stopped, you may be able to submit a restart job. If you submit a restart job and get errors, wait until the DBS logs off all orphan sessions (the default time is 20 minutes) and then submit the restart job again.

If you are making direct calls to CLIv2, do not call the DBCHCLN function until all initiated Teradata PT drivers within the same process have been terminated. In addition to freeing shared CLIv2 structures, the DBCHCLN method disconnects all currently connected CLIv2 sessions within the same address space. If you call DBCHCLN while a Teradata PT driver in the same process is still active, the driver’s session will prematurely disconnect and the job will fail.