SQL0801N Division by zero was attempted.
Cause: The processing of a column function or arithmetic expression resulted in division by zero.
The statement cannot be processed. For the INSERT, UPDATE, or DELETE statements, no inserts or updates are performed.
Action: Examine the SQL statement to determine the cause of the problem. If the problem is data dependent, it is necessary to examine the data processed when the error occurred. Refer to the SQL Reference to see the valid ranges for the data types.
DataJoiner users: examine the SQL statement to determine the cause of the problem. If the problem is data dependent, examine the data being processed at the data sources when the error occurred.
sqlcode: -801
sqlstate: 22012
SQL0802N Arithmetic overflow or other arithmetic exception occurred.
Cause: The processing of a column function or arithmetic expression has resulted in an arithmetic overflow.
The statement cannot be processed. For the INSERT, UPDATE, or DELETE statements, no inserts or updates are performed.
Action: Examine the SQL statement to determine the cause of the problem. If the problem is data dependent, it is necessary to examine the data processed when the error occurred. Refer to the SQL Reference to see the valid ranges for the data types.
DataJoiner users: examine the SQL statement to determine the cause of the problem. If the problem is data dependent, examine the data being processed at the data sources when the error occurred. Refer to the corresponding SQL Reference for the data source to determine the valid ranges for the data types.
sqlcode: -802
sqlstate: 22003
SQL0803N One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because they would produce duplicate rows for a table with a primary key, unique constraint, or unique index.
Cause: The INSERT or UPDATE object table is constrained by one or more UNIQUE indexes to have unique values in certain columns or groups of columns. Alternatively, a DELETE statement on a parent table caused the update of a foreign key in a dependent table that is constrained by one or more UNIQUE indexes to have unique values in certain columns or groups of columns. The unique index may exist to support a primary key or unique constraint defined on the table. Completing the requested insert or update results in duplicates of the column values.
Alternatively, if a view is the object of the INSERT or UPDATE statement, it is the table on which the view is defined that is constrained.
The statement cannot be processed. The table remains unchanged.
Action: Examine the definitions for all UNIQUE indexes defined on the object table to determine the uniqueness constraints those indexes impose.
For an UPDATE statement, ensure that the specified operation is not itself inconsistent with those uniqueness constraints. If this does not show the error, examine the object table content to determine the cause of the problem.
For an INSERT statement, examine the object table content to determine which of the values in the specified value list violates the uniqueness constraint. Alternatively, if the INSERT statement contains a subquery, the object table contents addressed by that subquery must be matched against the object table contents to determine the cause of the problem.
For a DELETE statement, examine the dependent tables for unique constraints on foreign keys that are defined with the rule ON DELETE SET NULL. One such table has a foreign key column included in a unique index that cannot be set to null since there is already a null in the column for that table.
DataJoiner users: isolate the problem to the data source failing the request (refer to the Problem Determination Guide to determine which data source is failing to process the SQL statement) and examine the index definitions and data for the conditions listed previously.
sqlcode: -803
sqlstate: 23505
SQL0804N The application program input parameters for the current request are not valid.
Cause: An error occurred while processing the current request.
The call parameter list (which may have been created by the precompiler) may be not correct. This can occur if the application programmer has modified the output of the precompiler, used a variable name beginning with SQL in the application program, or overwrote the call parameter list in another way.
The problems may include the following:
The SQLDA, which is created by the application program, may be invalid for one of the following reasons:
The statement cannot be processed.
Action: Examine the application program for any errors noted. Note that the programmer should not attempt to modify the precompiler output.
sqlcode: -804
sqlstate: 07002
SQL0805N Package "<package-name>" was not found.
Cause: Possible causes for this message (SQLCODE) are:
The statement cannot be processed.
Action: Specify the correct package name or bind the program. If the application being run is not bound to the database, contact the database administrator to do the necessary binding.
If the DB2 utility programs need to be rebound to the database, the database administrator can accomplish this by issuing one of the following CLP command from the bnd subdirectory of the instance, while connected to the database:
DataJoiner users: ensure that the packages required for DataJoiner are bound at the applicable data sources. Refer to the IBM DataJoiner Planning, Installation, and Configuration Guide for more information on binding packages DataJoiner uses to the data sources.
sqlcode: -805
sqlstate: 51002
SQL0808N The CONNECT statement semantics are not consistent with those of other existing connections.
Cause: The CONNECT statement originates from a source file which was precompiled having different connection options (SQLRULES, CONNECT type, SYNCPOINT, or RELEASE type) than that of a source file for which a connection exists.
Action: Ensure that all source files are precompiled using the same CONNECT options, or if this is not possible, call the SET CLIENT api to set the desired options for the application process before issuing the first CONNECT statement.
sqlcode: -808
sqlstate: 08001
SQL0811N The result of a scalar fullselect, SELECT INTO statement, or VALUES INTO statement is more than one row.
Cause: One of the following caused the error:
DataJoiner users: this situation can be detected by DataJoiner or by the data source.
The statement cannot be processed.
Action: Ensure that the statement contains the proper condition specifications. If it does, there may be a data problem that is causing more than one row to be returned when only one is expected.
DataJoiner users: isolate the problem to the data source failing the request (refer to the Problem Determination Guide to determine which data source is failing to process the SQL statement) and examine the selection criteria and data for that object.
sqlcode: -811
sqlstate: 21000
SQL0818N A timestamp conflict occurred.
Cause: The timestamp generated by the precompiler at precompile time is not the same as the timestamp stored with the package at bind time.
This problem can be caused by the following:
DataJoiner users: in addition to the causes listed previously, the problem can also be due to:
The statement cannot be processed.
Action: Bind the application again, using the bind file for the program that matches the object module. Or, execute the program that corresponds to the package stored in the database.
If installing the sample database, record the number and text of this message and then contact your technical service representative.
DataJoiner users: in addition to the previously listed actions, ensure that the packages required for DataJoiner are bound at the applicable data sources. Refer to the IBM DataJoiner Planning, Installation, and Configuration Guide for more information on binding packages DataJoiner uses to the data sources.
sqlcode: -818
sqlstate: 51003
SQL0822N The SQLDA contains a data address or indicator variable address which is not valid.
Cause: The application program placed an address that is not valid in the SQLDA.
The statement cannot be processed.
Action: Correct the application program so that valid addresses are placed in SQLDA.
sqlcode: -822
sqlstate: 51004
SQL0840N Too many items were returned in a SELECT list.
Cause: The number of items returned in the SELECT list exceeds the allowable maximum. The maximum for SELECT lists (other than on common table expressions) is 500. The maximum for SELECT lists in common table expressions is 5000.
The statement cannot be processed.
Action: Determine whether all the information is actually needed. (Note that the number of items returned by the SELECT list * in the SQL statement SELECT * from A, B, C is the sum of the number of columns in all three tables.) If possible, rewrite the SQL statement so only the necessary items of information are returned. If all the information is necessary, break the SQL statement into two or more statements.
sqlcode: -840
sqlstate: 54004
SQL0842N A connection to server "<server-name>" already exists.
Cause: SQLRULES(STD) is in effect and a CONNECT statement identifies an existing SQL connection.
Action: The correction depends on the error:
Correct the error in the application and try again.
sqlcode: -842
sqlstate: 08002
SQL0843N The SET CONNECTION, DISCONNECT or RELEASE statement must specify an existing connection.
Cause: One of the following rules was violated:
Action: The correction depends on the error:
Correct the error in the application and try again.
sqlcode: -843
sqlstate: 08003
SQL0859N Access to the Transaction Manager Database failed with SQLCODE "<SQLCODE>".
Cause: The application was precompiled with SYNCPOINT(TWOPHASE) and requires a Transaction Manager Database to coordinate the two phase commit. Reasons why the Transaction Manager Database is not available might include the following:
Action: Possible actions:
sqlcode: -859
sqlstate: 08502
SQL0863W A successful connection was made, but only single byte characters should be used.
Cause: The server database and client application are using codepages for different language types and any characters outside the 7-bit ASCII range cannot be guaranteed (only the characters in the 7-bit ASCII range exist in all codepages). For example, the connection might be between a Japanese and a Latin-1 codepage, but none of the Japanese characters will be available in the Latin-1 codepage, so all of these characters should be avoided (English characters are fine though).
DataJoiner users: possible causes are:
Action: Do not submit SQL statements or commands that use characters which are not common between the application and database codepages.
DataJoiner users: do not submit SQL statements or commands that use characters which are not common between the client system, the DataJoiner system, and the data source.
sqlcode: +863
sqlstate: 01539
SQL0865N Invalid tm_database value.
Cause: The database chosen as the tm_database in the database manager configuration is not valid. The database must be at level DB2 V2.1 or later, and cannot be a database accessed through DRDA protocol (ie. through DDCS).
The statement cannot be executed.
Action:
sqlcode: -865
sqlstate: 08001
SQL0866N Connection redirection failed. Reason code: "<reason-code>"
Cause: Directory cataloging for a database caused a connection to be redirected in a manner which is not supported.
Possible reason codes are:
Action: By the reason code, the actions are:
sqlcode: -866
sqlstate: 08001
SQL0868N A CONNECT using a USER/USING clause was attempted to a server for which a connection already exists.
Cause: A current or dormant connection to a server exists, and an attempt to CONNECT to this server using the USER/USING clause is invalid.
Action: Possible actions:
sqlcode: -868
sqlstate: 51022