TIMEOUT Command | Basic Teradata Query - TIMEOUT - Basic Teradata Query

Basic Teradata® Query Reference

Product
Basic Teradata Query
Release Number
17.10
Published
February 2022
Language
English (United States)
Last Update
2022-02-03
dita:mapPath
nnw1608578382132.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

Purpose

This control enables specification of a maximum number of minutes an interactive user is allowed to let all their currently established database sessions collectively be idle, beyond which point BTEQ will automatically log them off. When no value is given, ON is assumed using the default of 10 minutes unless the control was previously enabled for the BTEQ process. In that case, the prior number of minutes set will be in effect again. OFF disables the control. The control can also be enabled at BTEQ invocation time using the -t command line option, which optionally accepts an integer. When -t is used, BTEQ enforces this original specification by disabling TIMEOUT command use to prevent the control from being turned off and or the number of minutes from being altered.

Syntax

where the following is true:

SET
Is an optional keyword.
ON
Enables timeouts using the default number of 10 minutes or the number of minutes last set.
OFF
Disables timeouts.
n
Enables timeouts using a specified number of minutes.

Usage Notes

When no value is given, ON will be assumed.

When the timer expires a warning about the logoff will get generated. A single BREAK (CTRL-C for workstation BTEQs and PA1 for z/OS BTEQ) can be used to reset the instruction input buffer. However, for z/OS BTEQ the warning will only get displayed after ENTER key use. Hence, a single BREAK (PA1) can only be used to reset the input buffer when a syntactically complete instruction has not yet been provided.

BTEQWIN users do not have the ability to use the command line option. They must use the TIMEOUT command. Full support by BTEQWIN is expected in a future TTU release.

The TIMEOUT command cannot be used in an SQL macro.

Example 1 – Activation after BTEQ Invocation

The following input instruction shows a TIMEOUT command being used to indicate database sessions must be automatically logged off after 20 minutes of inactivity:

.timeout 20

Example 2 – Activation at Workstation BTEQ Invocation

The following invocation syntax shows a -t command line option used to indicate database sessions must be automatically logged off using the 10 minute default:

bteq -t

Example 3 – Activation at z/OS BTEQ Invocation

The following invocation syntax shows a -t command line option used to indicate database sessions must be automatically logged off after 15 minutes of inactivity. The option is actually supplied by passing a program parameter to the call made to BTEQ's executable module (for example from a CLIST). Should any runtime options also be needed, they would be supplied before the slash character. ASIS specifies that the program parameters are to be left in their original case. The myloadlib reference here would be replaced with the actual location of the target BTQMAIN module.

call 'myloadlib(btqmain)' '/-t 15' ASIS