SQL0250 - SQL0499
SQL Message ID | Message | Explanation | User Response |
---|---|---|---|
SQL0257N | Raw device containers are not supported. |
An attempt was made to use raw device containers but one of the following conditions is true:
|
In a DB2 pureScale environment: No response is required. You cannot use raw device containers in a DB2 pureScale environment. In environments that are not DB2 pureScale environments:
sqlcode: -257 sqlstate: 42994 |
SQL0258N |
Neither container operations nor a REBALANCE can be performed while a rebalance of the table space is pending or in progress. |
One of the following conditions is true:
|
Perform the response that is appropriate to the condition:
sqlcode: -258 sqlstate: 55041 |
SQL0259N |
Container map for table space is too complicated. |
The map structure keeps a record of how the table space address space is mapped to the various containers. If this gets too complicated, it does not fit in the table space file. |
The table space may need to be rebalanced to more evenly distribute the data among the containers. This may simplify the mapping. If this does not work, try making as many containers as possible the same size. Existing container sizes can be changed by backing up the table space and then using the database administration utility to change the containers. Restore the table space to the new containers. sqlcode: -259 sqlstate: 54037 |
SQL0260N |
Column column-name cannot belong to either the distribution key or the table partitioning key because it is either a LONG column, DATALINK column, XML column, or structured type column. |
Neither the distribution key nor the table partitioning key can have a LONG column, DATALINK column, XML column, or structured type column. The statement cannot be processed. |
Do not use LONG columns, DATALINK columns, XML columns, or structured type columns for either the distribution key or the table partitioning key. If the table needs to be distributed and only has LONG columns, DATALINK columns, XML columns, or structured type columns, either add a column that can be used for the distribution key to the table, or define the table without a distribution key in a single-partition database partition group. If the table needs to be partitioned and only has LONG columns, DATALINK columns, XML columns, or structured type columns, either add a column that can be used for the partitioning key of the table, or define a nonpartitioned table. sqlcode: -260 sqlstate: 42962 |
SQL0262N |
Table table-name cannot be created in the database partition group group-name because no column exists that can be used as the distribution key. |
The table table-name cannot be created in a database partition group. The table must have at least one column that can be used as the distribution key. Columns of the following data types cannot be used in a distribution key:
The statement cannot be processed. |
Either create the table with one or more columns that can be used in a distribution key, or create the table in a single database partition group. sqlcode: -262 sqlstate: 428A2 |
SQL0263N |
Member range from member-number-1 to member-number-2 is not valid. The second member number must be greater than or equal to the first member number. |
The specified member range is not valid. The statement cannot be processed. |
Correct the member range in the statement, then try the request again. sqlcode: -263 sqlstate: 428A9 |
SQL0264N |
Partitioning key cannot be added or dropped because table resides in a table space defined on the multi-partition database partition group name. |
You can only add or drop a partitioning key on a table in a single database partition group. The statement cannot be processed. |
Do one of the following and try the request again:
sqlcode: -264 sqlstate: 55037 |
SQL0265N |
A duplicate member number or database partition number was detected in the list of database partition numbers. |
For the CREATE DATABASE PARTITION GROUP statement, a database partition number can only appear once in the ON DBPARTITIONNUMS clause. For the CREATE TABLESPACE and ALTER TABLESPACE statement, a database partition number can appear only once and in only one ON DBPARTITIONNUMS clause. For the ALTER DATABASE PARTITION GROUP statement or REDISTRIBUTE DATABASE PARTITION GROUP command, one of the following occurred:
The statement cannot be processed. For a call WLM_ALTER_MEMBER_SUBSET statement, the member to be added is already a member of the member subset. |
Ensure that the database partition names or database partition numbers in the ON DBPARTITIONNUMS, ADD DBPARTITIONNUMS, or DROP DBPARTITIONNUMS clause are unique. For the CREATE TABLESPACE and ALTER TABLESPACE statements, ensure that a database partition number appears in no more than one ON DBPARTITIONNUMS clause. In addition, for the ALTER DATABASE PARTITION GROUP statement or REDISTRIBUTE DATABASE PARTITION GROUP command:
For the call WLM_ALTER_MEMBER_SUBSET statement, remove the member number from the member list. sqlcode: -265 sqlstate: 42728 |
SQL0266N |
The specified member number or database partition number member-number is not valid. |
The specified member number or database partition number member-number is not valid for one of the following reasons:
The statement cannot be processed. |
Depending on the condition:
sqlcode: -266 sqlstate: 42729 |
SQL0268N |
operation cannot be performed while the database partition group is being redistributed. |
One of the following applies, as indicated by operation:
The statement cannot be processed. |
Wait until the redistribution is complete, then try the request again. sqlcode: -268 sqlstate: 55038 |
SQL0269N |
Database contains maximum number of partitioning maps. |
Because the database contains the maximum number of partitioning maps (32,768), you cannot create a new database partition group, alter a database partition group, or redistribute an existing one. The statement cannot be processed. |
Drop one or more database partition group in the database. Note: Dropping a database partition group drops all database objects such as table spaces, tables and views that reside in the database partition group. sqlcode: -269 sqlstate: 54033 |
SQL0270N |
Function not supported (Reason code = reason-code). |
The statement cannot be processed because it violates a restriction as indicated by the following reason code:
|
The action corresponding to the reason code is as follows:
sqlcode: -270 sqlstate: 42997 |
SQL0271N |
Index file for table with fid fid is either missing, or is not valid. |
The index file for the table with fid fid is required during processing. The file is either missing, or it is not valid. The statement cannot be processed, and the application is still connected to the database. This condition does not affect other statements that do not use the index on this table. |
Ensure that all users are disconnected from the database, then issue the RESTART DATABASE command on all nodes. Then try the request again. The index (or indexes) is re-created when the database is restarted. sqlcode: -271 sqlstate: 58004 |
SQL0276N |
The connection failed because the database is in "restore pending" state or in "upgrade pending" state. Database name: database-name. |
This message can be returned for two reasons:
|
sqlcode: -276 sqlstate: 08004 |
SQL0279N |
The database connection has been terminated during COMMIT or ROLLBACK processing. The transaction could be indoubt. Reason code = reason-code. |
Commit processing encountered an error. The transaction has been put in the commit state, but the commit processing might not have completed. The application's database connection has been terminated. The cause of the error is indicated by the reason-code:
|
Determine the cause of the error. It might be necessary to contact the system administrator for assistance because the most common cause of the error is node failure or connection failure. The RESTART DATABASE command will complete the commit processing for this transaction. sqlcode: -279 sqlstate: 08007 |
SQL0280W |
View, trigger or materialized query table name has replaced an existing inoperative view, trigger or materialized query table. |
An existing inoperative view, trigger or materialized query table name was replaced by:
|
None required. sqlcode: +280 sqlstate: 01595 |
SQL0281N |
Table space tablespace-name cannot be altered with additional containers because it is a system managed table space. |
Additional containers cannot be added to a system managed table space. The exception to this is when a database partition group was modified to add a node without table spaces, then containers can be added once on the new node using the ALTER TABLESPACE command. In general, the table space must be managed by the database in order to add additional containers. The statement cannot be processed. |
To add more containers to a system managed table space, drop and recreate the table space with more containers, ensuring that each container is of the same size and less than the container size limit, or change to a DMS table space. sqlcode: -281 sqlstate: 42921 |
SQL0282N |
Table space tablespace-name cannot be dropped because at least one of the tables in it, table-name, has one or more of its parts in another table space. |
A table in the specified table space does not contain all of its parts in that table space. If more than one table spaces are specified, then a table in one of the specified table spaces does not contain all of its parts in the list. The base table, indexes, or long data may be in another table space, so dropping the table space(s) will not completely drop the table. This would leave the table in an inconsistent state and therefore the table space(s) cannot be dropped. |
Ensure that all objects contained in table space tablespace-name contain all their parts in this table space before attempting to drop it, or include those table spaces containing the parts in the list to be dropped. This may require dropping the table table-name before dropping the table space. sqlcode: -282 sqlstate: 55024 |
SQL0283N |
System temporary table space tablespace-name cannot be dropped because it is the only system temporary table space with a page-size page size in the database. |
A database must contain at least one system temporary table space with the same page size as the page size of the catalog tablespace. Dropping table space tablespace-name would remove the last system temporary tablespace with a page-size page size from the database. |
Ensure there will be another system temporary table space with a page-size page size in the database before attempting to drop this table space. sqlcode: -283 sqlstate: 55026 |
SQL0284N |
Table creation failed because the table space tablespace-name that was specified in the statement after the clause clause is not a supported type of table space for that clause. Table space type: tablespace-type. |
This message is returned when an attempt is made to create a table with properties that are not supported with the type of table space in which the table is being created. This message can be returned when the following types of SQL statements are executed:
Examples of the kinds of incompatibilities that can cause this message to be returned include the following situations:
|
Correct the statement to specify a table space with the correct type for the clause clause. sqlcode: -284 sqlstate: 42838 |
SQL0285N |
The indexes and/or long columns for table table-name cannot be assigned to separate table spaces because the primary table space tablespace-name is a system managed table space. |
If the primary table space is a system managed table space, all table parts must be contained in that table space. A table can have parts in separate table spaces only if the primary table space, index table space and long table space are database managed table spaces. |
Either specify a database managed table space for the primary table space, or do not assign the table parts to another table space. sqlcode: -285 sqlstate: 42839 |
SQL0286N |
A table space could not be found with a page size of at least pagesize that authorization ID user-name is authorized to use. |
The CREATE TABLE, CREATE GLOBAL TEMPORARY TABLE, or DECLARE GLOBAL TEMPORARY TABLE statement did not specify a table space, and a table space of the right type (USER TEMPORARY for created temporary table or declared temporary table) with sufficient page size (at least pagesize), over which authorization ID user-name has USE privilege, could not be found. Sufficient page size for a table is determined by either the byte count of the row or the number of columns. |
Ensure the existence of a table space of the correct type (REGULAR or USER TEMPORARY) with a page size of at least pagesize and that authorization ID user-name has USE privilege on this table space. sqlcode: -286 sqlstate: 42727 |
SQL0287N |
SYSCATSPACE cannot be used for user objects. |
The CREATE TABLE or GRANT USE OF TABLESPACE statement specified a table space named SYSCATSPACE which is reserved for catalog tables. |
Specify a different table space name. sqlcode: -287 sqlstate: 42838 |
SQL0288N |
The statement failed because a large table space cannot be defined when specifying the MANAGED BY SYSTEM clause. |
A LARGE table space is defined to store large objects and long strings. These objects can only be stored in table spaces that are defined as automatic storage. This message is returned when an attempt was made to create a large table space as a system managed table space. |
To resolve the issue reported by this message, here are some examples of the actions that you can perform:
sqlcode: -288 sqlstate: 42613 |
SQL0289N |
Unable to allocate new pages in table space tablespace-name. |
One of the following conditions is true on one or more database partitions:
|
Perform the action corresponding to the cause of the error:
sqlcode: -289 sqlstate: 57011 |
SQL0290N |
Table space access is not allowed. |
A process attempted to access a table space which is in an invalid state, for which the intended access is not allowed.
|
Possible actions include:
Refer to the Administration Guide for further information about the table space states. sqlcode: -290 sqlstate: 55039 |
SQL0291N |
State transition not allowed on table space. |
An attempt was made to change the state of a table space. Either the new state is not compatible with the current state of the table space, or an attempt was made to turn off a particular state and the table space was not in that state. |
Table space states change when a backup is taken, the load completes, the rollforward completes, etc., depending on the current state of the table spaces. Refer to the systems administration guide for further information about the table space states. sqlcode: -291 sqlstate: 55039 |
SQL0292N |
An internal database file could not be created. |
An internal database file could not be created. |
Check that the directory containing the file is accessible (for example, mounted) and writeable by the database instance owner. sqlcode: -292 sqlstate: 57047 |
SQL0293N |
Error accessing a table space container. |
This error may be caused by one of the following conditions:
This error can be returned during database startup and during the processing of the ALTER TABLESPACE SQL statement. |
Try the following actions:
If the error was returned from the processing of an ALTER TABLESPACE SQL statement with the SWITCH ONLINE option, then re-issue the statement after correcting the problem. If the error persists, call your IBM service representative. sqlcode: -293 sqlstate: 57048 |
SQL0294N |
The container is already in use. |
Table space containers cannot be shared. The possible causes of this error include the following.
|
Ensure the containers are unique.
sqlcode: -294 sqlstate: 42730 |
SQL0295N |
The combined length for all container names for the table space is too long. |
The total space required to store the list of containers exceeds the space allotted for this table space in the table space file. |
Try one or more of the following:
sqlcode: -295 sqlstate: 54034 |
SQL0296N |
The CREATE statement failed because a database limit for the object has been reached. Limit: limit-number. Object type keyword: object-keyword |
This message is returned when an attempt is made to create a database object when there are already the maximum number of that type of database object defined for the database. |
Respond to this error in one of the following ways:
sqlcode: -296 sqlstate: 54035 |
SQL0297N |
Path name for container or storage path is too long. |
One of the following conditions is true:
|
Shorten the path length. sqlcode: -297 sqlstate: 54036 |
SQL0298N |
Bad container path. |
The container path violates one of the following requirements:
This message will also be returned if any other unexpected error occurred which prevents DB2 from accessing the container. If you are using a cluster manager, this error can be returned if the database manager failed to add the database container path to the cluster manager configuration. If the cluster manager cannot access this path, the cluster manager will not be able to successfully manage a failover involving this path. Error messages from the cluster manager will be recorded in the db2diag log file. |
Specify another container location or change the container to make it acceptable to DB2 (such as changing file permissions) and try again. If you are using a cluster manager, correct the problem and resubmit the command:
sqlcode: -298 sqlstate: 428B2 |
SQL0299N |
Container is already assigned to the table space. |
The container that you are attempting to add has already been assigned to the table space. |
Choose another container and try again. sqlcode: -299 sqlstate: 42731 |
SQL0301N |
The value of input variable, expression or parameter number number cannot be used because of its data type. |
A variable, expression, or parameter in position number could not be used as specified in the statement because its data type is incompatible with the intended use of its value. This error can occur as a result of specifying an incorrect host variable or an incorrect SQLTYPE value in a SQLDA on an EXECUTE or OPEN statement. In the case of a user-defined structured type, the associated built-in type of the host variable or SQLTYPE might not be compatible with the parameter of the TO SQL transform function defined in the transform group for the statement. In the case of performing an implicit or explicit cast between character and graphic data types, this error indicates that such a cast was attempted with a non-Unicode character or graphic string. The statement cannot be processed. |
Verify that the data types of all host variables in the statement are compatible with the manner in which they are used. sqlcode: -301 sqlstate: 07006 |
SQL0302N |
The value of a host variable in the EXECUTE or OPEN statement is out of range for its corresponding use. |
The value of an input host variable was found to be out of range for its use in the SELECT, VALUES, or prepared statement. One of the following occurred:
This error occurs as a result of specifying either an incorrect host variable or an incorrect SQLLEN value in an SQLDA on an EXECUTE or OPEN statement. The statement cannot be processed. |
Ensure that the input host variable value is the correct type and length. If the input host variables supply values to parameter markers, match values with the implied data type and length of the parameter marker. Federated system users: for a pass-through session, determine what data source is causing the error. Examine the SQL dialect for that data source to determine which specific restriction has been violated, and adjust the failing statement as needed. sqlcode: -302 sqlstate: 22001, 22003 |
SQL0303N |
A value cannot be assigned to a host variable in the SELECT, VALUES, FETCH or assignment statement because the data types are not compatible. |
An embedded SELECT, VALUES, FETCH or assignment statement assigns to a host variable, but the data type of the variable is not compatible with the data type of the corresponding SELECT-list, VALUES-list, or right-hand side of the assignment statement element. For a user-defined data type, the host variable might be defined with an associated built-in data type that is not compatible with the result type of the FROM SQL transform function defined in the transform group for the statement. For example, if the data type of the column is date or time, the data type of the variable must be character with an appropriate minimum length. The statement cannot be processed. |
Verify that the table definitions are current and that the host variable has the correct data type. For a user-defined data type, verify that the associated built-in type of the host variable is compatible with the result type of the FROM SQL transform function defined in the transform group for the statement. sqlcode: -303 sqlstate: 42806 |
SQL0304N |
A value cannot be assigned to a host variable because the value is not within the range of the host variable's data type. |
A FETCH, VALUES, SELECT, or assignment into a host variable list failed because the host variable was not large enough to hold the retrieved value. The statement cannot be processed. No data was retrieved. |
Verify that table definitions are current and that the host variable has the correct data type. For the ranges of SQL data types, refer to the SQL Reference. Federated system users: for the ranges of data types that are returned from a data source, refer to the documentation for that data source. sqlcode: -304 sqlstate: 22001, 22003 |
SQL0305N |
The NULL value cannot be assigned to a host variable because no indicator variable is specified. |
A FETCH, assignment, or embedded SELECT or VALUES operation resulted in the retrieval of a NULL value to be inserted into a host variable for which no indicator variable was provided. An indicator variable must be supplied if a column can return a NULL value. The statement cannot be processed. No data was retrieved. |
Examine the definition of the FETCH or SELECT object table, the elements of the VALUES list, or the right-hand side of the assignment statement. Correct the program to provide indicator variables for all host variables where NULL values from those columns can be retrieved. sqlcode: -305 sqlstate: 22002 |
SQL0306N |
The host variable name is undefined. |
The host variable name is not declared in any DECLARE SECTION. The statement cannot be processed. |
Ensure that the host variable is declared and the name spelled correctly. |
SQL0307N |
The host variable name is already defined. |
The host variable name has already been declared in a DECLARE SECTION. The definition is ignored. The previous definition is used. |
Ensure that the host variable name is spelled correctly and the name is defined only once for each program. |
SQL0308N |
The limit on the number of host variables has been reached. |
The limit on the number of host variables is dependent on how many will fit in the HOST_VARS column of SYSPLAN. This limit has been reached. The remaining variable declarations are ignored. |
Either simplify the program, split the program into smaller, separate programs, or do both. |
SQL0309N |
The value of a host variable in the OPEN statement is NULL, but its corresponding use cannot be NULL. |
The value of an input host variable was found to be NULL but the corresponding use in the SELECT, VALUES, or prepared statement did not specify an indicator variable. The statement cannot be processed. |
Ensure you need a USING clause. Otherwise, ensure an indicator variable is specified only if required. sqlcode: -309 sqlstate: 07002 |
SQL0310N |
SQL statement contains too many host variables. |
The maximum number of host variables was exceeded in the statement. The statement cannot be processed. |
Ensure the statement has fewer host variables or is less complex. |
SQL0311N |
The length of string host variable number var-number is negative or greater than the maximum. |
When evaluated, the length specification for the string host variable, whose entry in the SQLDA is indicated by <var-number> (based at 1), was negative or greater than the maximum defined for that host variable. The statement cannot be processed. |
Correct the program to ensure that the lengths of all string host variables are not negative or that they are not greater than the maximum allowed length. sqlcode: -311 sqlstate: 22501 |
SQL0312N |
The statement was not processed because the following host variable is either undefined or used in a way that is unsupported: variable_name. |
This message can be returned when a host variable is used in the following invalid ways:
|
Take one of the following steps and then execute the statement again:
sqlcode: -312 sqlstate: 42618 |
SQL0313N |
The number of variables in the EXECUTE statement, the number of variables in the OPEN statement, or the number of arguments in an OPEN statement for a parameterized cursor is not equal to the number of values required. |
The number of variables specified in the EXECUTE or OPEN statement does not equal the number of variables required for the parameter markers appearing in the SQL statement. If a parameterized cursor is referenced, the number of cursor arguments is not the same as the number expected. |
Correct the application program so the number of variables specified in the EXECUTE or OPEN statement is correct for the parameter markers in the SQL statement. Correct the parameterized cursor reference so that the correct number of arguments is specified. sqlcode: -313 sqlstate: 07001, 07004 |
SQL0314N |
The host variable name is incorrectly declared. |
The host variable name is not declared correctly for one of the following reasons:
The variable remains undefined. |
Ensure that you correctly specify only the declarations the database manager supports. |
SQL0315N |
The host variable is incorrectly declared. |
The host variable is not declared correctly for one of the following reasons:
The variable remains undefined. |
Ensure that you correctly specify only the declarations the database manager supports. |
SQL0317N |
No END DECLARE SECTION was found after a BEGIN DECLARE SECTION. |
The end of input was reached during processing of a DECLARE SECTION. Precompilation is terminated. |
Add an END DECLARE SECTION statement to end a DECLARE SECTION. |
SQL0318N |
An END DECLARE SECTION was found without a previous BEGIN DECLARE SECTION. |
An END DECLARE SECTION statement was found, but there was no previous BEGIN DECLARE SECTION. The statement cannot be processed. |
Enter a BEGIN DECLARE SECTION before an END DECLARE SECTION. |
SQL0324N |
The usage variable name is the wrong type. |
Either the INDICATOR variable name is not a small integer or the STATEMENT variable name is not a character data type. The statement cannot be processed. |
Ensure that the variable is the correct type and is specified correctly. |
SQL0327N |
The row cannot be inserted into table table-name because it is outside the bounds of the defined data partition ranges. |
If the operation is an insert or an update, the value of the table partitioning key for the row is not within range of values for any defined data partition. If the operation is altering a table to become a partitioned table, then there exists one or more rows in the table with a table partitioning key value that is not within the range of values for any defined data partition. The statement cannot be processed. |
For an insert or update operation, ensure that the table partitioning key columns are within the specified ranges for the data partitions of the table. An additional data partition may need to be added to the table. If altering a table to become a partitioned table, ensure that the necessary ranges are specified to allow all of the data in the table to be within a range of a data partition. sqlcode: -327 sqlstate: 22525 |
SQL0329N |
The path name list string-constant-or-host-variable is not valid. |
String constant or input host variable string-constant-or-host-variable contains a path name list that is not valid. The maximum number of schema names for the SQL path (FUNCPATH bind option or CURRENT PATH special register) or package path (CURRENT PACKAGE PATH special register) has been exceeded. See the Limits appendix of the SQL Reference for details of this limit. The statement or command cannot be processed. |
Specify fewer schema names so as to not exceed the limit. Consider consolidating user-defined functions, procedures, methods, distinct types, or packages to fewer schemas. sqlcode: -329 sqlstate: 0E000 |
SQL0330N |
A string cannot be used because it cannot be processed. Reason code=reason-code. Code point=code-point. Host variable position=host-variable-position. |
A string cannot be processed because a translation error occurred during the translation of a string to a different coded character set. The type of error is indicated by the reason-code:
If the reason-code is 12, code-point is the invalid code point. Otherwise, code-point is either blank or an additional reason code returned by an exit. If the string is the value of an input host variable, the position-number is the ordinality of the variable in the SQLDA. If the string is not the value of a host variable, the position-number is blank. The statement cannot be processed. |
Take one of the following actions based on the reason-code:
sqlcode: -330 sqlstate: 22021 |
SQL0332N |
Character conversion from the source code page source-code-page to the target code page target-code-page is not supported. |
The operation failed because there is no code page conversion between the source-code-page and target-code-page. This may be due to one of the following reasons:
Some of the possible operations that can cause this error include:
|
DB2 UDB for iSeries users should be aware that character or graphic columns with CCSID 65535 are not supported. Character or graphic columns with CCSID 65535 must be converted to a supported CCSID (using CAST) before they can be accessed using DB2 Connect. sqlcode: -332 sqlstate: 57017 |
SQL0334N |
Overflow occurred while performing conversion from codepage source to codepage target. The maximum size of the target area was max-len. The source string length was source-len and its hexadecimal representation was string. |
During the execution of the SQL statement, a code page conversion operation has resulted in a string that is longer than the maximum size of the target object. |
Modify the data to avoid the overflow condition, depending on the circumstances, by:
Note: Automatic promotion of character or graphic string data types will not occur as part of character conversion. If the resultant string length exceeds the maximum length of the data type of the source string then an overflow has occurred. To correct this situation either change the data type of the source string or use data type casting to allow for an increase in the string length due to conversion. sqlcode: -334 sqlstate: 22524 |
SQL0336N |
The scale of the decimal number must be zero. |
The decimal number is used in a context where the scale must be zero. This can occur when a decimal number is specified in a CREATE or ALTER SEQUENCE statement for START WITH, INCREMENT, MINVALUE, MAXVALUE or RESTART WITH. The statement cannot be processed. |
Change the decimal number to remove any non-zero digits from the right side of the decimal delimiter. sqlcode: -336 sqlstate: 428FA |
SQL0338N |
An ON clause associated with a JOIN operator or in a MERGE statement is not valid. |
An ON clause associated with a JOIN operator or in a MERGE statement is not valid for one of the following reasons.
The statement cannot be processed. |
Correct the ON clause to reference appropriate columns or remove any dereference operators. If using full outer join ensure that all functions in the ON clause are deterministic and have no external action. For the ON clause of a MERGE statement, remove any subqueries, scalar fullselects, inlined SQL functions, or inlined SQL methods. sqlcode: -338 sqlstate: 42972 |
SQL0340N |
The common table expression name has the same identifier as another occurrence of a common table expression definition within the same statement. |
The common table expression name name is used in the definition of more than one common table expressions in the statement. The name used to describe a common table expression must be unique within the same statement. The statement cannot be processed. |
Change the name of one of the common table expressions. sqlcode: -340 sqlstate: 42726 |
SQL0341N |
A cyclic reference exists between the common table expressions name1 and name2. |
The common table expression name1 refers to name2 in a FROM clause within its fullselect and name2 refers to name1 in a FROM clause within its fullselects. Such forms of cyclic references are not allowed. The statement cannot be processed. |
Remove the cyclic reference from one of the common table expressions. sqlcode: -341 sqlstate: 42835 |
SQL0342N |
The common table expression name cannot use SELECT DISTINCT and must use UNION ALL because it is recursive. |
There are two possible explanations:
The statement cannot be processed. |
Remove the keyword DISTINCT from the common table expression, add the keyword ALL following UNION, or remove the recursive reference within the common table expression. sqlcode: -342 sqlstate: 42925 |
SQL0343N |
The column names are required for the recursive common table expression name. |
The recursive common table expression name must include the specification of the column names following the identifier of the common table expression. The statement cannot be processed. |
Add column names following the identifier of the common table expression. sqlcode: -343 sqlstate: 42908 |
SQL0344N |
The recursive common table expression name has mismatched data types, lengths or code pages for column column-name. |
The recursive common table expression name has a column column-name that is referred to in the iterative fullselect of the common table expression. The data type, length and code page are set based on the initialization fullselect for this column. The result of the expression for the column column-name in the iterative fullselect has a different data type, length or code page that may result in failure to assign the value for the column. The statement cannot be processed. |
Correct the column used in the fullselects of the recursive common table expression so that the initialization column matches the iterative columns. sqlcode: -344 sqlstate: 42825 |
SQL0345N |
The fullselect of the recursive common table expression name must be the UNION of two or more fullselects and cannot include column functions, GROUP BY clause, HAVING clause, ORDER BY clause, or an explicit join including an ON clause. |
The common table expression name includes a reference to itself and therefore:
The statement cannot be processed. |
Change the common table expression by:
sqlcode: -345 sqlstate: 42836 |
SQL0346N |
An invalid reference to common table expression name occurs in the first fullselect, as a second occurrence in the same FROM clause, or in the FROM clause of a subquery. |
The common table expression name includes an invalid reference to itself as described by one of the following.
The statement cannot be processed. |
Change one of the following:
sqlcode: -346 sqlstate: 42836 |
SQL0347W |
The recursive common table expression name may contain an infinite loop. |
The recursive common table expression called name may not complete. This warning is based on not finding specific syntax as part of the iterative portion of the recursive common table expression. The expected syntax includes:
The absence of this syntax in the recursive common table expression may result in an infinite loop. The data or some other characteristic of the recursive common table expression may allow the successful completion of the statement anyway. |
To prevent an infinite loop, include the expected syntax as described. sqlcode: +347 sqlstate: 01605 |
SQL0348N |
sequence-expression cannot be specified in this context. |
The statement contains a NEXT VALUE expression or PREVIOUS VALUE expression in an invalid context. NEXT VALUE expressions and PREVIOUS VALUE expressions cannot be specified in the following contexts:
NEXT VALUE expressions cannot be specified in the following contexts:
The statement cannot be executed. |
Remove the reference to the sequence expression and resubmit the statement. sqlcode: -348 sqlstate: 428F9 |
SQL0349N |
The specification of the NEXT VALUE expression for the column in position column-position must match the specification of all other expressions for the same column for all rows. |
The expression specified for the column in position column-position of a VALUES clause of a multiple row INSERT statement or VALUES expression included a NEXT VALUE expression. When an expression containing a NEXT VALUE expression is used to specify the value of a column in one of these contexts, then that same expression must be specified for that column for all rows. For example, the following INSERT statement succeeds:
However, the following INSERT statement fails:
|
Correct the syntax and resubmit the statement. sqlcode: -349 sqlstate: 560B7 |
SQL0350N |
The column column-name was implicitly or explicitly referenced in a context where the data type of the column is not supported. |
The ALTER statement, CREATE statement, or DECLARE GLOBAL TEMPORARY TABLE statement is invalid for one of the following reasons:
The same restrictions apply to a distinct type column where the base data type is subject to one of the restrictions in the listed previously. The statement cannot be processed. |
Remove the column from the context where the data type is not supported or change the data type of the column. If indexing an XML column or structured type column, ensure that it is the only column and that the index definition includes the appropriate clauses. sqlcode: -350 sqlstate: 42962 |
SQL0351N |
An unsupported SQLTYPE was encountered in position position-number of the output SQLDA (select list). |
The element of the SQLDA at position position-number is for a data type that either the application requestor or the application server does not support. If the application is not using the SQLDA directly, position-number could represent the position of an element in the select list or a parameter of a CALL statement. The statement cannot be processed. |
Change the statement to exclude the unsupported data type. For a select statement, remove the names of any columns in the select-list with the unsupported data type or use a cast in the query to cast the column to a supported data type. sqlcode: -351 sqlstate: 56084 |
SQL0352N |
An unsupported SQLTYPE was encountered in position position-number of the input list (SQLDA). |
The element of the SQLDA at position position-number is for a data type that either the application requestor or the application server does not support. If the application is not using the SQLDA directly, position-number could represent the position of an input host variable, parameter marker, or a parameter of a CALL statement. The statement cannot be processed. |
Change the statement to exclude the unsupported data type. sqlcode: -352 sqlstate: 56084 |
SQL0355N |
The column column-name, as defined, is too large to be logged. |
Large Object data types (BLOB, CLOB, and DBCLOB) may be created in sizes up to 2 gigabytes (2147483647 bytes). Logging of data values is allowed only upon objects which are less than or equal to than 1 gigabyte (1073741823 bytes) in size. Therefore, large objects greater than 1 gigabyte in size can not be logged. |
Either explicitly indicate logging of data is not required, by using the NOT LOGGED phrase during column creation, or reduce the maximum size of the column to 1 gigabyte or below. sqlcode: -355 sqlstate: 42993 |
SQL0356N |
The index was not created because a key expression was invalid. Key expression: expression-number. Reason code: reason-code. |
You can create a table index which includes expression-based keys. This message is returned when an attempt is made to create an index that includes expression-based keys, and one of the following conditions exists:
The runtime token expression-number identifies which key expression in the statement is invalid. For example, if there are two key expressions in the CREATE INDEX statement, and the second key expression is invalid, the value of expression-number will be: "2". If the expression number cannot be determined, a default value of "*" will be returned. The reason code indicates what was invalid about the key expression:
|
Correct the error in the key expression, and reissue the statement. sqlcode: -356 sqlstate: 429BX |
SQL0359N |
The range of values for the identity column or sequence is exhausted. |
The database manager attempted to generate a value for an identity column or sequence object, however all allowable values have already been assigned. The statement cannot be processed. |
For an identity column, redefine the table with a larger range of values for the identity column. If a MAXVALUE or MINVALUE specification has been made that limits the range of values to be less than the range for the data type of the column, then the column can be altered to expand the range of valid values. Otherwise, the identity column must be recreated which requires that the table be recreated. First drop the existing table, and then recreate the table with a different data type for the identity column, specifying a data type that has a larger range of values than the current data type for the identity column. For a sequence object, redefine the sequence with a larger range of values. If a MAXVALUE or MINVALUE clause limits the range of values to less than the range for the data type of the sequence object, then alter the sequence to expand the range of valid values. Otherwise, drop the sequence object and reissue the CREATE SEQUENCE statement specifying a data type that allows a larger range of values. sqlcode: -359 sqlstate: 23522 |
SQL0360W |
DATALINK values may not be valid because the table table-name is in Datalink Reconcile Pending (DRP) or Datalink Reconcile Not Possible (DRNP) state. |
DATALINK values in table table-name may not be valid because the table is either in Datalink Reconcile Pending (DRP) or Datalink Reconcile Not Possible (DRNP) state. While in either of these states, control of the files on the DB2 Data Links Manager is not guaranteed. Statement processing continues. |
Refer to the Administration Guide for information on Datalink Reconcile Pending (DRP) and Datalink Reconcile Not Possible (DRNP) states to take appropriate action. sqlcode: +360 sqlstate: 01627 |
SQL0361W |
The operation was successful, but some portion of the operation was unsuccessful. Tokens msg-token1 and msg-token2 provide further details about the operation msg-token3. |
The operation was successful as some of what was specified completed successfully, but some parts of the operation were unsuccessful. |
Determine what action to take, if any, depending on the operation msg-token3: SYSPROC.ADMIN_REVALIDATE_DB_OBJECTS - Some of the objects specified to be revalidated were not able to be revalidated successfully because at least one object that they reference does not exist or continues to be invalid. One object not revalidated is msg-token1 because of its reference to object msg-token2. If the objects not yet revalidated still need to be revalidated, then create any objects that should exist and correct any objects that continue to be invalid that are referenced by the objects to be revalidated. The SYSCAT.INVALIDOBJECTS catalog view contains information on invalid objects. If msg-token1 refers to an object of permission or mask, and msg-token2 contains CREATE PERMISSION or CREATE MASK, then ensure the user that runs ADMIN_REVALIDATE_DB_OBJECTS has SECADM authority. sqlcode: +361 sqlstate: 0168B |
SQL0364W |
DECFLOAT exception exception-type has occurred during operation operation. |
The exception exception-type occurred while doing an operation-type operation on a field whose data type is DECFLOAT. The exception occurred while processing an arithmetic expression. The possible values for exception-type are:
The possible values for operation-type are:
The DECFLOAT exception may occur due to a temporary internal copy of the data that was converted to DECFLOAT for the operation. Any of the exceptions can occur during the processing of a built-in function. If the operation-type is FUNCTION, then the exception occurred while processing either an input, intermediate, or final value. The cause could be that the value of a parameter is out of range. Statement processing continues. |
To stop this warning from being returned, examine the expression for which the warning occurred to see if the cause, or the likely cause, of the exception can be determined. The exception may be data-dependent, in which case it will be necessary to examine the data that was being processed at the time the warning occurred. See the SQL Reference for the supported ranges of DECFLOAT values. sqlcode: +364 sqlstate: 0168C sqlstate: 0168D sqlstate: 0168E sqlstate: 0168F |
SQL0365N |
The statement was not processed because the value of the extended indicator variable in position position is not valid. |
You can represent the SQL null value in an application program by using an indicator variable with a host variable. You can also represent the default value or the unassigned value by using an extended indicator with host variables. There are some restrictions on how and where extended indicators can be used. For example, values of default (-5) or unassigned (-7) must not be used for extended indicator variables in a VALUES clause that specifies more than one row of values. This message is returned when a value of default (-5) or unassigned (-7) is used in a context in which these values are not allowed. Diagnostic information in the runtime token position:
|
Change the value of the extended indicator variable to an allowable value for the context in which it is used. If position is 0, respond in one of the following ways:
sqlcode: -365 sqlstate: 22539 |
SQL0368N |
The DB2 Data Links Manager dlm-name is not registered to the database. |
The DB2 Data Links Manager dlm-name is not registered to the database. Registered DB2 Data Links Managers are ignored if the database manager configuration parameter DATALINKS is set to NO. The DB2 Data Links Manager may have been dropped using the DROP DATALINKS MANAGER command. It is possible that a new incarnation of the DB2 Data Links Manager with the same name is currently registered; in that case, the error pertains to one or more previously dropped incarnations of that DB2 Data Links Manager. The statement cannot be processed. |
Ensure that the database manager configuration parameter DATALINKS is set to YES. DATALINK values that are links to previously dropped DB2 Data Links Managers should be removed using the reconcile utility. For additional details, see the usage notes for the DROP DATALINKS MANAGER command in the Command Reference. sqlcode: -368 sqlstate: 55022 |
SQL0370N |
The parameter in position n must be named in the CREATE FUNCTION statement for LANGUAGE SQL function name. |
All parameters for functions defined with LANGUAGE SQL must have a parameter-name for each parameter. The statement cannot be processed. |
Include a parameter name for each parameter of the function. sqlcode: -370 sqlstate: 42601 |
SQL0372N |
Column types of ROWID, IDENTITY, security label, row change timestamp, row-begin, row-end, or transaction start-ID can only be specified once for a table. |
An attempt was made to do one of the following:
The ROWID data type is supported in DB2 for z/OS and DB2 for iSeries. The statement cannot be processed. |
For a CREATE TABLE statement, specify the specified attribute only once for the table. For an ALTER TABLE statement, the specified column already exists for the table. Do not attempt to define a period more than once in a table. sqlcode: -372 sqlstate: 428C1 |
SQL0373N |
A DEFAULT clause cannot be specified for column or SQL variable name |
A DEFAULT clause was specified when defining or changing column or SQL variable name. The data type for the column definition or SQL variable declaration does not support DEFAULT. A CREATE or ALTER TABLE statement cannot use the DEFAULT clause when defining the following:
The statement cannot be processed. |
Remove the DEFAULT clause and resubmit the statement. sqlcode: -373 sqlstate: 42623 |
SQL0374N |
The clause clause has not been specified in the CREATE FUNCTION statement for LANGUAGE SQL function function-name but an examination of the function body reveals that it should be specified. |
The following situations may be the cause of this error. MODIFIES SQL DATA must be specified if the body of the function defined with LANGUAGE SQL can modify SQL data or if it calls a function or a procedure that can modify SQL data. READS SQL DATA must be specified if the body of the function defined with LANGUAGE SQL contains a subselect or if it calls a function that can read sql data. The statement cannot be processed. |
Either specify the clause or change the function body. sqlcode: -374 sqlstate: 428C2 |
SQL0385W |
Assignment to an SQLSTATE or SQLCODE variable in an SQL routine may be over-written and does not activate any handler. |
The SQL routine includes at least one statement that assigns a value to the SQLSTATE or SQLCODE special variables. These variables are assigned values by processing of SQL statements in the SQL routine. The value assigned may therefore be over-written as a result of the SQL statement processing. Furthermore, the assignment of a value to the SQLSTATE special variable does not activate any handlers. The routine definition was processed successfully. |
None required. Remove any assignments to the SQLSTATE or SQLCODE special variable to prevent the warning. sqlcode: +385 sqlstate: 01643 |
SQL0388N |
In a CREATE CAST statement for function function-name, either the source source-data-type-name and target target-data-type-name are both built-in types or they are the same type. |
One of the data types must be a user-defined type. The source type and the target type cannot be the same data type. The statement cannot be processed. |
Change the data type of either the source or the target. sqlcode: -388 sqlstate: 428DF |
SQL0389N |
The specific function instance specific-name identified in a CREATE CAST statement either has more than one parameter, has a parameter that does not match the source data type, or returns a data type that does not match the target. |
A cast function must
The statement cannot be processed. |
Either chose a different function instance, change the source data type, or change the target data type. sqlcode: -389 sqlstate: 428DG |
SQL0390N |
The statement was not processed because the function function-name resolved to specific function specific-name that is not valid in the context where it is used. |
If the runtime token specific-name is an empty string, then the function resolved to the built-in function identified by the runtime token function-name. This message can be returned in many scenario. Here is a short list of some of the possible situations in which this message can be returned:
|
Respond to this error by performing one or more of the following troubleshooting steps:
sqlcode: -390 sqlstate: 42887 |
SQL0391N |
Invalid use of the row based function function-name. |
The statement uses a row based function function_name that cannot be used for one of the following reasons:
The statement cannot be processed. |
Remove function-name from the context where it is not allowed. sqlcode: -391 sqlstate: 42881 |
SQL0392N |
SQLDA provided for cursor cursor has been changed from the previous fetch. |
The application is running with DB2 rules, and has requested that LOB data be returned as a LOB in one FETCH statement, and as a locator in another FETCH statement. This is not permitted. |
The statement cannot be executed. Either do not use DB2 rules, or change the application to not change the data type code from LOB to locator (or the reverse) in the SQLDA between successive fetches. sqlcode: -392 sqlstate: 42855 |
SQL0396N |
Object-type object-name (specific name specific-name) attempted to execute an SQL statement during final call processing. |
A routine object-name (specific name specific-name) attempted to execute an SQL statement (other than CLOSE cursor) during FINAL CALL (call-type = 255) processing. This is not allowed. |
Change the routine to not issue SQL statements during FINAL CALL (call-type = 255) processing. sqlcode: -396 sqlstate: 38505 |
SQL0401N |
The data types of the operands for the operation operator are not compatible or comparable. |
The operation using operator cannot be processed for one of the following reasons:
Federated system users: this data type violation can be at the data source or at the federated server. Some data sources do not provide the appropriate values for operator. In these cases the message token will have the following format: "<data-source>:UNKNOWN", indicating that the actual value for the specified data source is unknown. The statement cannot be processed. |
Check all operand data types to ensure that they are comparable and compatible with the statement usage. If all the SQL statement operands are correct and accessing a view, check the data types of all the view operands. In Hadoop tables:
Federated system users: if the reason is unknown, isolate the problem to the data source failing the request and examine the data type restrictions for that data source. sqlcode: -401 sqlstate: 42818 |
SQL0402N |
The data type of an operand of an arithmetic function or operation operator is invalid. |
An invalid operand is specified for the arithmetic function or operator operator. The statement cannot be processed. |
Correct the SQL statement syntax so all specified function or operator operands are valid. A valid operand is either numeric or is capable of being implicitly cast to a numeric data type. Federated system users: if the reason is unknown, isolate the problem to the data source failing the request and examine the operators applied to that data source. sqlcode: -402 sqlstate: 42819 |
SQL0403W |
The newly defined alias name resolved to the object name2 which is currently undefined. |
The alias <name> has been defined upon:
The object <name2> is the undefined object. This object must exist before any SQL statement (other than CREATE ALIAS) can successfully use the newly created alias. The specified alias <name> is created. An inoperative view is considered to be undefined for the purposes of creating an alias. |
Ensure that the undefined object <name2> is defined prior to using the newly created alias in an SQL statement (other than CREATE ALIAS). sqlcode: +403 sqlstate: 01522 |
SQL0404N |
A string in the UPDATE or INSERT statement is too long for column name. |
An INSERT or UPDATE statement specifies a value that is longer than the maximum-length string that can be stored in the column indicated. The statement cannot be processed. Note: name may or may not be returned in SQLCA, depending on the INSERT or UPDATE statement syntax.
|
Check the length of the object column and correct the program or SQL statement so the insert or update string does not exceed the maximum length. sqlcode: -404 sqlstate: 22001 |
SQL0405N |
The numeric literal literal is not valid because its value is out of range. |
The specified numeric literal is not in the acceptable range. The proper ranges for SQL values are as follows:
In certain contexts the literal may have further restrictions that result in this error. Federated system users: this range violation can be at the data source or at the federated server. The proper ranges for SQL values located in data source tables depend on the data source. To determine the correct range, see the appropriate documentation for the data source. Some data sources do not provide the appropriate values for literal. In these cases the message token will have the following format: "<data source>:UNKNOWN", indicating that the actual value for the specified data source is unknown. Range-clustered tables: the ending value of a range definition is smaller than the starting value. The statement cannot be processed. |
Reduce the literal value to the appropriate size. Federated system users: if the reason is unknown, isolate the problem to the data source failing the request and examine the data range restrictions for that data source. Range-clustered tables: ensure that the ending value in a range definition is greater than the starting value. sqlcode: -405 sqlstate: 42820 |
SQL0406N |
A numeric value in the UPDATE or INSERT statement is not within the range of its target column. |
The value of a host variable or a numeric value calculated during processing of the UPDATE or INSERT SQL statement is outside the target column range. This problem may be caused by the values occurring in the object column, the SQL operation being performed on those values, or both. The statement cannot be processed. |
See the explanation of message SQL0405 for ranges allowed for numeric data types except decimal floating-point.
These are the limits of normal decimal floating-point numbers. Valid decimal floating-point values include the special values INFINITY, -INFINITY, NAN, -NAN, SNAN, and -SNAN. These special values are illegal for all other DB2 numeric types. NOTE: For system catalog updates, see the SQL Reference for valid ranges in various columns of updatable catalogs. sqlcode: -406 sqlstate: 22003 |
SQL0407N |
Assignment of a NULL value to a NOT NULL column name is not allowed. |
One of the following occurred:
If the value for name is of the form "TBSPACEID=n1, TABLEID=n2, COLNO=n3", then the column name from the SQL statement was not available when the error was issued. The values provided identify the tablespace, table, and column number of the base table that does not allow NULL value. Federated system users: this situation can be detected by the federated server or by the data source. Some data sources do not provide the appropriate values for name. In these cases the message token will have the following format: "<data source>:UNKNOWN", indicating that the actual value for the specified data source is unknown. HBase or Hadoop users: This situation can occur when the underlying Hadoop or HBase data is being read and one of the following happens:
The value of name can be specified as schema-name.table-name.column-name. The statement cannot be processed. Under some circumstances, the token name may not be filled in (sqlerrmc field of the SQLCA not filled in). |
Correct the SQL statement after examining the object table definition to determine which columns of the table have the NOT NULL attribute and do not have the WITH DEFAULT attribute. If the value for name is of the form "TBSPACEID=n1, TABLEID=n2, COLNO=n3", you can determine the table name and column name using the following query: The table and column identified by this query may be the base table of a view for which the SQL statement failed. If the error is returned as part of an alter table statement, when setting a column to NOT NULL, modify any row data for the column that contains the NULL value, and retry the statement. Federated system users: if the reason is unknown, isolate the problem to the data source failing the request and examine the object definition for that data source. Remember that the defaults (NULL and NOT NULL) are not necessarily the same between data sources. For HBase or Hadoop users, verify that the data in the underlying data files is correct, or use ALTER TABLE to change the nullability of the column. sqlcode: -407 sqlstate: 23502 |
SQL0408N |
A value is not compatible with the data type of its assignment target. Target name is name. |
The data type of the value to be assigned to the column, parameter, SQL variable, or transition variable by the SQL statement is incompatible with the declared data type of the assignment target. For Hadoop tables:
The statement cannot be processed. |
Examine the statement and possibly the target table or view to determine the target data type. Ensure the variable, expression, or literal value assigned has the proper data type for the assignment target. For a user-defined structured type, also consider the parameter of the TO SQL transform function defined in the transform group for the statement as an assignment target. sqlcode: -408 sqlstate: 42821 |
SQL0409N |
The operand of a COUNT function is not valid. |
As specified in the SQL statement, the operand of the COUNT function does not conform to the rules of SQL syntax. Only COUNT(*) and COUNT(DISTINCT column) are allowed. The statement cannot be processed. |
Specify COUNT(*) or COUNT(DISTINCT column). NOTE: This message is only applicable to versions of DB2 prior toVersion 2 . sqlcode: -409 sqlstate: 42607 |
SQL0410N |
A numeric value value is too long. |
The specified value is too long. A floating-point string has a maximum length of 30 characters. A decimal floating-point string has a maximum length of 42 characters. The statement cannot be processed. |
Shorten the specified literal. sqlcode: -410 sqlstate: 42820 |
SQL0412N |
Multiple columns are returned from a subquery that is allowed only one column. |
In the context of the SQL statement, a fullselect is specified that can have only one column as a result. The statement cannot be processed. |
Specify only one column when only a scalar fullselect is allowed. sqlcode: -412 sqlstate: 42823 |
SQL0413N |
Overflow occurred during numeric data type conversion. |
During processing of the SQL statement, an overflow condition arose when converting from one numeric type to another. Numeric conversion is performed according to the standard rules of SQL. Federated system users: numeric conversion can occur at the federated server, at data sources, or both. The statement cannot be processed. No data was retrieved, updated, or deleted. |
Examine the syntax of the SQL statement to determine the cause of the error. If the problem is data-dependent, it may be necessary to examine the data processed at the time of the error. Federated system users: if the reason is unknown, isolate the problem to the data source failing the request and examine the data range restrictions for that data source. sqlcode: -413 sqlstate: 22003 |
SQL0415N |
The data types of corresponding columns are not compatible in a fullselect that includes a set operator or in the multiple rows of a VALUES clause of an INSERT or fullselect. |
There are various statements where this error may occur.
It may occur within the array constructor, when the data type of the two values listed in the constructor are not compatible. See Assignments and Comparisons in the SQL Reference for details on data type compatibility. The statement cannot be processed. |
Correct the column names used in the SELECT statements or the expressions in the VALUES clause so that all corresponding columns are compatible types. sqlcode: -415 sqlstate: 42825 |
SQL0416N |
You cannot specify a result column longer than 254 bytes in the SELECT or VALUES statements connected by a set operator other than UNION ALL. |
One of the SELECT or VALUES statements connected by a set operator specifies a result column that is longer than 254 bytes. VARCHAR or VARGRAPHIC result columns longer than 254 bytes can be used only with the UNION ALL set operator. The statement cannot be processed. |
Either use the UNION ALL operator instead of UNION, or remove the result columns longer than 254 bytes from the SELECT or VALUES statements. sqlcode: -416 sqlstate: 42907 |
SQL0417N |
A statement string to be prepared contains parameter markers as the operands of the same operator. |
The statement string specified as the object of a PREPARE or EXECUTE IMMEDIATE contains a predicate or expression in which parameter markers have been used as operands of the same operator without a CAST specification. For example:
The statement cannot be processed. |
This syntax is not supported. Use a CAST specification to give at least one of the parameter markers a data type. sqlcode: -417 sqlstate: 42609 |
SQL0418N |
The statement was not processed because the statement contains an invalid use of one of the following: an untyped parameter marker, the DEFAULT keyword, or a null value. |
This message can be encountered in many scenarios, and can be returned for multiple reasons. Examples of reasons this message can be returned:
|
Respond to this error by performing the following troubleshooting steps:
sqlcode: -418 sqlstate: 42610 |
SQL0419N |
A decimal divide operation is not valid because the result would have a negative scale. |
A specified decimal division is not valid because it will result in a negative scale. The formula used internally to calculate the scale of the result for decimal division is: where np is the precision of the numerator, ns is the scale of the numerator, and ds is the scale of the denominator. Federated system users: Decimal division can occur at the federated server, at data sources, or both. The specified decimal division results in an invalid scale for that data source. The statement cannot be processed. |
Examine and ensure the precision and scale of all columns that may participate in a decimal division. Note that an integer or small integer value may be converted to a decimal for this calculation. Federated system users: if the reason is unknown, isolate the problem to the data source failing the request and examine the data range restrictions for that data source. sqlcode: -419 sqlstate: 42911 |
SQL0420N |
Invalid character found in a character string argument of the function function-name. |
The function function-name has a character string argument that contains a character that is not valid in a numeric SQL constant. The function may have been called as a result of using the CAST specification with function-name as the target data type or when an argument is implicitly cast to a numeric data type. The function or data type used in the SQL statement may be a synonym for function-name. If a decimal character is specified in the DECIMAL function then that is the character that must be used in place of the default decimal character. |
Ensure that the character strings that are being converted to numeric types contain only characters that are valid in numeric SQL constants, using the decimal character, if specified. sqlcode: -420 sqlstate: 22018 |
SQL0421N |
The operands of a set operator or a VALUES clause do not have the same number of columns. |
The operands of a set operator such as UNION, EXCEPT, or INTERSECT must have the same number of columns. The rows in a VALUES clause must have the same number of columns. The statement cannot be processed. |
Change the SQL statement so each operand, or each row of a VALUES clause, has exactly the same number of columns. sqlcode: -421 sqlstate: 42826 |
SQL0423N |
Locator variable variable-position does not currently represent any value. |
A locator variable is in error. Either it has not had a valid result set locator or LOB locator variable value assigned to it, the locator associated with the variable has been freed, or the result set cursor has been closed. If variable-position is provided, it gives the ordinal position of the variable in error in the set of variables specified. Depending on when the error is detected, the database manager may not be able to determine variable-position. Instead of an ordinal position, variable-position may have the value "function-name RETURNS", which means that the locator value returned from the user-defined function identified by function-name is in error. |
Correct the program or routine so that the locator variables used in the SQL statement have valid values before the statement is executed. A LOB value can be assigned to a locator variable by means of a SELECT INTO statement, a VALUES INTO statement, or a FETCH statement. Result set locator values are returned by the ASSOCIATE LOCATORS statements. Result set locator values are only valid as long as the underlying SQL cursor is open. If a commit or rollback operation is run, the result set locator associated with the cursor is no longer valid. If this was a WITH RETURN cursor, ensure the cursor is opened before attempting to allocate it. If the following statements are all true about the application code:
Do one of the following actions to remove a factor contributing to this warning case so as to successfully upgrade your application:
sqlcode: -423 sqlstate: 0F001 |
SQL0426N |
Dynamic commit invalid for application execution environment. |
An application executing in a CONNECT TYPE 2 environment or Distributed Transaction Processing (DTP) environment such as CICS has attempted to execute an SQL dynamic COMMIT statement. The SQL dynamic COMMIT statement cannot be executed in this environment. Federated system users: SQL dynamic COMMIT statements cannot be executed during a pass-through session. |
Federated system users: Either comment out the COMMIT statement or code it as a static statement. Then resubmit your program. sqlcode: -426 sqlstate: 2D528 |
SQL0427N |
Dynamic roll back invalid for application execution environment. |
An application executing in a CONNECT TYPE 2 environment or Distributed Transaction Processing (DTP) environment such as CICS has attempted to execute an SQL dynamic ROLLBACK statement. The SQL dynamic ROLLBACK statement cannot be executed in this environment. Federated system users: SQL dynamic ROLLBACK statements cannot be executed during a pass-through session. |
Federated system users: Either comment out the ROLLBACK statement or code it as a static statement. Then resubmit your program. sqlcode: -427 sqlstate: 2D529 |
SQL0428N |
The SQL statement is only allowed as the first statement in a unit of work. |
The SQL statement that was issued is required to execute before any other SQL statement that initiates a unit of work. Following are possible situations:
Note that when the statement is DISCONNECT ALL, it causes the DISCONNECT to be directed against all connections, so the request will fail if any of the connections violate the previously described restrictions. |
Issue a COMMIT or ROLLBACK prior to processing the SQL statement. If there are any WITH HOLD cursors, these will need to be closed. If the statement is SET INTEGRITY, remove the COMMIT THRESHOLD clause. sqlcode: -428 sqlstate: 25001 |
SQL0429N |
The maximum number of concurrent LOB locators has been exceeded. |
A maximum of 4,000,000 concurrent LOB locators per unit of work, is supported by DB2. |
Modify the program so that it requires fewer concurrent LOB locators and run the program again. For example, use the FREE LOCATOR statement to free LOB locators as soon as the application no longer needs them. sqlcode: -429 sqlstate: 54028 |
SQL0430N |
User defined function function-name (specific name specific-name) has abnormally terminated. |
An abnormal termination has occurred while the named UDF was in control. |
The UDF needs to be fixed. Contact the author of the UDF or your database administrator. Until it is fixed, the UDF should not be used. sqlcode: -430 sqlstate: 38503 |
SQL0431N |
A user-defined routine, trigger, or anonymous block has been interrupted by the user. Object name: object-name. Object specific name: specific-name. Object type: object-type. |
A user interrupt or client interrupt has occurred while the routine, trigger or anonymous block was in control. An anonymous block has no object name or specific name and is identified with an object type of "BEGIN...END". Encountering this message might indicate some problem in the logic, such as an infinite loop or wait. |
If the problem persists, (that is, the need to interrupt results in the same error condition), then contact the author of the routine, trigger, or anonymous block or contact your database administrator. sqlcode: -431 sqlstate: 38504 |
SQL0432N |
A parameter marker or null value cannot have the user defined type name or reference target type name udt-name. |
An untyped expression (parameter marker or null value) in the statement has been determined as having the user-defined type udt-name or a reference type with the target type udt-name based on the context in which it is used. An untyped expression cannot have a user-defined type or reference type as its data type unless it is part of an assignment (VALUES clause of INSERT or SET clause of UPDATE) or it is being explicitly cast to a user-defined distinct data type or reference data type using the CAST specification. The statement cannot be processed. |
Use an explicit cast to the user-defined distinct data type or reference data type for the untyped expression. An alternative is to cast the columns that are user-defined distinct data types to their corresponding source data type or columns that are reference data types to their corresponding representation type. sqlcode: -432 sqlstate: 42841 |
SQL0433N |
Value value is too long. |
The value value required truncation by a system (built-in) cast or adjustment function, which was called to transform the value in some way. The truncation is not allowed where this value is used. The value being transformed is one of the following:
The statement cannot be processed. |
If value is a literal string in the SQL statement, it is too long for its intended use. If value is not a literal string, examine the SQL statement to determine where the transformation is taking place. Either the input to the transformation is too long, or the target is too short. Correct the problem and rerun the statement. sqlcode: -433 sqlstate: 22001 |
SQL0434W |
An unsupported value for clause clause has been replaced by the value value. |
The value that was specified for clause clause is not supported and has been replaced with the identified supported value value. |
No change is required if the selected value is acceptable. Otherwise, specify a value that is valid for clause. sqlcode: +434 sqlstate: 01608 |
SQL0435N |
An invalid application defined SQLSTATE sqlstate was specified. |
The SQLSTATE value specified by the RAISE_ERROR function or on the SIGNAL or RESIGNAL statement does not conform to the rules for an application defined SQLSTATE. |
Correct the specified value for the SQLSTATE. The SQLSTATE value must be a character string containing exactly 5 characters. It must be of type CHAR defined with a length of 5, or type VARCHAR defined with a length of 5 or greater. The SQLSTATE value must follow the rules for application-defined SQLSTATEs. The following are the rules for an SQLSTATE value specified on the SIGNAL or RESIGNAL statement.
The following are the rules for an SQLSTATE value specified by the RAISE_ERROR function
sqlcode: -435 sqlstate: 428B3 |
SQL0436N |
The terminating NULL character is missing from the C language NULL-terminated character string host variable. |
The value of an input host variable code in the C programming language requires a NULL-terminator character at the end of the string. The statement cannot be processed. |
Ensure that the value of the input host variable is terminated by the NULL-terminator character. sqlcode: -436 sqlstate: 22024 |
SQL0437W |
Performance of this complex query might be sub-optimal. Reason code: reason-code. |
Query optimization is one of the factors that affect application performance. The SQL and XQuery compiler performs several steps to produce an access plan that can be executed. In general, this message is returned when the complexity of a query requires resources that are not available or when optimization boundary conditions were encountered. The reason code indicates in more detail why the performance might be sub-optimal:
The statement will be processed. |
If the performance of your query is sub-optimal, perform one or more of the following actions:
sqlcode: +437 sqlstate: 01602 |
SQL0438N |
Application raised error or warning with diagnostic text: text. |
This error or warning occurred as a result of execution of the RAISE_ERROR function or the SIGNAL SQLSTATE statement in a trigger. An SQLSTATE value that starts with '01' or '02' indicates a warning. |
See application documentation. sqlcode: -438, +438 sqlstate: application-defined |
SQL0439N |
User defined function function-name is indirectly implemented by function source-function which resulted in error sqlcode. |
The function function-name was referenced in the user's statement. However, because the SOURCE clause was used in the definition of this function, it has turned out that function source-function actually implements the function. (It may be a direct or an indirect definition path from function-name to source-function.) At compile time, the encapsulator (DB2 code which acts on behalf of a function) for source-function has returned the error identified by sqlcode. |
The actual error situation needs to be understood better before corrective action can be taken. Look up the explanation for sqlcode. If source-function is a built-in function, the sqlcode should indicate the problem, as in the case where a built-in function is directly referenced in the user's statement. If source-function is a user defined function, the message most likely indicates a problem with one of the arguments or with the result from the function. Correct the problem and try again. sqlcode: -439 sqlstate: 428A0 |
SQL0440N |
No authorized routine named routine-name of type routine-type having compatible arguments was found. |
This occurs in a reference to routine routine-name, when the database manager cannot find a routine it can use to implement the reference. There are several reasons why this could occur:
|
Fix the problem and retry. This could involve catalog access, a change to the statement, a grant of the execute privilege to the routine invoker, the addition of new functions, and/or a change to the SQL path. sqlcode: -440 sqlstate: 42884 |
SQL0441N |
Invalid use of keyword DISTINCT or ALL with function function-name. |
There are several possible causes.
|
Correct the error and try again. sqlcode: -441 sqlstate: 42601 |
SQL0442N |
Error in referring to routine routine-name. The maximum number of allowable arguments (90) has been exceeded. |
Too many arguments were specified in the reference to routine routine-name. The maximum allowable is 90. |
Correct the statement by ensuring that the correct number of arguments has been used and try again. sqlcode: -442 sqlstate: 54023 |
SQL0443N |
Routine routine-name (specific name specific-name) has returned an error SQLSTATE with diagnostic text text. |
This message is returned when a built-in or user-defined routine (procedure, function, or method) fails. The contents of the third run-time token, text, varies:
|
Respond to this error in one of the following ways:
|
SQL0444N |
Routine routine-name (specific name specific-name) is implemented with code in library or path library-or-path, function function-code-id which cannot be accessed. Reason code: code. |
The database manager is trying to access the body of code that implements routine routine-name (specific name specific-name), and cannot access it for the reason given by reason code code (the codes are listed below). The file implementing the routine is identified by library-or-path, and the function by function-code-id. The library name, path name, or the function name might be truncated due to a limit on the maximum available token length. The following query can be used to get the complete library path and function names from the system catalog views:
Federated system users: if this user defined function is a function template (and thus no code is required to reside on the federated server), consider modifying the SQL statement or statistics to enable this function to be evaluated on the remote data source. |
Given for each reason code:
Federated system users: if this user defined function is a function template (and thus no code is required to reside on the federated server), you may want to consider modifying the SQL statement or statistics to enable this function to be evaluated on the remote data source. sqlcode: -444 sqlstate: 42724 |
SQL0445W |
Value value has been truncated. |
The value value was truncated when transformed in some way by a system (built-in) cast, adjustment, or codepage-conversion function. This is a warning situation. The value being transformed may be one of:
|
Ensure that the output is as expected and that the truncation has not caused any unexpected consequences. sqlcode: +445 sqlstate: 01004 |
SQL0447W |
The statement contains redundant specifications involving the clause clause. |
The clause keyword was included more than once in the statement. This is a warning condition. |
If the redundancy was intentional, or if it is determined that no harm has resulted, then no response is necessary. The type of "harm" alluded to could include, for example, the omission of some other desired keyword. sqlcode: +447 sqlstate: 01589 |
SQL0448N |
Error in defining routine routine-name. The maximum number of allowable parameters (90 for user defined functions and methods, 32767 for stored procedures) has been exceeded. |
Too many parameters were specified when defining routine routine-name. The routine definition statement may be a CREATE FUNCTION, CREATE PROCEDURE, CREATE TYPE (method definition), or ALTER TYPE (method definition). |
Change the statement to include fewer parameters. sqlcode: -448 sqlstate: 54023 |
SQL0449N |
The statement defining routine routine-name contains an invalidly formatted library/function identification in the EXTERNAL NAME clause. |
An error was found in the EXTERNAL NAME clause of the CREATE statement for user defined function (UDF), user-defined method, or procedure routine-name. The rules for the library/function identification are as follows: For LANGUAGE C, the name takes the form '<a> or '<a>!<b>' as follows:
For LANGUAGE OLE, the name takes the form '<a>!<b>' as follows:
For LANGUAGE JAVA and LANGUAGE CLR, the name takes the form '<a>:<b>!<c>' as follows:
For all languages, no leading or trailing blank characters are permitted between the single quotes, object identifiers, or the separating characters (for example, ' <a> ! <b> ' is invalid). Path and file names, however, may contain blanks if the platform permits. For all file names, the file can be specified by using either the short form of the name (examples: math.a (on UNIX), math.dll (on Windows)) or the fully qualified pathname (examples: /u/slick/udfs/math.a (on UNIX), d:\udfs\math.dll (on Windows)). If the short form of the file name is used, the file must be located as follows:
|
Correct the problem and try again. A possible cause is the inclusion of a blank, or having the '!' or ':' at the beginning or end of the name. sqlcode: -449 sqlstate: 42878 |
SQL0450N |
Routine routine-name (specific name specific-name) has generated a result value, SQLSTATE value, message text, or scratchpad which is too long. |
Upon return from routine routine-name (specific name specific-name), the database manager has detected that more bytes were returned than were allocated for one of the following:
This is not permitted. This error will also be returned if the length field of the scratchpad is altered by the routine. |
See your Database Administrator, or the author of the routine. sqlcode: -450 sqlstate: 39501 |
SQL0451N |
The data-item definition, in the statement that defines routine routine-name, contains a data type type that is not appropriate for a non-sourced routine written in the given language or a routine that is defined as autonomous. |
An error was made in the data-item part of the statement defining routine routine-name. The user's statement contained the invalid type type, or it contained a user defined type (UDT) which is based on the invalid type type. The routine definition may be a CREATE FUNCTION, CREATE PROCEDURE, CREATE TYPE (method definition), or ALTER TYPE (method definition). data-item is a token that identifies the area of the problem in the statement. For example, "PARAMETER 2" or "RETURNS" or "CAST FROM". In an autonomous transaction, a block of statements within the transaction can be committed even if that transaction is rolled back. You can use the AUTONOMOUS keyword with the CREATE PROCEDURE command to create a procedure that will commit its work even if it is called from within a unit of work which is rolled back. |
Determine which situation has occurred, and take corrective action. Possible corrective actions include:
sqlcode: -451 sqlstate: 42815 |
SQL0452N |
Unable to access the file referenced by host variable variable-position. Reason code: reason-code. |
An error was encountered attempting to access or while accessing the file referenced by the "nth" host variable, where n = variable-position, for the reason given by reason-code. <variable-position> is set to 0 if the host variable position could not be determined. The possible reason codes are as follows:
|
For reason code 01, correct the file name length, file name and/or path. For reason code 02, specify a valid file option. For reason code 03, ensure that the file specified exists before attempting to access the file. For reason code 04, either delete the file if it is no longer required or specify a file name that does not currently exist. For reason code 05, ensure that the user has access (correct file permissions) to the file. For reason code 06, either use a different file or, if the file must be accessed, modify the application to ensure that the file is not accessed concurrently. For reason code 07, delete unnecessary files to free up disk space or specify a file that resides on another drive/file system with sufficient disk space. Also, ensure that no operating system or user file size limits were reached. If your application code page uses a multibyte encoding scheme it is possible that only part of the last character was written, ensure that the file contains only fully formed characters. For reason code 08, if a file is to be used for input, ensure that the file is not modified before the entire file has been read. For reason code 09, correct all errors on the media where the file resides. For reason code 10, ensure that the file contains valid multibyte characters based on the code page of the application or submit the request while running under the same code page as the contents of the file. For reason code 11, ensure that character conversion support between the code page of the file, for example Japanese EUC, and the graphic code page of the application, for example UCS-2, is installed. sqlcode: -452 sqlstate: 428A1 |
SQL0453N |
A problem has been identified with the RETURNS clause in the statement that defines the routine routine-name. |
A problem casting the result of routine routine-name has been identified. The CAST FROM data type is not castable to the RETURNS data type, and it should be. See the SQL Reference for details on casting between data types. |
Change the RETURNS or CAST FROM clause so that the CAST FROM data type is castable to the RETURNS data type. sqlcode: -453 sqlstate: 42880 |
SQL0454N |
The signature provided in the definition for routine routine-name matches the signature of some other routine. |
The signature of a function consists of the function name, the number of parameters defined for the function, and an ordered list of the types of the parameters. The signature of a method consists of the method name, the subject type of the method, the number of parameters defined for the method, and an ordered list of the types of the parameters. The signature of a procedure consists of the procedure name and the number of parameters defined for the procedure (data types are not considered). This can occur when:
The statement cannot be processed. |
Determine if the existing routine already provides the functionality desired. If not, then the signature of the routine will have to be changed; for example, by changing the routine name. If altering a module to add a routine body to a defined routine prototype, check that the signature matches or if the signature also needs to change and ensure that the routine name and specific name match those of the defined routine prototype. If the routine body of an existing module routine needs to be changed, alter the module to drop the routine and then alter the module to recreate the routine with the new routine body. sqlcode: -454 sqlstate: 42723 |
SQL0455N |
In routine routine-name, the schema name schema-name1 provided for the SPECIFIC name does not match the schema name schema-name2 of the routine. |
If the SPECIFIC name is specified as a two part name, the schema-name1 portion must be the same as the schema-name2 portion of the routine-name. Note that the schema-name2 portion of routine-name may have been specified directly or it may have defaulted to the authorization ID of the statement. If the routine is a method, schema-name refers to the schema name of the subject type of the method. |
Correct the statement and try again. sqlcode: -455 sqlstate: 42882 |
SQL0456N |
In the definition of routine routine-name, the SPECIFIC name specific-name already exists in the schema or module. |
The user has supplied an explicit SPECIFIC name specific-name in the definition of routine routine-name, but this name already exists as the SPECIFIC name for a function, method, or procedure in the schema or module. |
Choose a new SPECIFIC name and try again. sqlcode: -456 sqlstate: 42710 |
SQL0457N |
A function, method, user-defined data type, or structured data type attribute cannot be called name since it is reserved for system use. |
The user-defined function, method, user-defined data type, or structured data type cannot be created because a specified name is reserved for use by the system. Names that cannot be used for function names, distinct type names, structured type names, or attribute names include:
|
Select a name for the function, method, user-defined data type, or structured data type attribute that is not reserved for system use. sqlcode: -457 sqlstate: 42939 |
SQL0458N |
In a reference to routine routine-name by signature, a matching routine could not be found. |
In a reference to function, method, or stored procedure routine-name by signature, no matching function, method, or stored procedure could be found. If a data type is used that can accept a parameter, then the type parameter is optional. For example, for CHAR(12), you can either specify the parameter (CHAR(12)) or omit it (CHAR()). If you specify the parameter, then the DBMS will only accept an exact match on the data type and the data type parameter. If you omit the parameter, then the DBMS will accept a match on data type only. The CHAR() syntax provides a way to tell the DBMS to ignore data type parameters when finding a matching function. Note also that in the DROP FUNCTION/PROCEDURE, COMMENT ON FUNCTION/PROCEDURE and TRANSFER OWNERSHIP FUNCTION/PROCEDURE/METHOD statements, an unqualified reference is qualified with the statement authorization ID, and this is the schema where the problem can be found. In the SOURCE clause of a CREATE function, the qualification comes from the current path. In this case, there is no matching function in the entire path. A function cannot be sourced on the COALESCE, DBPARTITIONNUM, GREATEST, HASHEDVALUE, LEAST, MAX (scalar), MIN (scalar), NULLIF, NVL, RID, RAISE_ERROR, TYPE_ID, TYPE_NAME, TYPE_SCHEMA, or VALUE built-in functions. The statement cannot be processed. |
Possible responses include:
sqlcode: -458 sqlstate: 42883 |
SQL0461N |
A value with data type source-data-type cannot be CAST to type target-data-type. |
The statement contains a CAST with the first operand having a data type of source-data-type to be cast to the data type target-data-type. This cast is not supported. |
Change the data type of either the source or target so that the cast is supported. For predefined data types these are documented in the SQL Reference. For a cast involving a user-defined distinct type, the cast can be between the base data type and the user-defined distinct type or from a data type that is promotable to the base data type to the user-defined distinct type. sqlcode: -461 sqlstate: 42846 |
SQL0462W |
Command or routine command-or-routine-name (specific name specific-name) has returned a warning SQLSTATE, with diagnostic text text. |
An SQLSTATE of the form 01Hxx was returned to DB2 by the command or routine command-or-routine-name (with specific name specific-name), along with message text text. If command-or-routine-name is a command, then specific-name will contain the value ''*N''. |
The user will need to understand the meaning of the warning. See your database administrator, or the author of the routine. sqlcode: +462 sqlstate: Valid warning SQLSTATEs returned by a user-defined function, external procedure CALL, or command invocation. |
SQL0463N |
Routine routine-name (specific name specific-name) has returned an invalid SQLSTATE state, with diagnostic text text. |
The valid SQLSTATEs that a routine can return are 38xxx (error), 38502 (error) and 01Hxx (warning). This routine routine-name (specific name specific-name) returned an invalid SQLSTATE state, along with message text text. The routine is in error. |
The routine will need to be corrected. See your database administrator, or the author of the routine. The application significance of the bad SQLSTATE can also be learned from the routine author. sqlcode: -463 sqlstate: 39001 |
SQL0464W |
Procedure procedure-name returned generated-nbr-results query result sets, which exceeds the defined limit max-nbr-results. |
The stored procedure named by procedure-name completed normally. However, the stored procedure exceeded the defined limit on the number of query result sets the procedure can return.
Only the first max-nbr-results query result sets are returned to the SQL program that issued the SQL CALL statement. The possible causes are as follows:
|
The SQL statement is successful. The SQLWARN9 field is set to 'Z'. sqlcode: +464 sqlstate: 0100E |
SQL0465N |
Unable to start, initialize, or communicate with fenced mode process. Reason code code. |
There is a system related problem involved with the running of a fenced mode routine (user-defined function or method). The exact nature of the problem is indicated by code. This is NOT a user problem. Possible reason codes are: Routine process errors
Agent process errors
|
Contact your Database or System administrator. sqlcode: -465 sqlstate: 58032 |
SQL0466W |
The procedure procedure-name returns number-results result sets from the stored procedure. |
This message is returned as a result of issuing a CALL SQL statement. It indicates that the stored procedure procedure-name has number-results result sets associated with it. The statement completed successfully. |
None required. sqlcode: +466 sqlstate: 0100C |
SQL0467W |
The procedure procedure-name includes another result set. There are a total of max-nbr-results result sets. |
This message is returned as a result of closing a cursor. It indicates that another result set exists for stored procedure procedure-name and the cursor was re-opened on the next result set. There are a total of max-nbr-results result sets from the stored procedure. The statement completed successfully. |
None required. Fetches can proceed on to the next result set. sqlcode: +467 sqlstate: 0100D |
SQL0469N |
The parameter mode OUT or INOUT is not valid for a parameter in the routine named routine-name with specific name specific-name (parameter number number, name parameter-name). |
A parameter in an SQL procedure is declared as OUT and the corresponding argument is not a valid assignment target. For functions only, a parameter is declared as OUT or INOUT and the corresponding argument is not an SQL variable, global variable, or SQL parameter. A constant or an expression is an example of an invalid argument for OUT or INOUT parameters. For example, if a function named my_function was declared to have one OUT parameter, the following function call is not valid because the argument that is passed to the OUT parameter cannot have values assigned to it: SET my_variable = my_function( 1 + 2 ); |
If calling an SQL procedure, change the output argument to a valid assignment target. If invoking a function, change the OUT or INOUT argument to an SQL variable, global variable, or SQL parameter. sqlcode: -469 sqlstate: 42886 |
SQL0470N |
The user defined routine routine-name (specific name specific-name) has a null value for argument argument that could not be passed. |
A routine has an input argument with a null value but was defined with a parameter style that does not pass null indicators, or the data type of this parameter does not support null values. |
If the routine is to be called with null values, ensure the parameter style and input types are capable of accepting a null value. For functions, the function could also be created with "RETURNS NULL ON NULL INPUT". sqlcode: -470 sqlstate: 39004 |
SQL0471N |
Invocation of routine name failed due to reason reason-code. |
The invocation of routine name failed. Use reason code reason-code to find out more details about the cause of the failure. |
If the reason code starts with "DSNX9":
Else, the following lists the action to take for the indicated reason code:
sqlcode: -471 sqlstate: 55023 |
SQL0472N |
One or more cursors were left open by function or method routine-name (specific name specific-name). |
The function or method routine-name (specific name specific-name) did not close all its open cursors before the invoking statement completed. Functions and methods must close all cursors before the invoking statement completes. |
Consult with the developer of the function or method. The function or method must be rewritten to ensure that all cursors are closed before the invoking statement completes. sqlcode: -472 sqlstate: 24517 |
SQL0473N |
A user-defined data type could not be created because the specified name for the new data type is the same as the name of an existing, built-in data type. |
This message is returned when an attempt is made to either create a user-defined data type or to upgrade a database having a user-defined data type with a name that is the same name of a built-in data type. |
To create a new user-defined data type, re-issue the statement using a non-reserved data type name. To upgrade a database which has a user-defined data type with the same name as a built-in data type in the new product version, perform the following steps:
sqlcode: -473 sqlstate: 42918 |
SQL0475N |
The result type (type-1) of the SOURCE function cannot be cast to the RETURNS type (type-2) of the user defined function function-name. |
In order for the CREATE of a sourced user defined function (UDF) to be valid, the result type (type-1) of the source function must be castable to the RETURNS type (type-2) of the function being created. There is no supported cast between these data types. See the SQL Reference for details on casting between data types. |
Change the RETURNS data type or the SOURCE function identification so that the result type of the SOURCE function is castable to the RETURNS data type. sqlcode: -475 sqlstate: 42866 |
SQL0476N |
Reference to routine function-name was made without a signature, but the routine is not unique in its schema. |
References to a function or stored procedure without a signature is permitted, but the named function or store procedure function-name must be unique in its schema and is not. If the routine is a method, a reference without a signature is permitted but this named method must be unique for the data type. Note that in the DROP FUNCTION/PROCEDURE and COMMENT ON FUNCTION/PROCEDURE statements, an unqualified reference is qualified with the statement authorization ID, and this is the schema where the problem can be found. In the SOURCE clause of a CREATE FUNCTION, the qualification comes from the current path. In this case, the first schema in the path containing a function with this name had other functions by the same name. Federated system users: For a pass-through session, if the statement is a CREATE FUNCTION MAPPING statement, this error indicates that an attempt was made to create a function mapping from one remote function to more than one local function. |
Correct the reference by one of the following:
and try again. sqlcode: -476 sqlstate: 42725 |
SQL0478N |
The statement failed because one or more dependencies exist on the target object. Target object type: object-type1. Name of an object that is dependent on the target object: object-name. Type of object that is dependent on the target object: object-type2. |
When object B is said to be dependent on object A, actions taken on object A could significantly affect object B. For example, when you drop a table any objects that are directly or indirectly dependent on that table could be either deleted or made inoperative. Because of these possible outcomes for dependent objects, some types of actions fail if there are dependencies on the object that is target of the action. This message is returned when an attempt to drop, alter, transfer ownership of, or revoke privileges on a target object fails because other objects directly or indirectly depend on that target object. Examples of scenarios in which this message can be returned:
|
sqlcode: -478 sqlstate: 42893 |
SQL0480N |
The procedure procedure-name has not yet been called. |
Either the procedure identified in an ASSOCIATE LOCATORS statement has not yet been called within the application process, or the procedure has been called, but an explicit or implicit commit occurred before the statement. |
Correct the statements so that the exact syntax used to specify the procedure name on the CALL statement is the same as that on the ASSOCIATE LOCATORS statement. If an unqualified name is used to CALL the procedure, the one-part name must also be used in the other statements. Reissue the statements. sqlcode: -0480 sqlstate: 51030 |
SQL0481N |
The GROUP BY clause contains element-1 nested within element-2. |
The following types of nesting are not allowed within a GROUP BY clause:
where GEL represents the element shown as grouping-expression-list in the syntax diagram of the GROUP BY clause. In some instances the value "---" will be shown for element 2. In this case "---" represents one of CUBE, ROLLUP, GROUPING SETS, or GEL. The statement cannot be processed. |
Modify the GROUP BY clause to remove the nesting. sqlcode: -481 sqlstate: 428B0 |
SQL0483N |
In the CREATE for user defined function function-name statement, the number of parameters does not match the number of parameters of the SOURCE function. |
An attempt is being made to CREATE a user defined function function-name which is sourced on another function. One of the following situations has been identified:
|
The number of parameters for the SOURCE function and for the function being created must be the same. The identification of the SOURCE function needs to be changed, to
It is also possible that the path needs to be corrected in order for correct function resolution to occur. sqlcode: -483 sqlstate: 42885 |
SQL0486N |
The BINARY and VARBINARY data types are currently only supported internally. |
One or more of the data types in the statement is BINARY or VARBINARY. This is not supported in the current version of DB2. |
Change the data type(s) then resubmit the statement. sqlcode: -486 sqlstate: 42991 |
SQL0487N |
Routine routine-name (specific name specific-name) attempted to execute an SQL statement. |
The program used to implement the body of a routine is not allowed to execute SQL statements. This routine routine-name (specific name specific-name) contains SQL statements or this routine calls a procedure that uses SQL statements, such as the SYSPROC.ADMIN_CMD procedure. |
Remove any SQL statements then recompile the program. Investigate the level of SQL allowed as specified on the statement defining the routine. sqlcode: -487 sqlstate: 38001 |
SQL0489N |
The function function-name in a SELECT or VALUES list item has produced a BOOLEAN result. |
The function function-name is defined for use as a predicate, returning a boolean result. Such a result is not valid in a select list. The statement cannot be processed. |
Correct the function name or remove the use of the function. sqlcode: -489 sqlstate: 42844 |
SQL0490N |
Number number directly specified in an SQL statement or command is outside the range of allowable values in this context (minval,maxval). |
A number (number) was specified that is not valid in the context in which it was specified. The minimum allowed value in this context is minval. The maximum allowed value in this context is maxval. n must be within the range specified by minval and maxval (minval =< n => maxval). If creating or altering a table space, the minimum and maximum values may be dependant on the page size of the table space. Refer to the SQL Reference for more details on table space limits. |
Change the value n to a valid value in the statement or command. sqlcode: -490 sqlstate: 428B7 |
SQL0491N |
The CREATE FUNCTION or ALTER MODULE statement used to define routine-name must have a RETURNS clause, and one of: the EXTERNAL clause (with other required keywords); an SQL function body; or the SOURCE clause. |
A required clause is missing in the definition of routine routine-name. If EXTERNAL was specified, one of the following clauses must also be specified: LANGUAGE, PARAMETER STYLE. If defining an SQL function, the SQL function body must be included unless using the PUBLISH action of ALTER MODULE to define an SQL function prototype. |
Add the missing clause, and then try again. sqlcode: -491 sqlstate: 42601 |
SQL0492N |
There is a problem in the CREATE for user defined function function-name, with parameter number number. It may involve a mismatch with a SOURCE function. |
The parameter in position number of function function-name is in error and the CREATE cannot be performed. The parameter in position number of the source function is not castable to the corresponding parameter of the function being created. |
Possible corrections include:
sqlcode: -492 sqlstate: 42879 |
SQL0493N |
Routine routine-name (specific name specific-name) has returned a date, time or timestamp value which is syntactically or numerically invalid. |
The body of user defined function (UDF) or method routine-name (specific name specific-name) has returned an invalid date, time or timestamp value. An example of a syntactically invalid date value is '1994-12*25': the '*' should be a '-'. An example of a numerically invalid time value is '11.71.22': there is no 71st minute in the hour. |
The routine needs fixing. See your DBA, or the author of the routine. sqlcode: -493 sqlstate: 22007 |
SQL0494W |
The number of result sets is greater than the number of locators. |
The number of result set locators specified on the ASSOCIATE LOCATORS statement is less than the number of result sets returned by the stored procedure. The first "n" result set locator values are returned, where "n" is the number of result set locator variables specified on the SQL statement. The SQL statement is successful. The SQLWARN3 field is set to 'Z'. |
Increase the number of result set locator variables specified on the SQL statement. sqlcode: +494 sqlstate: 01614 |
SQL0495N |
Estimated processor cost of estimate-amount1 processor seconds (estimate-amount2 service units) in cost category cost-category exceeds a resource limit error threshold of limit-amount service units. |
The prepare of a dynamic INSERT, UPDATE, DELETE, or SELECT SQL statement resulted in a cost estimate that exceeded the error threshold value specified in the resource limit specification table (RLST). This error is also issued if DB2's cost category value was "B", and the default action specified in the RLF_CATEGORY_B column in the RLST is to issue an error.
The prepare of the dynamic INSERT, UPDATE, DELETE, or SELECT statement was unsuccessful. |
If this SQLCODE was returned because the cost category value is "B", it might be that the statement is using parameter markers or that some statistics are not available for the referenced tables and columns. Make sure the administrator has run the utility RUNSTATS on the referenced tables. It might also be that UDFs will be invoked when the statement is executed, or for INSERT, UPDATE, or DELETE statements that triggers are defined on the changed table. Check the DSN_STATEMNT_TABLE or the IFCID 22 record for this statement to find the reasons this SQL statement has been put in cost category "B". If the program cannot be changed, or if statistics cannot be obtained, ask the administrator to change the value in the RLF_CATEGORY_B column in the RLST to "Y" which allows the statement to execute or "W" which returns a warning instead of an error. If the warning is caused by an SQL statement that is consuming too much processor resource, attempt to rewrite the statement to perform more efficiently. Another option is to ask the administrator to increase the error threshold value in the RLST. sqlcode: -495 sqlstate: 57051 |
SQL0499N |
Cursor cursor-name has already been assigned to this or another result set from procedure procedure-name. |
An attempt was made to assign a cursor to a result set but multiple cursors have been allocated for procedure procedure-name. |
Determine if the target result set was previously assigned to a cursor. If multiple cursors have been allocated for procedure procedure-name ensure that only one cursor is used to process the result sets of a stored procedure. sqlcode: -499 sqlstate: 24516 |