SQL0801N Division by zero was attempted.
Explanation: 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.
User Response: 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.
Federated system 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.
Explanation: 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.
User Response: 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.
Federated system 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.
Explanation: 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.
User Response: 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.
Federated system 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. Reason code "<reason-code>". If a host variable or SQLVAR in the SQLDA is invalid then: host variable/SQLVAR number = "<var-number>", SQLTYPE = "<sqltype>", SQLLEN = "<sqllen>", host variable/SQLVAR type = "<input_or_output>".
Explanation: An error occurred while processing the current request.
Reason codes are interpreted as follows:
In SQL statements with host variables, use the host variable number to count in from the beginning of the statement (or substatement, in the case of compound SQL) to locate the invalid host variable. For statements using an SQLDA, the SQLVAR number is used to locate the invalid SQLVAR. For an input SQLDA, count only input host variables or SQLVARs; similarly for output. Note that this number is based at 1.
The statement cannot be processed.
User Response: 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.
Explanation: Possible causes for this message (SQLCODE) are:
The statement cannot be processed.
User Response: 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:
Federated system users: ensure that the packages required for the federated server are bound at the applicable data sources. Refer to the Installation and Configuration Supplement Guide for more information about binding packages to data sources.
sqlcode: -805
sqlstate: 51002
SQL0808N The CONNECT statement semantics are not consistent with those of other existing connections.
Explanation: 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.
User Response: 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.
Explanation: One of the following caused the error:
Federated system users: this situation can be detected by federated server or by the data source.
The statement cannot be processed.
User Response: 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.
Federated system 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
SQL0817N The SQL statement cannot be executed because the statement will result in a prohibited update operation.
Explanation: The application attempted to execute an SQL statement that would result in updates to user data or to the subsystem catalog. This is prohibited for one of the following reasons:
These SQL statements include INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, GRANT, and REVOKE.
The statement cannot be executed.
User Response: If the application is running as an IMS inquiry-only transaction, see your IMS system programmer about changing the inquiry-only status of the transaction under which your application is running.
If the IMS or CICS application is attempting a remote update, either the application must be changed to run as a local application on the server DBMS, or the server DBMS must be upgraded to support two-phase commit.
If the application is attempting to update data at multiple locations, either the application must be changed, or all DBMSs involved must be upgraded to support two-phase commit.
sqlcode: -817
sqlstate: 25000
SQL0818N A timestamp conflict occurred.
Explanation: 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:
Federated system users: in addition to the causes listed previously, the problem can also be due to not binding the required packages at all applicable data sources.
The statement cannot be processed.
User Response: 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.
Federated system users: in addition to the previously listed actions, ensure that the packages required for the federated server are bound at the applicable data sources. Refer to the Installation and Configuration Supplement for more information on binding packages to data sources.
sqlcode: -818
sqlstate: 51003
SQL0822N The SQLDA contains a data address or indicator variable address which is not valid.
Explanation: The application program placed an address that is not valid in the SQLDA.
The statement cannot be processed.
User Response: 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.
Explanation: 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 1012. The maximum for SELECT lists in common table expressions is 5000.
The statement cannot be processed.
User Response: 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.
Explanation: SQLRULES(STD) is in effect and a CONNECT statement identifies an existing SQL connection.
User Response: The correction depends on the error:
Correct the error in the application and try again.
sqlcode: -842
sqlstate: 08002
SQL0843N The server name does not specify an existing connection.
Explanation: A statement, command, or API specified a server name that does not identify an existing SQL connection of the application process.
This may have occurred using:
User Response: 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>".
Explanation: 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:
User Response: Possible actions:
sqlcode: -859
sqlstate: 08502
SQL0863W A successful connection was made, but only single byte characters should be used.
Explanation: 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).
Federated system users: possible causes are:
User Response: Do not submit SQL statements or commands that use characters which are not common between the application and database codepages.
Federated system users: do not submit SQL statements or commands that use characters which are not common between the client system, the federated system, and the data source.
sqlcode: +863
sqlstate: 01539
SQL0865N Invalid tm_database value.
Explanation: 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 DB2 Connect).
The statement cannot be executed.
User Response:
sqlcode: -865
sqlstate: 08001
SQL0866N Connection redirection failed. Reason code: "<reason-code>"
Explanation: Directory cataloging for a database caused a connection to be redirected in a manner which is not supported.
Possible reason codes are:
User Response: 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.
Explanation: A current or dormant connection to a server exists, and an attempt to CONNECT to this server using the USER/USING clause is invalid.
User Response: Possible actions:
sqlcode: -868
sqlstate: 51022