Terminate the Teradata PT Connection - Parallel Transporter

Teradata Parallel Transporter Application Programming Interface

Product
Parallel Transporter
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2516
lifecycle
previous
Product Category
Teradata Tools and Utilities

Terminate the Teradata PT Connection

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.

Note: 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.