SET CRASH | Teradata Vantage - SET CRASH - Advanced SQL Engine - Teradata Database

SQL Stored Procedures and Embedded SQL

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
xqq1557098602407.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1148
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

Sets the wait_across_crash (WAC) and tell_about_crash (TAC) options for handling node crashes.

Invocation

Executable.

Embedded SQL only.

Syntax

SET CRASH { WAIT_NOTELL | NOWAIT_TELL }
WAIT_
Specifies that WAC is to be set to Y and that TAC is to be set to N at runtime.
This is the default crash option setting.
NOWAIT_TELL
Specifies that WAC is to be set to N and TAC is to be set to Y at runtime.

ANSI Compliance

SET CRASH is a Teradata extension to the ANSI/ISO SQL:2011 standard.

Authorization

None.

Usage

SET CRASH is enabled only for workstation-attached platforms. Mainframe precompilers generate an error if this statement is precompiled.

The crash options are in effect for all embedded SQL statements executed after SET CRASH is executed, including LOGON and CONNECT requests, until another SET CRASH is executed.

Preprocessor Behavior When a Node Resets

The following table describes the behavior of the preprocessor when a node resets:

IF the Preprocessor is running on … THEN it …
a resetting node aborts.

Preprocessing must be restarted after the node resets.

This is equivalent to the situation where a utility or application is initiated on an external client that fails.

any of the following:
  • Non-resetting node
  • LAN-attached client
  • Workstation-attached client
reconnects its session (if connected to a Teradata Database) and the current SQL statement undergoing a syntax check returns an error.

Restart preprocessing to ensure complete syntax checking.

Application Behavior When a Node Resets

The behavior of embedded SQL applications when a node resets depends on:
  • The type of node on which the preprocessor is running
  • The crash notification setting

If an embedded SQL application is running on a resetting node, then it aborts and must be restarted after the node resets.

This is equivalent to the situation where a utility or application is initiated on an external client that fails.

Application Behavior When SET CRASH = WAIT_NOTELL

The behavior of embedded SQL applications when a node resets, SET CRASH = WAIT_NOTELL, and the application is running on any of the following environments is explained following the list:
  • Non-resetting node
  • Workstation-attached client
  • Mainframe-attached client

The application reconnects its session and returns one of the following error codes from the Teradata Database; the embedded SQL application takes action appropriate to the error condition:

Code Description
Error 2825 No record of the last request found after Teradata Database restart.
Error 2826 Request completed but all output was lost due to Teradata Database restart.
Error 2828 Request was rolled back during Teradata Database recovery.
Error 3120 Request aborted because of a Teradata Database recovery.

Application Behavior When SET CRASH = NOWAIT_TELL

The behavior of embedded SQL applications when a node resets and SET CRASH = NOWAIT_TELL for the following environments:
  • Non-resetting node
  • Workstation-attached client
  • Mainframe-attached client

is explained as follows:

The application immediately disconnects the session and the application receives one of the following CLI error codes:

Code Description
Error 219 (EM_DBC_CRASH_B) Server connection lost (network or server problem).
Error 220 (EM_DBC_CRASH_A)

An implicit CLI DISCONNECT request is issued to release any CLI resources tied to the crashed request and session. Any outstanding cursor and dynamic statement resources tied to the crashed session are also released.