IBM Books

Messages Reference


SQL0800 - SQL0899



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. 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>".

Cause: An error occurred while processing the current request.

Reason codes are interpreted as follows:

100
The request being made is not supported or is out of context.
101
SQLDA.SQLN is less than SQLDA.SQLD
102
SQLVAR.SQLTYPE is invalid.
103
The length specified in SQLVAR.SQLLEN or SQLVAR2.SQLLONGLEN is incorrect for the SQL type given in SQLVAR.SQLTYPE.
104
A Large Object SQLVAR is present, but the SQLDOUBLED field of SQLDA.SQLDAID is not set to '2'.
105
A double-byte character Large Object has an odd value indicated by the SQLVAR2.SQLDATALEN pointer, which is always in terms of bytes, even for DBCLOBs.
106
The SQLDATA pointer is invalid or points to insufficient storage.
107
The SQLIND pointer is invalid or points to insufficient storage.
108
The SQLDATALEN pointer is invalid or points to insufficient storage.
109
A specific number of input host variables/SQLVARS is expected for the current SQL statement.
110
The LOB locator is not associated with a LOB of a compatible type.
111
A LOB is indicated by the SQLTYPE of the SQLVAR, but the second SQLVAR is null.

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.

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



SQL0817N The SQL statement cannot be excuted because the statement will result in a prohibited update operation.

Cause: 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.

Action: 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.

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 not binding the DataJoiner packages at all applicable data sources.

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 1012. 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 server name does not specify an existing connection.

Cause: 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:

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 DB2 Connect).

The statement cannot be executed.

Action:

  1. Update the database manager configuration to specify a valid database for the tm_database parameter.

  2. Issue db2stop and db2start to ensure that the change takes effect.

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:

01
A database connection involved more than one redirection from a server to another server; only one connection redirection is supported.
02
A connection was attempted which involved both a current version of DB2 client or server and a version 1 client or server. This attempt failed because redirection is not supported with version 1 clients or servers.

Action: By the reason code, the actions are:

01
Recatalog the database so that there is no more than one server redirecting the connection to another server in the path of the connection.
02
Recatalog the database so that there is no intermediary server redirecting the connection.

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




[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]