Database Error and Failure Codes - Teradata Tools and Utilities

Teradata® Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

Product
Teradata Tools and Utilities
Release Number
17.00
Published
June 2020
Language
English (United States)
Last Update
2020-06-18
dita:mapPath
lvt1544831946862.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2417
lifecycle
previous
Product Category
Teradata Tools and Utilities

The database uses error codes and failure codes to provide information about operations. The absence of an Error parcel or StatementError Parcel represents an error code of zero. The absence of a Failure parcel represents a failure code of zero. An Error parcel, StatementError parcel, or Failure parcel contains a nonzero code and represents an exception. For more information, see Error and Failure Codes and Crash and Recovery.

Sometimes, both client and database sources must be checked. For instance, on a call to DBCHCL for the Fetch function, a return code of zero means that the client software has set a pointer to information in the response buffer. Not until the information is examined does the application know what the database “has to say.” For example, the return code may be zero and the parcel successfully pointed to may be a Failure parcel.

A code value represents the answer to a particular repeat of a particular operation. For instance, suppose CLIv2 is obtaining a response buffer and the database cannot provide more of the response because the system has restarted. The application would then discover a Failure parcel in the response buffer after a number of normal parcels.