DB2 SQL Errors Codes and Error Messages and Warnings from Error -449 to -451
Error: DB2 SQL Error: SQLCODE=-449, SQLSTATE=42878, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
CREATE OR ALTER STATEMENT FOR
FUNCTION OR PROCEDURE
routine-name CONTAINS AN INVALID
FORMAT OF THE EXTERNAL NAME
CLAUSE OR IS MISSING THE
EXTERNAL NAME CLAUSE
Explanation: An error was found in the EXTERNAL
NAME clause of the CREATE FUNCTION, CREATE
PROCEDURE, ALTER FUNCTION, or ALTER
PROCEDURE statement for routine-name, or the clause
is needed but was not specified.
v For external routines with LANGUAGE JAVA, the
name must be specified and it must contain a valid
external-java-routine-name of the following form:
– No blanks are permitted within the single quotes.
– The method-name consists of the list of package-ids,
class-id, and method-id, and must not be longer
than 254 bytes.
– Zero or more package-ids can be specified,
preceding the class-id.
– The method-signature is optional, and is a list of
Java™ data types that are separated by commas. If
specified, the method-signature must not be longer
than 1024 bytes.
– If multiple strings are specified, the total length of
all the strings concatenated together for the
external-java-routine-name must not be greater than
v For external routines with a language other than
JAVA, the external name must be a short identifier
with letters or digits. The first character must be a
letter (this is the MVS naming convention for load
modules). A possible cause for this error is the
inclusion of a blank in the name.
If the clause is omitted, the external name defaults to
function-name. However, for CREATE FUNCTION or
CREATE PROCEDURE, if the function or procedure
name is longer than eight characters then the
EXTERNAL NAME clause must be explicitly
specified to specify a valid short identifier as the
System action: The statement cannot be executed.
User response: When LANGUAGE is JAVA, possible
v Omitting the EXTERNAL NAME clause.
v Including a blank.
v Having the ‘!’ at the beginning or end of the name.
v Specifying an invalid external-java-routine-name.
Programmer response: Correct the syntax of the SQL
statement. Refer to the SQL Reference for information on
the EXTERNAL NAME clause.
Error: DB2 SQL Error: SQLCODE=-450, SQLSTATE=39501, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
USER-DEFINED FUNCTION OR
STORED PROCEDURE name,
PARAMETER NUMBER parmnum,
OVERLAYED STORAGE BEYOND ITS
Explanation: Upon return from a specific function
name or a stored procedure name, DB2 has detected an
overlay storage beyond a parameter’s declared length.
The parameter number is specified for a stored
procedure or function. This is not permitted.
System action: Execution of the SQL statement is
Programmer response: Contact the author of the
function or your database administrator. Until it is
fixed, the function should not be used.
Error: DB2 SQL Error: SQLCODE=-451, SQLSTATE=42815, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE data-item DEFINITION IN THE
CREATE OR ALTER STATEMENT FOR
routine-name CONTAINS DATA TYPE
type WHICH IS NOT SUPPORTED FOR
THE TYPE AND LANGUAGE OF THE
Explanation: An error was made in the data-item part
of the CREATE or ALTER statement for routine-name.
The statement contained an invalid data type, or it
contained a distinct type which is based on the invalid
System action: The statement cannot be processed.
Programmer response: Correct the specification of the
routine and reissue the CREATE statement.
Above are list of DB2 SQL Errors and Warnings from Error -449 to -451 received while performing certain operation against DB2 Database or related products.
SQLCODE – Regardless of whether the application program provides an SQLCA or a stand-alone variable, SQLCODE is set by DB2 after each SQL statement is
executed. DB2 conforms to the ISO/ANSI SQL standard as follows:
If SQLCODE = 0, execution was successful.
If SQLCODE > 0, execution was successful with a warning.
If SQLCODE < 0, execution was not successful.
SQLCODE = 100, “no data” was found. For example, a FETCH statement returned no data because the cursor was positioned after the last row of the result table.
SQLSTATE – SQLSTATE is also set by DB2 after the execution of each SQL statement. Thus, application programs can check the execution of SQL statements by testing SQLSTATE instead of SQLCODE.
Hope this was helpful.
Information about DB2 SQL Error Codes and Error Messages on Windows, Linux and Z/OS Operating Systems.