RETRY
Purpose
Resubmits requests that fail under certain operational error conditions.
If the RETRY command has not been used, its value is ON by default. If the RETRY command is used but does not specify ON or OFF, BTEQ sets RETRY to ON.
Syntax
Usage Notes
When set to ON, the RETRY command option takes effect when BTEQ detects any of the following failure codes:
If any of these error conditions occur, or if an AP Reset condition occurs while a BTEQ job is running, BTEQ:
Except for the error messages and delayed responses, BTEQ processes the affected requests in a normal fashion, without additional user intervention.
When RETRY is OFF, BTEQ does not attempt to reconnect sessions.
Error 2631 – Transaction aborted due to %VSTR, may need to be remapped if the RETRY command option is set to OFF. BTEQ by default assigns Error 2631 an error level of zero. If a request is unsuccessfully retried after a deadlock, the final BTEQ error level will be raised.
The ERRORLEVEL command can be used to remap the default severity (for example, zero for Error 2631). The ERRORMAP command can be used to verify the error level currently assigned to Error 2631.
The RETRY command has no effect on other types of errors that might occur repeatedly while processing a REPEAT or = command, such as error 3807—Database does not exist.
BTEQ does not resubmit a request if Teradata Database restarts when the RETRY command option is set to OFF and the CLOSE option of the EXPORT command is specified. In this case, the query results are lost because the output file is either empty or it contains only some of the returned rows.
On workstation-attached systems, if the RETRY command option is set to ON during multiple sessions and the IMPORT command is used to provide data for USING modifiers, the data is saved in a buffer. This impacts system memory requirements, especially on a PC. The memory requirements can be calculated by multiplying the number of sessions by the amount of data. For example, if the maximum row size is 4,000 bytes and 10 sessions are in use, then BTEQ uses an additional 40,000 bytes. In this case, to avoid an out-of-memory condition for multiple sessions on the PC, set the RETRY command option to OFF.
When setting the RETRY command option to OFF, it remains off until either exiting BTEQ or using the RETRY command with the ON specification.
The RETRY command is valid in a Teradata SQL macro.
Example
To disable the RETRY command, type:
.SET RETRY OFF
Example
The Example 1 RETRY command in a Teradata SQL macro appears as:
ECHO '.SET RETRY OFF';