SQLSTATE Values for Java External Procedures - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™

A Java external procedure can raise a java.lang.SQLException code with an exception number and message that are returned to the database and used to set the SQLSTATE and error message. Java exceptions thrown during the execution of a Java external procedure using SQL are often handled within Java. When this occurs, the exceptions do not affect SQL processing. Only those Java exceptions that are not handled within Java are seen in the SQL environment as SQL exception conditions.

When this occurs, the procedure returns an exception number and message to the database which the system then uses to set the SQLSTATE value and error message that it returns to the requestor.

The range for valid SQLSTATE SQLException codes is 38U00 - 38U99, inclusive.

Some predefined error cases, such as non-valid JAR name, that have specific codes defined by the ANSI SQL standard, are also supported. The Teradata implementation of Java external procedures follows those definitions. For more information, see Teradata Vantage™ - SQL External Routine Programming, B035-1147 and Teradata Vantage™ - SQL Stored Procedures and Embedded SQL, B035-1148.