How do you configure the connection timeout in JDBC for Teradata?

The JDBC driver does not have a parameter to configure the Login Timeout value for a JDBC connection. The timeout becomes the value which is set in the gateway GTWControl parameter, Connection timeout. The default value for this is 60 seconds.

Within an application, you can set it by using setLoginTimeout and find out the current setting by calling getLoginTimeout().

Following way timeout can be change in Teradata Gateway:

#tdatcmd

# gtwcontrol -d

gtwcontrol: gtwversion 15.10.00.01

gdo version: 6, created on Tue Feb 12 10:37:38 2019

systemname: TD-EXPRESS

number of host groups: 1, number of gateway vprocs 1

max logfile size: 5000000

event trace cnt: 500

gtwglobal logon name: DBC

Send DBS error to client: no

TDGSS Library Version..........: 15.10.0.6

hgid: 1

assign vprocid: 22528

assigntrace: no

logons enabled: yes

session timeout in minutes: 20

connection timeout in seconds: 60

keepalive timeout in minutes: 10

max sessions per gateway: 600

iothread check frequency in minutes: 10

max io threads per type (msg/net): 50

initial io threads per type (msg/net): 25

allow gateway testing enabled: no

External Authentication: on

Append Domain Name: no

Reserved for Backdown: 0

Require Confidentiality: no

Send Connect Response with Integrity Only: no

Connection trace: no

Local PE Preferred Percent: 0%

TCP Socket SND/RCV Buffer Size: default (65587)

vproc id: 22528 status: Online

# gtwcontrol -c 120

gtwcontrol: gtwversion 15.10.00.01

gtwcontrol: gtw gdo successfully updated

# gtwcontrol -d

gtwcontrol: gtwversion 15.10.00.01

gdo version: 6, created on Tue Feb 12 10:37:38 2019

systemname: TD-EXPRESS

number of host groups: 1, number of gateway vprocs 1

max logfile size: 5000000

event trace cnt: 500

gtwglobal logon name: DBC

Send DBS error to client: no

TDGSS Library Version..........: 15.10.0.6

hgid: 1

assign vprocid: 22528

assigntrace: no

logons enabled: yes

session timeout in minutes: 20

connection timeout in seconds: 120

keepalive timeout in minutes: 10

max sessions per gateway: 600

iothread check frequency in minutes: 10

max io threads per type (msg/net): 50

initial io threads per type (msg/net): 25

allow gateway testing enabled: no

External Authentication: on

Append Domain Name: no

Reserved for Backdown: 0

Require Confidentiality: no

Send Connect Response with Integrity Only: no

Connection trace: no

Local PE Preferred Percent: 0%

TCP Socket SND/RCV Buffer Size: default (65587)

vproc id: 22528 status: Online