DB2 SQL Errors Codes and Error Messages and Warnings from Error -058 to -078

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-058, SQLSTATE=428F2, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
VALUE SPECIFIED ON RETURN
STATEMENT MUST BE AN INTEGER
Explanation: A RETURN statement is specified in an
SQL procedure but the value specified is not an integer.
The return value for an SQL procedure must be an
integer.
System action: The statement cannot be processed.
User response: Specify an integer value on the
RETURN statement. Try the request again.
SQLSTATE: 428F2

Error: DB2 SQL Error: SQLCODE=-060, SQLSTATE=42815, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
INVALID type SPECIFICATION : spec
Explanation: type is either LENGTH or SCALE. spec is
the specified length or scale. Length or scale must be
specified by an unsigned integer constant and the value
must be in the range allowed by the data type.
For CREATE INDEX, a length specified for VARCHAR
must not be greater than 1000, and an integer specified
with DECFLOAT must be 34.
System action: The statement cannot be processed.
Programmer response: Correct the statement. Refer to
chapter 2 of SQL Reference for rules for length and
scale, and, the number of significant digits.
SQLSTATE: 42815

Error: DB2 SQL Error: SQLCODE=-078, SQLSTATE=42629, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
PARAMETER NAMES MUST BE
SPECIFIED FOR ROUTINE routine-name
Explanation: The routine does not have parameter
names specified for all parameters.
routine-name
The name of the routine.
When the SQL routine is defined with LANGUAGE
SQL, a parameter name is required for each parameter
that is defined. For native SQL procedures,
LANGUAGE SQL is optional, but for external SQL
procedures, LANGUAGE SQL is required.
System action: The statement cannot be processed.
Programmer response: Ensure that each defined
parameter includes a parameter name.
SQLSTATE: 42629

Above are list of DB2 SQL Errors and Warnings from Error -058 to -078 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.

Thanks,
SQLServerF1 Team
Information about DB2 SQL Error Codes and Error Messages on Windows, Linux and Z/OS Operating Systems.

 

Leave a Reply

Your email address will not be published. Required fields are marked *