SQL0000-0999
SQL Message ID | Message | Explanation | User Response |
---|---|---|---|
SQL0000W |
Statement processing was successful. |
The SQL statement executed successfully, unless a warning condition occurred. |
Check SQLWARN0 to ensure that it is blank. If it is blank, the statement executed successfully. If it is not blank, a warning condition exists. Check the other warning indicators to determine the particular warning condition. For example, if SQLWARN1 is not blank, a string was truncated. sqlcode: 0 sqlstate: 00000, 01003, 01004, 01503, 01504, 01506, 01509, 01517 |
SQL0001N |
Binding or precompilation did not complete successfully. |
For reasons specified in the previous messages, the bind or precompile request was unsuccessful. No package is created. |
Refer to the messages in the message file. Resubmit the command. If installing the sample database, drop it and install the sample database again. |
SQL0002N |
The bind file name is not valid. |
For reasons specified in the previous messages, the bind file name cannot be used as specified. No package is created. |
Refer to the messages in the message file. Resubmit the command. If installing the sample database, drop it and install the sample database again. |
SQL0003N |
The database name is not valid. |
For reasons specified in the previous messages, the database name cannot be used as specified. No package is created. |
Refer to the messages in the message file. Resubmit the command. |
SQL0004N |
The password is not valid. |
The password contains characters that are not valid or the password is too long. No package is created. |
Resubmit the command with a valid password. |
SQL0005N |
The message file name is not valid. |
For reasons specified in the previous messages, the message file name cannot be used as specified. No package is created. |
Refer to the messages in the message file. Check the name of the message file. Check the attributes of the message file if it exists. Resubmit the command. |
SQL0006N |
The datetime format parameter is not valid. |
The value of the datetime format parameter is not in the valid range of 0 through 3. No package is created. |
Resubmit the command with a valid format parameter. |
SQL0007N |
The statement was not processed because a character that is not supported in SQL statements was included in the SQL statement. Invalid character: character. Text preceding the invalid character: text. |
The specified character is not a valid character in SQL statements. The text runtime token indicates the 20 characters of the SQL statement that preceded the character that is not valid. Federated system users: Some data sources do not provide the appropriate values for the character and text runtime tokens. In these cases, character and text will have the following format: "<data source>:UNKNOWN", indicating that the actual values for the specified data source are unknown. |
Remove or replace the character that is not valid and then resubmit the statement. sqlcode: -7 sqlstate: 42601 |
SQL0008N |
The token token found in a host variable declaration is not valid. |
A host variable declaration has invalid syntax. The precompiler cannot identify the host variable. The statement cannot be processed. None of the host variables declared in the statement (up to the semicolon) are accepted. |
Examine the syntax of the host variable declaration. |
SQL0009W |
An attempt to override a precompilation option was ignored. |
An attempt was made to override a precompiler option. The option is ignored. |
Ensure that all precompiler options are specified correctly. |
SQL0010N |
The string constant beginning with string does not have an ending string delimiter. |
The statement contains a string constant, beginning with string, that is not terminated properly. The statement cannot be processed. |
Examine the statement for missing apostrophes in the indicated string constant. sqlcode: -10 sqlstate: 42603 |
SQL0011N |
The comment is not terminated. |
The comment is not terminated properly. The statement cannot be processed. |
Examine the statement for a missing or extra comment delimiter in the indicated comment. |
SQL0012W |
Correlation without qualification has occurred for the column column. |
The named column occurs in a SELECT statement, is not explicitly qualified, and occurs in a table specified in the FROM clause of an outer select. Consequently, the reference to the column in the SELECT statement has been taken to be an outer reference and correlation will occur. The statement was processed under the assumption that correlation was intended. |
Ensure that correlation was intended. It is a good practice to explicitly qualify intended outer references. sqlcode: +12 sqlstate: 01545 |
SQL0013N |
An empty delimited identifier is not valid. |
During precompilation, either a cursor name, statement name, database name, or authorization ID, specified as an empty string, was found. This is not valid. The statement cannot be processed. |
Provide a valid cursor name, statement name, database name, or authorization ID. |
SQL0014N |
The source file name is not valid. |
The source file name specified in the call to the precompiler contains invalid characters or the pointer to the source file name is invalid. No package was created. |
Ensure that the source file name is correct. |
SQL0015N |
The host variable data type token-1 is not valid. Use token-2 instead. |
If the WCHARTYPE CONVERT precompile option is in effect then the graphic host variable must be declared with the data type 'wchar_t', not 'sqldbchar'. If the WCHARTYPE NOCONVERT precompile option is in effect (the default) and 'wchar_t' is defined as a 4-byte integer on this platform, then the graphic host variable must be declared with the data type 'sqldbchar', not 'wchar_t'. |
Replace the current data type of the host variable with the data type specified in the message. |
SQL0017N |
A RETURN statement must be specified and executed in an SQL function or method. |
The SQL function or method either does not contain a RETURN statement, or the function or method did not end with the execution of a RETURN statement. |
Ensure the function or method executes a RETURN statement. sqlcode: -17 sqlstate: 42632 |
SQL0020W |
The bind or precompile command parameters or parameter values in the following list were ignored because they are not supported by the target database: parameter-names-or-values. |
You can prepare SQL statements that are stored in a bind file that was generated by the precompiler, and create a package in the database using the BIND command. You can process an application program source file containing embedded SQL statements and create a package in the database using the PRECOMPILE command. This warning is returned in the following situations:
|
Execute the BIND command or PRECOMPILE command again, specifying parameters and values that are supported by the target database server. |
SQL0021W |
Invalid precompiler option option is ignored. |
The option specified in the message is not a valid precompiler option. The option is ignored. |
Ensure that all precompiler options are specified correctly. |
SQL0022W |
Duplicate precompiler option option is ignored. |
The precompiler option option is a duplicate. The option is ignored. |
Ensure that all precompiler options are specified only once. |
SQL0023N |
The database name is not valid. |
The specified database name is not a valid name. Precompilation is terminated. |
Ensure that the database name is spelled correctly and follows the rules for short identifiers. |
SQL0024N |
A database name was not specified. |
No database name was provided to proceed with precompilation. Precompilation is terminated. |
Provide a database name. |
SQL0025W |
Binding or precompilation completed with warnings. |
Binding or precompilation succeeded, but warnings were issued. A package and/or bindfile was created as requested in the command. |
Refer to the messages in the message file. If necessary, correct the problems and resubmit the command. |
SQL0026N |
The password is not valid. |
The specified password is not a valid password. Precompilation is terminated. |
Ensure that the password provided follows the rules for valid passwords. |
SQL0028C |
The release number of the bind file is not valid. |
The release number of the bind file is not compatible with the release number of the installed version of the database manager. The bind file cannot be used with the current version of the database manager. The command cannot be processed. |
If possible, repeat the precompile process with the current database manager. Otherwise, use only bind files created with a compatible release level of the database manager. |
SQL0029N |
INTO clause required. |
Non-cursor SELECT or VALUES statements embedded in an application program must have an INTO clause to denote where the results of the statement are to be placed. Dynamic SELECT statements do not permit the INTO clause. |
Add the INTO clause to the SELECT or VALUES statement and precompile the application program again. sqlcode: -29 sqlstate: 42601 |
SQL0030N |
A source file name was not specified. |
A source file name was not provided to proceed with precompilation. Precompilation is terminated. |
Specify a source file name. |
SQL0031C |
File name could not be opened. |
The file name is required but could not be opened. Precompilation is terminated. |
Ensure that the file name specified is correct and exists in the file system, and that the file permissions are correct. If installing the sample database, drop it and install the sample database again. If the error continues, reinstall the database manager and then install the sample database. |
SQL0032C |
Unable to use file name. |
While reading or writing file name, an error was encountered. Precompilation is terminated. |
Retry the precompilation. |
SQL0033N |
name is not a valid bind file. |
The bind file name specified is not a bind file. Binding is terminated. |
Ensure that the correct file name was specified. |
SQL0034N |
A bind file name was not specified. |
No bind file name was specified to proceed with binding. Binding is terminated. |
Provide a bind file name. |
SQL0035N |
The file name cannot be opened. |
The message file name could not be opened. Binding or precompilation has been terminated. |
Ensure that the system can access the file. |
SQL0036N |
The syntax of the file name name is not valid. |
If the file is input to the precompiler, it must have an extension with the correct extension for the language being used. If the file is input to the binder, it must have an extension of .bnd. Also, a fully resolved file name which is over the platform maximum length will cause this error. Precompilation or binding is terminated. |
Ensure that the specified file name is correct. |
SQL0037W |
The syntax of the message file name is not valid. |
The message file name name is not syntactically correct for this function. The system redirects the output to the standard output device. |
Ensure that the specified file name is correct. |
SQL0038W |
The bind option SQLERROR CONTINUE has been activated since it is required when binding this DB2-supplied list file to DB2/MVS, SQL/DS, or OS/400. |
The SQLERROR CONTINUE bind option is required when binding the following DB2-supplied list files:
This option instructs a DRDA server to create a package even if there are SQL statements in a bind file which it considers invalid. Since not all of the DRDA servers support all of the SQL statements contained in the DB2-supplied bind files, the SQLERROR CONTINUE bind option must be used to guarantee that packages are created for all of the bind files in the list file. |
No response is necessary. The required bind option, SQLERROR CONTINUE, has been specified for you. To avoid receiving this warning in the future specify the SQLERROR CONTINUE bind option. |
SQL0039N |
The binder did not finish processing because the bind file is not valid. |
The binder could not process the bind file. The bind file may not be valid because the bind file contents were altered accidentally. The bind file is not processed. |
If possible, repeat the precompile process to create a new bind file. Otherwise, obtain a new copy of the bind file. |
SQL0040N |
An error occurred on one or more bind files in list name. The following files were not bound: list. |
For reasons specified in the previous messages in the message file, one or more bind files were not bound. The list of files that were not bound is composed of digits, starting from 1, that indicate the relative position of the unbound files in the list file. name does not include the path specification of the list file. Only the first 20 bind files in error are listed in the message. If there were more than 20 bind files in error, ellipses (...) are inserted after the last bind file name in the list. One or more packages were not created. |
Refer to the messages in the message file. Check the list file to verify that it contains valid names. Resubmit the command. |
SQL0041N |
No attempt was made to bind the files following file number number in list name because a fatal error occurred which terminated processing. |
Some errors encountered during the binding process are considered fatal (that is, system errors, memory errors). If one of these errors occurs while processing a file in a list file, processing terminates. No attempt is made to bind the remaining files in the list file. Such an error occurred while binding the specified bind file in the list. Note that the digit used to identify the bind file indicates the relative position of the file in the list file. |
Refer to the other messages which accompanied this one to resolve the errors which occurred. Resubmit the command. |
SQL0051N |
The space required to hold all SQL statements for a single program has exceeded its allowed maximum. |
The space required by all SQL statements in the program cannot fit into the column SECT_INFO in SYSIBM.SYSPLAN. Precompilation is terminated. |
Either simplify the program, or split the program into smaller, separate programs, or do both. |
SQL0053W |
No SQL statements were found in the program. |
The specified source file contains no SQL statements. If binding, an empty package is created. |
Ensure that you are precompiling or binding the correct program. |
SQL0055N |
Source input file is empty. |
The program source input file contained no data. Precompilation is terminated. |
Ensure that the correct input file was specified. |
SQL0056N |
An SQLSTATE or SQLCODE variable declaration is in a nested compound statement. |
An SQLSTATE or SQLCODE variable declaration is in a nested compound statement instead of the outermost compound statement in the SQL routine. The statement cannot be processed. |
Declare the SQLSTATE and SQLCODE variables only in the outermost compound statement of the SQL routine. sqlcode: -56 sqlstate: 42630 |
SQL0057N |
A RETURN statement in an SQL function or method must include a return value. |
A RETURN statement is specified in the SQL function or method without specifying a value to return. The statement cannot be processed. |
Specify a value on the RETURN statement. sqlcode: -57 sqlstate: 42631 |
SQL0058N |
The data type of the RETURN statement value in an SQL procedure must be INTEGER. |
A RETURN statement is specified in the SQL procedure with a value or expression that is not of the INTEGER data type. The statement cannot be processed. |
Specify a value on the RETURN statement that has a data type of INTEGER. sqlcode: -58 sqlstate: 428F2 |
SQL0060W |
The name precompiler is in progress. |
This message is written to the standard output device when the precompiler begins processing. The token name refers to the particular language precompiler which was invoked. Processing continues. |
No action is required. |
SQL0061W |
The binder is in progress. |
This message is written to the standard output device when the binder begins processing. Processing continues. |
No action is required. |
SQL0062W |
Starting INCLUDE of file name. |
An INCLUDE statement has been encountered. The precompiler is now processing the INCLUDE file. |
No action is required. |
SQL0063W |
Completed INCLUDE of file name. |
The precompiler has completed processing the INCLUDE file. It will resume processing the file which contained the INCLUDE statement. |
No action is required. |
SQL0064N |
File name directly or indirectly INCLUDEs itself. |
A cyclic INCLUDE has been encountered. A precompiler input file cannot INCLUDE itself, nor be INCLUDEd by a file it INCLUDEs. The specified file is not INCLUDEd. |
Check the nesting of the INCLUDE files, and remove any cycles. |
SQL0065N |
An unexpected end-of-line was encountered in a host variable declaration. |
A host variable declaration has an invalid syntax. An end-of-line was encountered before the declaration was complete. The statement cannot be processed. |
Examine the syntax of the host variable declaration. |
SQL0078N |
Parameter names must be specified for routine routine-name. |
The routine routine-name does not have parameter names specified for all parameters. When the routine is defined with LANGUAGE SQL or SQLMACRO a parameter name is required for each parameter defined. The statement cannot be processed. |
Ensure that each defined parameter includes a parameter name. sqlcode: -78 sqlstate: 42629 |
SQL0079N |
The Schema name for the declared global temporary table or index name must be SESSION, not schema-name. |
The schema name name for a declared temporary table or an index on a declared global temporary table must be SESSION. The statement is specifying an explicit schema-name of schema-name for the declared global temporary table or index on a declared global temporary table. This is not allowed. The statement cannot be processed. |
Change the statement in one of the following ways:
sqlcode: -79 sqlstate: 428EK |
SQL0081N |
SQLCODE sqlcode returned during precompilation/bind. |
While precompiling or binding the program, an unexpected SQLCODE sqlcode was returned from the database manager. The statement cannot be processed. |
Inspect the SQLCODE to determine the problem and take the appropriate action. |
SQL0082C |
An error has occurred which has terminated processing. |
A previous, non-SQL error has caused processing to terminate. Precompile/bind/rebind is terminated. No package was created. |
Correct the situation that caused the previous error and retry the operation. |
SQL0083C |
A memory allocation error has occurred. |
During processing, there was not enough memory to continue processing. |
Possible solutions include:
If you continue to receive this message after attempting the suggested solutions, contact IBM Customer Support. |
SQL0084N |
An EXECUTE IMMEDIATE statement contains a SELECT or VALUES statement. |
A SELECT or VALUES statement was used in an EXECUTE IMMEDIATE statement. The statement cannot be processed. |
The implied function is not supported. Prepare the SELECT or VALUES statement. Then use OPEN, FETCH, and CLOSE. sqlcode: -84 sqlstate: 42612 |
SQL0085N |
The statement name name is already defined. |
A previous DECLARE statement already used the statement name specified in the current DECLARE statement. The current DECLARE statement is not processed. The previous DECLARE statement retains use of the statement name. |
Use a different name for the statement. |
SQL0086C |
A memory allocation error has occurred. |
During processing, there was not enough memory to continue processing. |
Possible solutions include:
|
SQL0087N |
A null value was specified in a context where a null value is not allowed. |
A variable is used in a context where it must not be the null value. For example, a cursor variable can be used in an OPEN or FETCH statement, but the value of the cursor variable must not be the null value. The statement cannot be processed. |
Ensure that the value of the variable is not null in a context that does not allow the null value and try the request again. sqlcode: -87 sqlstate: 22004 |
SQL0088N |
Host variable name is ambiguous. |
Host variable name cannot be uniquely identified. More than one host variable with the same qualification can be found. The statement cannot be processed. |
Qualify the host variable further, or rename it if it is already fully qualified. |
SQL0089N |
Processing ended after 100 errors were found. |
The precompiler or binder quits processing after 100 errors were found. |
Fix the errors indicated in the message log and resubmit the command. |
SQL0091W |
Precompilation or binding was ended with number-1 errors and number-2 warnings. |
The precompilation or binding has terminated with the stated number of warnings and errors. Precompilation or binding is terminated. |
If warnings or errors occurred, correct the program, if necessary, and retry the precompilation or binding. |
SQL0092N |
No package was created because of previous errors. |
Because of previous errors, no package was created. |
Correct the errors and retry the precompilation or bind. |
SQL0093N |
The end-of-input was encountered before the statement terminator for EXEC SQL. |
While processing an SQL statement, the end of source was encountered before the statement terminated. Precompilation is terminated. |
Ensure that the SQL statement terminates properly. |
SQL0094N |
Binding was ended because of a user interrupt request. |
Binding was terminated because the user may have pressed the interrupt key sequence. Processing is terminated. No package is created. |
Resubmit the bind, if needed. If installing the sample database, drop it and install the sample database again. |
SQL0095N |
No bind file was created because of previous errors. |
Because of previous errors, no bind file was created. No bind file is created. |
Correct the errors and retry the precompilation. |
SQL0097N |
Variables or parameters of LONG VARCHAR or LONG VARGRAPHIC data types are not supported in SQL routines. |
SQL routines (procedures, functions or methods) do not support variables or parameters of LONG VARCHAR or LONG VARGRAPHIC data types. |
Do not use variables or parameters of LONG VARCHAR or LONG VARGRAPHIC data types in SQL routines. For LONG VARCHAR, use VARCHAR with an explicit length. For LONG VARGRAPHIC, use VARGRAPHIC with an explicit length. sqlcode: -97 sqlstate: 42601 |
SQL0100W |
No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. |
One of the following conditions is true:
No data was retrieved, updated, or deleted. |
No action is required. Processing can continue. sqlcode: +100 sqlstate: 02000 |
SQL0101N |
The statement was not processed because a limit such as a memory limit, an SQL limit, or a database limit was reached. |
This message can be returned when an attempt is made to prepare or execute an SQL statement that exceeds a limit such as a memory limit, an SQL limit, or a database limit. In this context, "memory limits" include the following examples:
For example, this message can be returned for the following reasons:
This message can also be returned when an attempt is made to execute an SQL statement that is too complex to compile. For example, the following elements contribute to the complexity of a statement:
|
Respond to this error by taking one or more of the following actions:
sqlcode: -101 sqlstate: 54001 |
SQL0102N |
The string constant beginning with string is too long. |
One of the following has occurred:
It may be that data conversion is occurring and the resultant string is too long. For connections between applications and databases running under different codepages, string constants are converted from the application codepage to the database codepage. In certain situations, graphic string constants may be further converted from the database codepage to a UCS-2 (UNICODE) encoding, for example when the database has been created with an EUC codepage. This means that it is possible to have a resultant string which is longer than the input string. The statement cannot be processed. |
For Comment on Table or Comment on Column, reduce the size of the comment. For the SQL CONNECT statement, reduce the length of the application server name. For other string constants, the requested function is not available interactively. For an error occurring in the context of a non-CONNECT SQL statement embedded in an application program, assign the long string to a host variable and substitute that variable for the string literal in the SQL statement. 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 limit has been exceeded, and adjust the failing statement as needed. Ingest utility users: Specify an ingest job ID that is less than 129 bytes, or specify a format string that is not greater than the maximum length. sqlcode: -102 sqlstate: 54002 |
SQL0103N |
The numeric literal literal is not valid. |
The indicated literal begins with a digit but is not a valid integer, decimal, or floating point literal. Federated system users: a data source-specific literal representation error has occurred in apass-through session. The statement cannot be processed. |
Correct the invalid numeric literal.Federated system users, if the error occurred in a pass-through session, determine what data source is causing the error. Examine the SQL dialect for that data source to determine which literal representation rule has been violated, and adjust the failing statement as needed. sqlcode: -103 sqlstate: 42604 |
SQL0104N |
An unexpected token token was found following text. Expected tokens may include: token-list. |
A syntax error in the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure was detected at the specified token following the text text. The text field indicates the 20 characters of the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure that preceded the token that is not valid. As an aid, a partial list of valid tokens is provided in the SQLERRM field of the SQLCA as token-list. This list assumes the statement is correct to that point. This message can be returned when text is passed to the command line processor (CLP) in command mode and the text contains special characters that are interpreted by the operating system shell, such as single or double quotes, which are not identified with an escape character. This error can also be returned for an explicitly qualified reference to a SYSIBM built-in function that does not support explicit use of SYSIBM as a function qualifier. The statement cannot be processed. |
Respond to this error in one of the following ways:
sqlcode: -104 sqlstate: 42601 |
SQL0105N |
The string constant beginning with string is not valid. |
The statement contains a string constant beginning with string that is not valid. The statement cannot be processed. |
Specify the correct format of the string constant. Check for graphic string, paired delimiters, and an even number of bytes within the string. sqlcode: -105 sqlstate: 42604 |
SQL0106N |
SQL statement begins properly but is incomplete. |
The SQL statement was correct up to the point where no more input was found. This may be caused by failure to properly end a literal. String literals need a final quote mark. Processing of this SQL statement has ended. |
Check that the statement has all the necessary parts to complete the desired function and that all clauses are complete. For PL/I: Check that the SQL statement is complete before the semicolon. For Assembler: Check that the continuation rules are properly followed. (A nonblank character must be in column 72, and continued lines must start in column 16 or beyond.) For COBOL: Check that the SQL statement is complete before END-EXEC. sqlcode: -106 sqlstate: 42601, 42603 |
SQL0107N |
The name name is too long. The maximum length is length. |
The name returned as name is too long. The maximum length in bytes permitted for names of that type is indicated by length. This does not include any escape characters, if present. Federated system users: If in a pass-through session, a data source-specific limit might have been exceeded. The statement cannot be processed. Note: Where character data conversions are performed for applications and databases running under different code pages, this error can be returned because the result of the conversion exceeds the length limit. |
Choose a shorter name or correct the spelling of the object name. 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 limit has been exceeded, and adjust the failing statement as needed. sqlcode: -107 sqlstate: 42622, 10901 |
SQL0108N |
The name name has the wrong number of qualifiers. |
The name name is improperly qualified. The object given the name name can only have one qualifier in this context. A column name is qualified with a table name, which is either qualified or unqualified, or a correlation name. In some contexts, a column name requires a table name qualifier. Identification of a module-object for an ALTER MODULE statement action must be an unqualified one-part name. The statement cannot be processed. |
Ensure that the name for the object is qualified correctly. sqlcode: -108 sqlstate: 42601 |
SQL0109N |
The statement or command was not processed because the following clause is not supported in the context where it is used: clause. |
This message is returned when an SQL statement or command uses a clause in a way that is not supported. There are many different scenarios in which this message can be returned. Some examples of scenarios in which this message can be returned include the following:
|
Remove the clause from the statement or command and then resubmit the statement or rerun the command.
sqlcode: -109 sqlstate: 42601 |
SQL0110N |
string is an invalid hexadecimal constant. |
The hexadecimal constant string is invalid. The problem is one of the following:
|
Correct the constant and resubmit the statement. sqlcode: -110 sqlstate: 42606 |
SQL0111N |
The column function name does not include a column name. |
The specification of the column function name (AVG, MIN, MAX, SUM, or COUNT(DISTINCT)) was not specified correctly because such functions must include a column name in the operand. The statement cannot be processed. |
Specify a column name in the expression that is the operand to the column function. NOTE: This error is only applicable to releases of DB2 prior toVersion 2 . sqlcode: -111 sqlstate: 42901 |
SQL0112N |
The operand of the column function name includes a column function, a scalar fullselect, or a subquery. |
The operand of a column function cannot include:
In a SELECT list, the operand of an arithmetic operator cannot be a column function that includes the DISTINCT keyword. The statement cannot be processed. |
Correct the use of the column function to eliminate the invalid expression and try again. sqlcode: -112 sqlstate: 42607 |
SQL0113N |
identifier contains a character that is not allowed or does not contain any characters. |
An SQL-variable-name, parameter-name, security label component element, or condition-name identifier contains an invalid character. for SQL-variable-name, parameter-name, and condition-name, only characters that are valid for an SQL ordinary identifier are allowed. Note that because the identifier is delimited, folding is not performed and uppercase and lowercase letters are treated as distinct from each other. For security label component element, only characters that are valid for element values are allowed. |
Correct the identifier and resubmit the statement. sqlcode: -113 sqlstate: 42601 |
SQL0117N |
The number of values assigned is not the same as the number of specified or implied columns or variables. |
The number of values can be different when:
The statement cannot be processed. |
Correct the statement to specify one value for each of the specified or implied columns or variables. sqlcode: -117 sqlstate: 42802 |
SQL0118N |
The table or view that is the target of the INSERT, DELETE, or UPDATE statement is also specified in a FROM clause. |
The table or view specified as the target of an INSERT, DELETE, or UPDATE statement also appears in the FROM clause of a subquery within the statement. The table or view that is the target of an INSERT, UPDATE, or DELETE cannot also be used to supply the values to be inserted or to qualify the rows to be inserted, updated, or deleted. The statement cannot be processed. This message is only applicable to Version 1.2 servers and earlier, and hosts accessed through DB2 Connect. |
The implied function is not supported. To attempt to obtain the desired result, create a temporary copy of the object table or view and address the subselect to that copy. sqlcode: -118 sqlstate: 42902 |
SQL0119N |
An expression starting with expression-start specified in a SELECT clause, HAVING clause, or ORDER BY clause is not specified in the GROUP BY clause or it is in a SELECT clause, HAVING clause, or ORDER BY clause with a column function and no GROUP BY clause is specified. |
The SELECT statement has one of the following errors:
The identified expression is an expression that starts with expression-start. The expression may be a single column name. If the NODENUMBER or PARTITION functions are specified in the HAVING clause, then all partitioning key columns of the underlying table are considered to be in the HAVING clause. The statement cannot be processed. |
Correct the statement by including the expression in the GROUP BY clause that are in the SELECT clause, HAVING clause, or ORDER BY clause or by removing the column function from the SELECT statement. sqlcode: -119 sqlstate: 42803 |
SQL0120N |
Invalid use of an aggregate function or OLAP function. |
An aggregate function or OLAP function can only be used in the select list of a fullselect, the having clause, or, with restrictions, in a WHERE clause or GROUP BY clause. A WHERE clause can contain an aggregate function or OLAP function only if that clause appears within a subquery of a HAVING clause and the argument of the function is a correlated reference to a group. A GROUP BY clause can contain an aggregate function or OLAP function only if the argument of the function is a correlated reference to a column in a different subselect than the one containing the GROUP BY clause. An OLAP function cannot be used within the argument list of an XMLQUERY or XMLEXISTS expression. The statement cannot be processed. |
Change the statement so that the aggregate function or OLAP function is not used or used only where it is supported. sqlcode: -120 sqlstate: 42903 |
SQL0121N |
The target name name is specified more than once for assignment in the same SQL statement. |
The same target name name is specified more than once as an OUT or INOUT argument of a CALL statement, or in the list of columns of an INSERT statement, the left hand side of assignments in the SET clause of an UPDATE statement, or the left hand side of the assignment statement. The target name identifies a column, SQL parameter, or variable. Note that this error may occur when updating or inserting into a view where more than one column of the view is based on the same column of a base table. The statement cannot be processed. |
Correct the syntax of the statement so each column name is specified only once. sqlcode: -121 sqlstate: 42701 |
SQL0122N |
A SELECT statement with no GROUP BY clause contains a column name or expression and a column function in the SELECT clause, or a column name or expression is contained in the SELECT clause but not in the GROUP BY clause. |
The SELECT statement has one of the following errors:
The column or expression may be contained in a scalar function. If the DATAPARTITIONNUM, DBPARTITIONNUM, NODENUMBER, HASHEDVALUE or PARTITION functions are specified in the SELECT clause, then all database or table-partitioning key columns of the underlying table are considered to be in the SELECT clause. The statement cannot be processed. |
Correct the statement by including the columns or expressions in the GROUP BY clause that are in the SELECT clause, or by removing the columns or expressions from the SELECT clause. sqlcode: -122 sqlstate: 42803 |
SQL0123N |
The parameter in position n in the function name must be a constant, a keyword, a variable, or a cast of a constant or variable. |
The parameter in position n in the function name is not one of the expected elements; the parameter must be one of the following elements:
|
Ensure that each argument of the function conforms to the definition of the corresponding parameter. sqlcode: -123 sqlstate: 428I9, 42601 |
SQL0125N |
The column number in the ORDER BY or GROUP BY clause is either less than one or greater than the number of columns in the result table. |
The ORDER BY or GROUP BY clause in the statement contains a column number that is either less than 1 or greater than the number of columns in the result table (the number of items in the SELECT clause). The statement cannot be processed. |
Correct the syntax of the ORDER BY or GROUP BY clause so each column identifier properly identifies a column of the result table. sqlcode: -125 sqlstate: 42805 |
SQL0127N |
DISTINCT is specified more than once. |
The DISTINCT qualifier cannot be used:
The statement cannot be processed. |
This error is only applicable to releases of DB2 prior to DB2 Version 2 and hosts accessed through DB2 Connect. sqlcode: -127 sqlstate: 42905 |
SQL0129N |
The statement contains too many table names. |
The SQL statement contains too many table names. A single SQL statement can reference up to 255 tables. Each table in any view referenced is included in this limit. The statement cannot be processed. |
Break the SQL statement into two or more simple statements with 255 or fewer table references. This message is applicable to hosts accessed through DB2 Connect. sqlcode: -129 sqlstate: 54004 |
SQL0130N |
The ESCAPE clause is not a single character, or the pattern string contains an invalid occurrence of the escape character. |
The escape character must be a single character no more than two bytes in length. It can only appear in the pattern string if it is followed by itself, a percent sign, or an underscore. For more information about the ESCAPE clause on the LIKE predicate, refer to the SQL Reference. |
Correct the pattern string or the escape character accordingly. sqlcode: -130 sqlstate: 22019, 22025 |
SQL0131N |
The operands of a LIKE predicate have incompatible data types. |
If the expression to the left of a LIKE or NOT LIKE is of type character, the expression to the right must be of type character. If the expression to the left is of type graphic, the expression to the right must be of type graphic. If the expression to the left is of type binary string, the expression to the right must be of type binary string. The statement cannot be processed. |
Correct the expressions of the LIKE predicate to be the same data type. sqlcode: -131 sqlstate: 42818 |
SQL0132N |
The statement was not processed because a value was specified for a LIKE predicate or a scalar function where a string expression was expected. |
This message can be returned when an invalid string expression is specified for a function such as one of the following functions:
|
Issue the statement again, specifying valid operands for each function. sqlcode: -132 sqlstate: 42824 |
SQL0134N |
Improper use of a string column, host variable, constant, or function name. |
The use of the string name is not permitted. An expression resulting in a CLOB, DBCLOB, BLOB, LONG VARCHAR, or LONG VARGRAPHIC data type is not permitted in:
Federated system users: in a pass-through session, a data source-specific restriction can cause this error. See the SQL Reference documentation for the failing data sources. The statement cannot be processed. |
The requested operation on the string is not supported. sqlcode: -134 sqlstate: 42907 |
SQL0135N |
The input for a long string column in an INSERT statement or UPDATE statement must be from a host variable or be the keyword NULL. |
The UPDATE or INSERT is using constants, column names, or subqueries where it should be using NULL or a host variable. A long string column is either a LONG VARCHAR, LONG VARGRAPHIC, VARCHAR(n) where n is greater than 254 but less than or equal to 32767, or VARGRAPHIC(n) where n is greater than 127 but less than or equal to 16383. |
Refer to the DB2 for VM Application Programming manual for information on the use of long strings. Correct the statement. Try again. sqlcode: -135 sqlstate: 56033 |
SQL0137N |
The length resulting from operation is greater than maximum-value. |
The operation has produced a result string with an actual length that exceeds the maximum allowed for the operation. If the operation is CONCAT, the result of concatenating the given operands was longer than what is supported by the result type. Character string results are limited to 32,700 bytes unless one of the operands is a CLOB and then the limit is 2 gigabytes. Graphic string results are limited to 16,350 characters unless one of the operands is a DBCLOB and then the limit is 1,073,741,823 (1 less than 1 gigabyte) double byte characters. Binary string results (operands are BLOB) are limited to 2 gigabytes. |
Refer to the documentation for the operation to determine how the result string is produced and the maximum length for the operation is determined. Consider whether changing the arguments of the operation will change the length of the result or the maximum length. If the operation is CONCAT, ensure that the sum of the lengths of the operands does not exceed the supported maximum and try the operation again. sqlcode: -137 sqlstate: 22001, 54006 |
SQL0138N |
The statement was not executed because a numeric argument of a scalar function is out of range. |
This message is returned when an out-of-range numeric argument is specified for a scalar function that manipulates one or more strings. Examples of such functions are:
For example, the second argument to the SUBSTR function specifies a position in a string. This message is returned if the value specified for that argument is less than 1 or greater than the length of the string. For information about the valid ranges for the arguments of a particular function, refer to the description of that function. |
Review the numeric arguments of each scalar function in the statement. Correct any values that are out of range and reissue the statement. sqlcode: -138 sqlstate: 22011 |
SQL0139W |
A redundant clause appears in the specification for column column. |
The clause in the column specification is redundant. The statement was processed successfully, but the redundant clause was ignored. |
Correct the column specification. sqlcode: +139 sqlstate: 01589 |
SQL0142N |
The SQL statement is not supported. |
A procedural SQL statement that is valid in other SQL dialects is not supported by this data server or an SQL statement that is valid for other IBM relational databases is not supported by this data server. Federated system users: Check to see if an SQL statement was directed at a data source that does not support the SQL statement. The statement cannot be processed. |
Change the syntax of the SQL statement or remove the statement from the program. Federated system users: If the reason is unknown, isolate the problem to the data source failing the request and examine the SQL dialect for that data source. |
SQL0143W |
The SQL statement is not supported; invalid syntax is ignored. |
An embedded SQL statement that may be valid for other IBM relational database products is understood but is not supported by the database manager. The statement may produce inconsistent or unwanted results. |
Change the syntax of the SQL statement or remove the statement from the program. |
SQL0150N |
The target fullselect, view, typed table, materialized query table, range-clustered table, or staging table in the INSERT, DELETE, UPDATE, MERGE, or TRUNCATE statement is a target for which the requested operation is not permitted. |
The fullselect, view, typed table, materialized query table, range-clustered table, or staging table named in the INSERT, UPDATE, DELETE, MERGE, or TRUNCATE statement is defined so that the requested insert, update, delete, or truncate operation cannot be performed. A view or a fullselect is read only if the SELECT statement of the view or the fullselect contains any of the following:
Note that these conditions do not apply to subqueries of the SELECT statement or of the fullselect. A view that directly or indirectly contains a WHERE clause that references a subquery or a routine defined with NOT DETERMISTIC or EXTERNAL ACTION cannot be used as the target of a MERGE statement. A view defined with the WITH ROW MOVEMENT clause cannot be used as the target of a MERGE statement that includes an update operation. A view defined with a fullselect that uses UNION ALL cannot be used as the target of a MERGE statement that specifies a period-clause in a modification operation. Rows cannot be inserted directly into a typed table defined on a structured type that is not instantiable. Subtables of this table may allow inserts. In general, system maintained materialized query tables and staging tables do not allow the insert, update, delete, or truncate operations. A range-clustered table cannot be used in a truncate operation. The statement cannot be processed. |
The requested function cannot be performed on the fullselect, view, system maintained materialized query table, range clustered table, or staging table. Federated system users: if the reason is unknown, isolate the problem to the data source failing the request and examine the object definition and the update restrictions for that data source. sqlcode: -150 sqlstate: 42807 |
SQL0151N |
The column name cannot be updated. |
The specified column cannot be updated because one of the following was attempted.
Federated system users should check to see if some other data source specific limitation prevents the column from being updated. The statement cannot be processed. |
If the specified column is derived from a scalar function, expression, keyword, or non updatable column, omit the column from the set clause of the update or the column of the insert. For a list of updatable catalogs (and the updatable columns) see the SQL Reference. Federated system users: if the reason is unknown, isolate the problem to the data source failing the request and examine the object definition and the update restrictions for that data source. sqlcode: -151 sqlstate: 42808 |
SQL0152N |
Constraint constraint-name is a actual-constraint-type constraint instead of a expected-constraint-type constraint. |
An attempt was made to alter or drop constraint constraint-name, but it is defined as a expected-constraint-type constraint, not as the specified actual-constraint-type constraint. |
Verify the name and type of constraint to be altered or dropped. sqlcode: -152 sqlstate: 42809 |
SQL0153N |
The statement does not include a required column list. |
A column list must be specified in a CREATE VIEW statement, a common table expression or in a CREATE TABLE statement containing an as-subquery-clause when:
The statement cannot be processed. |
Provide a column name list in the CREATE VIEW statement, common table expression, CREATE TABLE statement, or name the columns in the SELECT list of the fullselect using the AS clause. sqlcode: -153 sqlstate: 42908 |
SQL0155N |
A trigger transition table cannot be modified. |
The trigger includes a REFERENCING clause with an OLD_TABLE or NEW_TABLE identified. A DELETE, INSERT or UPDATE triggered SQL statement has used the name specified as the OLD_TABLE or NEW_TABLE as the table to modify. |
Remove the DELETE, INSERT or UPDATE triggered SQL statement from the triggered action or change the name of the transition table so that it does not conflict with the table you are attempting to modify. sqlcode: -155 sqlstate: 42807 |
SQL0156N |
The name used for this operation is not a table. |
The SQL statements ALTER TABLE, DROP TABLE, SET INTEGRITY, CREATE TRIGGER, CREATE INDEX, LOCK TABLE, and RENAME TABLE are applicable only to tables, not to views. The RUNSTATS, LOAD, and REDISTRIBUTE DATABASE PARTITION GROUP utilities are also applicable only to tables, not to views. Federated system users: Some utilities and statements are not supported in a federated environment. See the Administration Guide for more information. The statement or utility cannot be processed. |
Verify that the correct table name is specified in the statement. If an alias name was supplied, ensure that the alias resolves to a table. Federated system users: Verify that the object is not a nickname. sqlcode: -156 sqlstate: 42809 |
SQL0157N |
name is not allowed in a FOREIGN KEY clause because it does not identify a base table. |
The object name was identified in a FOREIGN KEY clause of a CREATE or ALTER TABLE statement. A FOREIGN KEY clause must identify a base table. The statement cannot be processed. The specified table is not created or altered. |
Correct the statement to specify a base table name in the FOREIGN KEY clause. If an alias name was supplied, ensure that the alias resolves to a base table. sqlcode: -157 sqlstate: 42810 |
SQL0158N |
The number of columns specified for name is not the same as the number of columns in the result table. |
The identifier name could identify:
The number of column names specified must be equal to the number of columns in the result table of the associated fullselect. If name is a staging table and the associated materialized query table has group by clause, the number of column names specified must be 2 more than the number of columns in the materialized query table for which the staging table is being defined. If the associated materialized query table has no group by clause, the number of column names specified must be 3 more than the number of columns in the materialized query table. The statement cannot be processed. |
Correct the syntax so that the list of column names defined for name specify a name for each column of the result table. sqlcode: -158 sqlstate: 42811 |
SQL0159N |
The statement references an object that identifies an unexpected object type. Object: object. Object type: object-type. Expected object type: expected-object-type. |
The object object specified as part of the statement or command refers to an object of type object-type instead of the expected type expected-object-type. The type of the object that is specified in the statement or command must match the type that is identified by expected-object-type. For example:
|
Change the statement or command to specify an object of the expected object type. sqlcode: -159 sqlstate: 42809 |
SQL0160N |
The WITH CHECK OPTION clause is not valid for the specified view. |
The WITH CHECK OPTION clause cannot be used in a view definition if:
Federated system users: the WITH CHECK option is not supported on views that reference updatable nicknames. The statement cannot be processed. The specified view was not created. |
Remove the WITH CHECK OPTION clause or change the view definition so it conforms to the rules listed in this message. sqlcode: -160 sqlstate: 42813 |
SQL0161N |
The resulting row of the insert or update operation does not conform to the view definition. |
The WITH CHECK OPTION clause was specified in the view definition that is the object of the insert or update operation or a FROM clause specified an insert or update operation with a view as the target. Consequently, all attempts to insert or update rows in that view are checked to ensure that the results conform to the view definition. If the insert or update operation that target a view is in a FROM clause, the insert or update operation is always processed as if the view had been defined WITH CHECK OPTION. The statement cannot be processed. No inserts or updates are performed, and the contents of the view and underlying base table remain unchanged. |
Examine the view definition to determine why the requested insert or update operation was rejected. Note that this may be a data-dependent condition. Requested insert or update operation may be trying to put out of range values in the target columns. Federated system users, if the reason is unknown, isolate the problem to the data source failing the request and examine the object definition and the view definition for that data source. sqlcode: -161 sqlstate: 44000 |
SQL0170N |
The number of arguments for function name is incorrect. |
The specified scalar function name has either too few or too many arguments. The statement cannot be processed. |
Ensure that the correct number of arguments is specified for the scalar function. sqlcode: -170 sqlstate: 42605 |
SQL0171N |
The statement was not processed because the data type, length or value of the argument for the parameter in position n of routine routine-name is incorrect. Parameter name: parameter-name. |
This message can be returned in two scenarios:
If the position is not applicable or unknown, a value of 0 is returned for n. If the parameter name is not applicable or unknown, the empty string is returned for parameter-name. |
Determine what is incorrect about the parameter given in the token parameter-name by reviewing the rules for the parameters of the routine:
Invoke the routine again, specifying valid parameters. sqlcode: -171 sqlstate: 5UA0J, 5UA05, 5UA06, 5UA07, 5UA08, 5UA09, 2201G, 2201T, 2201V, 10608, 22003, 22014, 22016, 22546, 42815 |
SQL0172N |
name is not a valid function name. |
The SQL statement includes an unknown scalar function. The statement cannot be processed. |
Ensure that you correctly spell the function name. sqlcode: -172 sqlstate: 42601 |
SQL0176N |
The second, third or fourth argument of the TRANSLATE scalar function is incorrect. |
The statement is not correct for one or more of the following reasons:
The statement cannot be processed. |
Ensure that the second, third, and fourth arguments of the translate scalar function have correct values. sqlcode: -176 sqlstate: 42815 |
SQL0180N |
The syntax of the string representation of a datetime value is incorrect. |
The string representation of a date, time, or timestamp value does not conform to the syntax for the specified or implied data type. The statement cannot be processed. |
Ensure that the syntax of the date, time, or timestamp value conforms to the syntax for its data type. If the string is not intended to be a date, time, or timestamp value, ensure that when used, it does not imply that data type. Federated system users: the problem might be due to a date/time representation problem at the data source. If the reason is unknown, isolate the problem to the data source failing the request and examine the date/time representation restrictions for that data source. sqlcode: -180 sqlstate: 22007 |
SQL0181N |
The string representation of a datetime value is out of range. |
The string representation of a date, time or timestamp value contains a value that is out of range. This error could be caused by accessing a datetime value from an application using a territory code whose datetime format is different than the one used by the application that created it. For example, a string datetime value stored in the format dd/mm/yyyy will not be valid when read by an application expecting its format to be mm/dd/yyyy. The correct ranges for date, time, or timestamp values are as follows:
Federated system users: the problem might be due to a date/time representation problem at the data source. Refer to the data source's documentation for the ranges for date and time values at the data source. If the reason is unknown, isolate the problem to the data source failing the request and examine the date/time representation restrictions for that data source. The statement cannot be processed. |
Ensure that the value is within the valid range, and the application's datetime format is the same as the string value. sqlcode: -181 sqlstate: 22007 |
SQL0182N |
An expression with a datetime value or a labeled duration is not valid. |
The specified expression contains an improperly used date, time, or timestamp value or labeled duration. The statement cannot be processed. |
Examine the SQL statement to determine the cause of the problem and correct the statement. sqlcode: -182 sqlstate: 42816 |
SQL0183N |
A datetime arithmetic operation or a datetime scalar function has a result that is not within the valid range of dates. |
The result of an arithmetic operation is a date or timestamp duration which is outside the range 0001-01-01 through 9999-12-31. The statement cannot be executed. |
Examine the SQL statement to determine the cause of the problem. If the problem is data-dependent, examine the data processed when the error occurred. sqlcode: -183 sqlstate: 22008 |
SQL0187N |
A reference to a current date/time special register is invalid. |
An error indication from the operating system was detected while retrieving date/time information. |
Ensure that the system TOD clock and timezone settings are correct. sqlcode: -187 sqlstate: 22506 |
SQL0190N |
ALTER TABLE table-name specified attributes for column column-name that are not compatible with the existing column. |
The attributes specified in the ALTER COLUMN clause for the column column-name of the table table-name in an ALTER TABLE statement are not compatible with the attributes of the existing column. The error was returned for one of the following reasons.
The statement cannot be processed. |
Make the attributes specified compatible with the existing column, remove the attribute specification, or specify a different column name. If a SET DATA TYPE clause was specified, check the notification log for possible entries listing conflicting rows that may have disallowed the ALTER COLUMN. If an ALTER COLUMN was specified for a column that already has a user specified default value, an ALTER TABLE statement must be issued to drop the default before the column definition can be changed. sqlcode: -190 sqlstate: 42837 |
SQL0191N |
Error occurred because of a fragmented MBCS character. |
Possible causes:
Federated system users: this situation can also be detected by the data source. |
Federated system users: if the data is correct, isolate the problem to the data source failing the request and examine the DBCS restrictions of that data source. If the data appears to be correct, contact IBM service for assistance. sqlcode: -191 sqlstate: 22504 |
SQL0193N |
In an ALTER TABLE statement, the column column-name has been specified as NOT NULL and either the DEFAULT clause was not specified or was specified as DEFAULT NULL. |
When new columns are added to a table that already exists, a value must be assigned to that new column for all existing rows. By default, the null value is assigned. However, since the column has been defined as NOT NULL, a default value other than null must be defined. |
Either remove the NOT NULL restriction on the column or provide a default value other than null for the column. sqlcode: -193 sqlstate: 42601 |
SQL0195N |
Last column of table-name cannot be dropped. |
An attempt was made to drop one or more columns using an ALTER TABLE statement. The columns cannot be dropped from table table-name because at least one of the existing columns must be preserved when altering a table. |
Ensure table table-name will have at least one column once the ALTER statement is complete. Either remove the DROP of one of the columns and try the request again, or, if all of the columns should be removed, drop the table and create it again. sqlcode: -195 sqlstate: 42814 |
SQL0196N |
Column column-name in table-name cannot be dropped. Reason code = reason-code. |
An attempt was made to drop column column-name. See the reason code for an explanation of why the column cannot be dropped.
|
sqlcode: -196 sqlstate: 42817 |
SQL0197N |
A qualified column name is not allowed in the ORDER BY clause. |
The ORDER BY clause of a fullselect that includes a set operator (UNION, EXCEPT, INTERSECT) cannot have qualified column names. |
Ensure that all column names in the ORDER BY clause are unqualified. sqlcode: -197 sqlstate: 42877 |
SQL0198N |
The statement string of the PREPARE or EXECUTE IMMEDIATE statement is blank or empty. |
The host variable that was the object of the PREPARE or EXECUTE IMMEDIATE statement either contained all blanks or was an empty string. The PREPARE or EXECUTE IMMEDIATE could not be completed. |
Correct the logic of the program to ensure that a valid SQL statement is provided in the operand of the PREPARE or EXECUTE IMMEDIATE statement before it is executed. sqlcode: -198 sqlstate: 42617 |
SQL0199N |
The use of the reserved word keyword following text is not valid. Expected tokens may include: token-list. |
A syntax error in the SQL statement was detected at the point in the statement when the reserved word keyword appears following text. The text field indicates the 20 characters of the SQL statement that preceded the reserved word. Clauses in the statement may be in the wrong order. As an aid to the programmer, a partial list of valid tokens is provided in the SQLERRM field of the SQLCA as token-list. This list assumes the statement is correct to that point. The statement cannot be processed. |
Examine the statement in the keyword area. Add a colon or SQL delimiter, if missing. Verify that the clauses are in the correct order. If the reserved word identified in the messages is listed as a reserved word, make the word a delimited identifier. NOTE: This error is only applicable to releases of DB2 prior toVersion 2 . sqlcode: -199 sqlstate: 42601 |
SQL0203N |
A reference to column name is ambiguous. |
The column name is used in the statement and there is more than one possible column to which it could refer. This could be the result of:
The column name needs further information to establish which of the possible table columns it is. The statement cannot be processed. |
Add a qualifier to the column name. The qualifier is the table name or correlation name. A column may need to be renamed in the select list. sqlcode: -203 sqlstate: 42702 |
SQL0204N |
name is an undefined name. |
This error is caused by one of the following:
This return code can be generated for any type of database object. Federated system users: the object identified by name is not defined in the database or name is not a nickname in a DROP NICKNAME statement. Some data sources do not provide the appropriate values for name. In these cases, the message token will have the following format: "OBJECT:<data source> TABLE/VIEW", indicating that the actual value for the specified data source is unknown. The statement cannot be processed. |
Ensure that the object name (including any required qualifiers) is correctly specified in the SQL statement and it exists. If the name refers to a data partition, query the catalog table SYSCAT.DATAPARTITIONS to find the names of all the data partitions for a table. For missing data type or function in SOURCE clause, it may be that the object does not exist, OR it may be that the object does exist in some schema, but the schema is not present in your path. For the CREATE or ALTER SECURITY LABEL COMPONENT statement, make sure that each element specified as a reference element value for positioning the location of a new element value already exists in the security label component. For the CREATE SECURITY LABEL COMPONENT statement, make sure that each element is specified as either ROOT or as the child in an UNDER clause before specifying it as the parent in an UNDER clause. For the scalar functions SECLABEL, SECLABEL_TO_CHAR or SECLABEL_BY_NAME, ensure that a valid security policy was specified for the argument security-policy-name. Federated system users: if the statement is DROP NICKNAME, make sure the object is actually a nickname. The object might not exist in the federated database or at the data source. Verify the existence of the federated database objects (if any) and the data source objects (if any). sqlcode: -204 sqlstate: 42704 |
SQL0205N |
Column, attribute, or period name is not defined in object-name. |
If object-name is a table or view, then name is a column or period that is not defined in object-name. If object-name is a structured type, then name is an attribute that is not defined in object-name. Federated system users: object-name could refer to a nickname. The statement cannot be processed. |
If object-name is a table or view, verify that the column or period and table or view names (including any required qualifiers) are specified correctly in the SQL statement. If object-name is a structured type, verify that the attribute and type names (including any required qualifiers) are specified correctly in the SQL statement. Also, if you receive this error during a REORG or an IMPORT, the column names in the index may violate the database manager naming rules as defined in the SQL Reference. sqlcode: -205 sqlstate: 42703 |
SQL0206N |
name is not valid in the context where it is used. |
This error can occur in the following cases:
The statement cannot be processed. |
Verify that the names are specified correctly in the SQL statement. For a SELECT statement, ensure that all the required tables are named in the FROM clause. For a subselect in an ORDER BY clause, ensure that there are no correlated column references. If a correlation name is used for a table, verify that subsequent references use the correlation name and not the table name. For a CREATE TRIGGER statement, ensure that only new transition variables are specified on the left hand side of assignments in the SET transition-variable statement and that any reference to columns of the subject table have a correlation name specified. For a standalone compound SQL statement, CREATE FUNCTION, CREATE PROCEDURE, or CREATE TRIGGER statement, verify that the columns or variables are available in the scope of the current compound SQL statement. For a fullselect embedded in XQuery using the db2-fn:sqlquery function, a reference within the fullselect must be one of the following: a column in the context of the fullselect, a global variable, or a parameter passed to the new SQL context using an additional argument of the db2-fn:sqlquery function. sqlcode: -206 sqlstate: 42703 |
SQL0207N |
A column name is not allowed in the ORDER BY clause of a SELECT statement used with a set operator. |
A SELECT statement with a set operator contains an ORDER BY clause, which specifies column names. In this case, the list of columns in the ORDER BY clause must contain only integers. The statement cannot be processed. |
Specify only integers in the list of columns in the ORDER BY clause. NOTE: This error is only applicable to releases of DB2 prior toVersion 2 and hosts accessed through DB2 Connect. sqlcode: -207 sqlstate: 42706 |
SQL0208N |
The ORDER BY clause is not valid because column name is not part of the result table. |
The statement is not valid because a column name specified in the ORDER BY list is not specified in the SELECT list and is not in the result table. Only columns in the result table can be used to order that result when the fullselect of the select-statement is not a subselect. The statement cannot be processed. |
To correct the syntax of the statement, either add the specified column to the result table or delete it from the ORDER BY clause. sqlcode: -208 sqlstate: 42707 |
SQL0212N |
name is a duplicate table designator or is specified more than once in the REFERENCING clause of a trigger definition. |
The exposed table, view, alias, or correlation name specified by name is identical to another exposed table, view, alias, or correlation name in the same FROM clause. If the statement is a CREATE TRIGGER, the REFERENCING clause may have specified the same name as the subject table or may have the same name for more than one of the OLD or NEW correlation names or the NEW_TABLE or OLD_TABLE identifiers. The statement cannot be processed. |
Rewrite the FROM clause of the SELECT statement. Associate correlation names with table, view, or alias names so no exposed table, view, alias, or correlation name is identical to any other exposed table, view, alias, or correlation name in the FROM clause. For a CREATE TRIGGER statement, change the names in the REFERENCING clause so that there are no duplicates. sqlcode: -212 sqlstate: 42712 |
SQL0213N |
Parameter parameter-name not in routine routine-name. |
A parameter with name parameter-name does not exist in routine routine-name. |
Specify an existing parameter name for the routine and resubmit the statement. sqlcode: -213 sqlstate: 42703 |
SQL0214N |
An expression in the ORDER BY clause in the following position, or starting with expression-start-or-order-by-position in the clause-type clause is not valid. Reason code = reason-code. |
The expression identified by the first part of the expression expression-start-or-order-by-position in the clause-type clause is not valid for the reason specified by the reason-code as follows:
The statement cannot be processed. |
Modify the select-statement based on the reason specified by the reason-code as follows:
sqlcode: -214 sqlstate: 42822 |
SQL0216N |
The number of elements on each side of a predicate operator does not match. Predicate operator is predicate-operator. |
A predicate includes a list of elements on the right or left side (or both sides) of the predicate operator. The number of elements must be the same on both sides. These elements may appear in a list of expressions enclosed in parentheses or as elements of a select list in a fullselect. The statement cannot be processed. |
Correct the predicate with mismatched number of elements on each side of the predicate operator. sqlcode: -216 sqlstate: 428C4 |
SQL0217W |
The statement was not executed as only Explain information requests are being processed. |
The current value of one of the Explain special registers has been set to EXPLAIN. This value allows dynamic SQL statements to be prepared and explained but prevents any dynamic statement from being executed. |
Change the value of the appropriate Explain special register to a setting other than EXPLAIN by issuing the appropriate SET statement from the interface or application that is encountering this condition. sqlcode: +217 sqlstate: 01604 |
SQL0219N |
The required Explain table name does not exist. |
The Explain facility has been invoked but was unable to find the required Explain table name. The Explain tables must be created prior to invoking Explain. |
Create the required Explain tables. The SQL Data Definition Language statements needed to create the Explain tables are available in the file called EXPLAIN.DDL in the misc directory under sqllib. sqlcode: -219 sqlstate: 42704 |
SQL0220N |
The Explain table name, column name2 does not have the proper definition or is missing. |
The Explain facility has been invoked but the Explain table name did not have the expected definition. The definition could be incorrect due to:
|
Correct the definitions of the specified Explain table. The SQL Data Definition Language statements needed to create the Explain tables are available in the file called EXPLAIN.DDL in the misc directory under sqllib. If this error begins to occur after applying an update, it is possible that the required format of the Explain tables may have changed. In this case, adjust the definitions to the current format manually or by using the db2exmig tool. After adjusting your Explain table definitions, re-issue the command. sqlcode: -220 sqlstate: 55002 |
SQL0222N |
Operation was attempted against a hole using cursor cursor-name. |
If the SQLSTATE is 24510, then an error occurred. A positioned update or delete was attempted with cursor cursor-name, which is defined as SENSITIVE STATIC, and the current row has been identified as either a delete hole or update hole. A hole occurred when DB2 tried to update or delete a row in the database corresponding to the current row of the result table for cursor cursor-name and the corresponding row of the underlying table no longer exists. If the SQLSTATE is 02502, then this is a warning. A delete hole or update hole has been detected while processing a fetch for cursor cursor-name. A hole occurred when DB2 tried to refetch a row from the database corresponding to the current row of the result table for cursor cursor-name and the corresponding row of the underlying table no longer exists. No data is returned. A delete hole occurs when the corresponding row of the underlying table has been deleted. An update hole occurs when the corresponding row of the underlying table has been updated in the underlying table such that the updated row no longer satisfies the search condition specified in the SELECT statement of the cursor. The statement cannot be processed. The cursor remains positioned on the hole. |
Issue a FETCH statement to position the cursor on a row that is not a hole. sqlcode: -222 sqlstate: 02502, 24510 |
SQL0224N |
The result table does not agree with the base table using cursor cursor-name. |
A positioned UPDATE or DELETE was attempted using cursor cursor-name, defined as SENSITIVE STATIC, on a row where the column values in the result table do not match the current values in the base table row. The rows do not match because the row of the base table was updated between the time it was fetched into the result table and the time the positioned UPDATE or DELETE was processed. The statement cannot be processed. The cursor position is unchanged. |
Change isolation levels so that the base table row cannot be updated again during the cursor operation, or change the application to do a FETCH INSENSITIVE and try the positioned UPDATE or DELETE again. sqlcode: -224 sqlstate: 24512 |
SQL0225N |
FETCH statement for cursor cursor-name is not valid because the cursor is not defined as SCROLL. |
A FETCH statement for non-scrollable cursor cursor-name been specified with one of the following scrollable cursor keywords: PRIOR, FIRST, LAST, BEFORE, AFTER, CURRENT, ABSOLUTE or RELATIVE. Only NEXT can be specified for non-scrollable cursors. No data is fetched. The statement cannot be processed. The cursor position is unchanged. |
Change the FETCH statement to remove the current fetch orientation keyword, such as PRIOR or FIRST, and replace it with NEXT. Alternatively, change the definition of the cursor to be scrollable. sqlcode: -225 sqlstate: 42872 |
SQL0227N |
FETCH NEXT, PRIOR, CURRENT or RELATIVE is not allowed because cursor cursor-name has an unknown position (sqlcode, sqlstate). |
The cursor position for cursor-name is unknown. A previous multiple row FETCH for cursor cursor-name resulted in an error (SQLCODE sqlcode, SQLSTATE sqlstate) in the middle of processing multiple retrieved rows. One or more of the requested rows could not be returned to the program following the error, leaving the position of the cursor unknown. If an indicator structure had been provided on the previous multiple row FETCH, a positive SQLCODE would have been returned and all of the retrieved rows could have been returned to the application program. The statement cannot be processed. The cursor position is unchanged. |
Close and reopen the cursor to reset the position. For scrollable cursors, you can change the FETCH statement to specify one of the other fetch orientations, such as FIRST, LAST, BEFORE, AFTER or ABSOLUTE, to establish a valid cursor position and fetch a row of data. sqlcode: -227 sqlstate: 24513 |
SQL0228N |
FOR UPDATE clause specified for read-only cursor cursor-name. |
Cursor cursor-name is defined as INSENSITIVE SCROLL, but the corresponding SELECT statement contains a FOR UPDATE clause. The statement cannot be processed. |
To define a read-only cursor, specify INSENSITIVE on DECLARE CURSOR, but do not specify the FOR UPDATE clause as part of the SELECT statement of the cursor. sqlcode: -228 sqlstate: 42620 |
SQL0231W |
Current position of cursor cursor-name is not valid for FETCH of the current row. |
A FETCH CURRENT or FETCH RELATIVE 0 statement was issued for scrollable cursor cursor-name. The operation is not valid, because the cursor is not positioned on a row of the result table. A FETCH of the current row is not allowed following a FETCH BEFORE or FETCH AFTER statement, or following a FETCH statement that resulted in SQLCODE +100. The statement cannot be processed. The cursor position is unchanged. |
Ensure that the cursor is positioned on a row of the result table before attempting to fetch the current row. sqlcode: +231 sqlstate: 02000 |
SQL0236W |
SQLDA has only provided integer1 SQLVAR entries. integer2 SQLVAR entries are required for integer3 columns. No SQLVAR entries have been set. |
The value of the SQLN field of the SQLDA should be at least as large as the number of columns in the result set. The database manager has not set any SQLVAR entries (and the SQLDOUBLED flag has been set to "off" (i.e. to the space character)). |
Increase the value of the SQLN field in the SQLDA to the value indicated in the message (making sure the SQLDA is large enough to support that amount) and resubmit the statement. sqlcode: +236 sqlstate: 01005 |
SQL0237W |
SQLDA has only provided integer1 SQLVAR entries. Since at least one of the columns being described is a distinct type, integer2 SQLVAR entries should have been specified. None of the Secondary SQLVAR entries have been set. |
Since at least one of the columns in the result set is a distinct type, space should be provided for twice as many SQLVAR entries as the number of columns in the result set. The database manager has only set the Base SQLVAR entries (and the SQLDOUBLED flag has been set off (i.e. to the space character). |
If there is no need for the additional information about the distinct type(s) in the result set, then no action is required. If the distinct type information is needed, the value of the SQLN field in the SQLDA should be increased to the value indicated in the message (after making sure that the SQLDA is large enough to support that amount) and the statement should be resubmitted. sqlcode: +237 sqlstate: 01594 |
SQL0238W |
SQLDA has only provided integer1 SQLVAR entries. Since at least one of the columns being described is a LOB or structured type, integer2 SQLVAR entries are required for integer3 columns. No SQLVAR entries have been set. |
Since at least one of the columns in the result set is a LOB or structured type, space must be provided for twice as many SQLVAR entries as the number of columns in the result set. Note also that one or more of the columns in the result set may be a distinct type. The database manager has not set any SQLVAR entries (and the SQLDOUBLED flag has been set off (i.e. to the space character). |
Increase the value of the SQLN field in the SQLDA to the value indicated in the message (after making sure that the SQLDA is large enough to support that amount) and resubmit the statement. sqlcode: +238 sqlstate: 01005 |
SQL0239W |
SQLDA has only provided integer1 SQLVAR entries. Since at least one of the columns being described is a distinct type or reference type, integer2 SQLVAR entries are required for integer3 columns. No SQLVAR entries have been set. |
If any of the columns in the result set is a distinct type or reference type, then space should be provided for twice as many SQLVAR entries as the number of columns in the result set. The database manager has not set any SQLVAR entries (and the SQLDOUBLED flag has been set off (i.e. to the space character). |
If the distinct type or reference type information is needed, the value of the SQLN field in the SQLDA should be increased to the value indicated in the message (after making sure the SQLDA is large enough to support that amount) and the statement should be resubmitted. If there is no need for the additional information about the distinct type(s) or reference type(s) in the result set, then it is possible to resubmit the statement only providing enough SQLVAR entries to accommodate the number of columns in the result set. sqlcode: +239 sqlstate: 01005 |
SQL0242N |
The object named object-name of type object-type was specified more than once in the list of objects. |
In a list of object names of type object-type, the object named object-name was specified more than once. The operation of the statement cannot be performed on the object more than once. |
Correct the duplicated object in the list removing duplicate occurrences. sqlcode: -242 sqlstate: 42713 |
SQL0243N |
SENSITIVE cursor cursor-name cannot be defined for the specified SELECT statement. |
Cursor cursor-name is defined as SENSITIVE, but the content of the SELECT statement requires the database manager to build a temporary result table of the cursor, and the database manager cannot guarantee that changes made outside this cursor will be visible. This situation occurs when the content of the query makes the result table read-only. For example, if the query includes a join, the result table is read-only. In these cases, the cursor must be defined as INSENSITIVE or ASENSITIVE. The statement cannot be processed. |
Either change the content of the query to yield a result table that is not read-only, or change the type of the cursor to INSENSITIVE or ASENSITIVE. sqlcode: -243 sqlstate: 36001 |
SQL0244N |
SENSITIVITY sensitivity specified on FETCH is not valid for cursor cursor-name. |
The sensitivity option sensitivity specified on FETCH conflicts
with the sensitivity option in effect for cursor cursor-name.
The following list shows what can be specified on FETCH:
In the case of a non-scrollable cursor, a sensitivity option cannot be specified. The statement cannot be processed. |
Change or remove the sensitivity option specified on FETCH. sqlcode: -244 sqlstate: 428F4 |
SQL0245N |
The invocation of routine routine-name is ambiguous. The argument in position position does not have a best fit. |
When a routine is referenced in an SQL statement, the database manager must determine exactly which routine to invoke. For functions, this process is called function resolution, and it applies to both built-in and user-defined functions. This error is returned when an invocation of a function is ambiguous. This occurs when there are two or more possible candidate functions that satisfy the criteria for function resolution. In this case, two candidate functions have a parameter in position position, but the data types of the parameters for the two candidate functions are not in the same data type precedence list. A best fit for the argument cannot be determined. |
Change the SQL statement to explicitly cast the argument to the desired data type, the definition of a function, or the SQL path to remove the ambiguity from the set of candidate functions and try again. sqlcode: -245 sqlstate: 428F5 |
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, structured type column, or a system hidden column implicitly added to a table enabled for row modification tracking. |
Neither the distribution key nor the table partitioning key can have a LONG column, DATALINK column, XML column, structured type column, or a system hidden column implicitly added to a table enabled for row modification tracking. The statement cannot be processed. |
Do not use LONG columns, DATALINK columns, XML columns, structured type columns, or implicitly added system hidden 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, structured type columns, or implicitly added system hidden 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 returned if cost category value was "B", and the default action specified in the RLF_CATEGORY_B column in the RLST is to return 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 RUNSTATS command (for Db2 tables), the NNSTAT procedure (for nicknames), or ANALYZE command (for Hadoop and HBase tables) 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 |
SQL0501N |
The cursor specified in a FETCH statement or CLOSE statement is not open or a cursor variable in a cursor scalar function reference is not open. |
The program attempted to do one of:
The statement cannot be processed. |
Check for a previous message (SQLCODE) that may have closed the cursor. Note that after the cursor is closed, any fetches or close cursor statements receive SQLCODE -501. If no previous SQLCODEs have been issued, correct the application program to ensure that the cursor is open when the FETCH or CLOSE statement is executed. If a cursor variable is referenced in a cursor scalar function, verify that that the cursor is not null, is defined, and is open, else replace the cursor variable with one that is in that state. sqlcode: -501 sqlstate: 24501 |
SQL0502N |
The cursor specified in an OPEN statement is already open. |
The program attempted to execute an OPEN statement for an open cursor. The statement cannot be processed. The cursor was unchanged. |
Correct the application program to ensure it does not attempt to execute an OPEN statement for a cursor already open. sqlcode: -502 sqlstate: 24502 |
SQL0503N |
A column cannot be updated because it is not identified in the FOR UPDATE clause of the SELECT statement of the cursor. |
Using a cursor, the program attempted to update a value in a table column that was not identified in the FOR UPDATE clause in the cursor declaration or the prepared SELECT statement. Any column to be updated must be identified in the FOR UPDATE clause of the cursor declaration. The statement cannot be processed. |
Correct the application program. If the column requires updating, add its name to the FOR UPDATE clause of the cursor declaration. sqlcode: -503 sqlstate: 42912 |
SQL0504N |
The cursor name is not defined. |
An UPDATE or DELETE WHERE CURRENT OF name was specified, but the cursor name was not declared in the application program. The statement cannot be processed. |
Ensure the completeness of the application program and correct spelling errors in the cursor names. sqlcode: -504 sqlstate: 34000 |
SQL0505N |
The cursor name is already defined. |
The cursor name specified in the DECLARE statement has already been declared. The statement cannot be processed. |
Ensure the name is spelled correctly. |
SQL0507N |
The cursor specified in the UPDATE or DELETE statement is not open. |
The program attempted to execute an UPDATE or DELETE WHERE CURRENT OF cursor statement when the specified cursor was not open. The statement cannot be processed. No update or delete was performed. |
Check for a previous message (SQLCODE) that may have closed the cursor. Note that after the cursor is closed, any fetches or close cursor statements receive SQLCODE -501 and any updates or deletes receive SQLCODE -507. Correct the logic of the application program to ensure that the specified cursor is open at the time the UPDATE or DELETE statement is executed. sqlcode: -507 sqlstate: 24501 |
SQL0508N |
The cursor specified in the UPDATE or DELETE statement is not positioned on a row. |
The program attempted to execute an UPDATE or DELETE WHERE CURRENT OF cursor statement when the specified cursor was not positioned on an object table row. The cursor must be positioned on the row to be updated or deleted. The cursor is no longer positioned on a row if the row is deleted. This includes any use of cursors within a savepoint when a ROLLBACK TO SAVEPOINT is performed. Federated system users: the record in a remote data source has been updated and/or deleted by another application (or a different cursor within this application) and the record no longer exists. The statement cannot be processed. No data is updated or deleted. |
Correct the logic of the application program to ensure that the cursor is correctly positioned on the intended row of the object table before the UPDATE or DELETE statement is executed. Note that the cursor is not positioned on a row if FETCH returned message SQL0100W (SQLCODE = 100). sqlcode: -508 sqlstate: 24504 |
SQL0509N |
The table specified in the UPDATE or DELETE statement is not the same table specified in the SELECT for the cursor. |
The program attempted to execute an UPDATE or DELETE WHERE CURRENT OF cursor statement where the table named did not match the name of the table specified in the SELECT statement that declared the cursor. The statement cannot be processed. |
Correct the application program to ensure that the table identified in the UPDATE or DELETE statement is the same table identified in the cursor declaration. sqlcode: -509 sqlstate: 42827 |
SQL0510N |
UPDATE or DELETE is not allowed against the specified cursor. |
The program attempted to execute an UPDATE or DELETE WHERE CURRENT OF cursor statement against a table or view definition that does not permit the requested update or delete operation. For example, this error can occur in a delete from a read-only view or in an update where the cursor was not defined with the FOR UPDATE clause. On the database manager the view is read-only if the SELECT statement includes :
Note that these conditions do not apply to subqueries of the SELECT statement. The cursor is declared with a FOR FETCH ONLY clause. The cursor is ambiguous and the BLOCKING ALL bind option was specified. The cursor references a view that has an INSTEAD OF UPDATE (or DELETE) trigger. The cursor directly or indirectly references a view that is defined with the WITH ROW MOVEMENT clause and an UPDATE WHERE CURRENT OF CURSOR was attempted. The statement cannot be processed. |
If the database manager is failing the statement and the cursor is based on a read-only SELECT or VALUES statement, do not issue any update or delete statements against it. If the database manager is failing the statement and the cursor is not based on a read-only SELECT or VALUES statement and is defined with a FOR FETCH ONLY clause, either remove this clause from the cursor definition or do not issue any update or delete statements. If the database manager is failing the statement and the cursor cannot be determined to be either fetch only or updatable from its definition or context, rebind the program with either the BLOCKING NO or BLOCKING UNAMBIG bind option. If the database manager is failing the statement and the cursor is based on a view with an INSTEAD OF UPDATE (or DELETE) trigger, use a searched UPDATE (or DELETE) statement. If the database manager is failing the statement and the cursor directly or indirectly references a view that is defined with the WITH ROW MOVEMENT clause, do not issue any update statements against it. Federated system users: isolate the problem to the data source failing the request. If a data source is failing the request, examine the restrictions for that data source to determine the cause of the problem and its solution. If the restriction exists on a data source, see the SQL reference manual for that data source to determine why the object is not updatable. sqlcode: -510 sqlstate: 42828 |
SQL0511N |
The FOR UPDATE clause is not allowed because the table specified by the cursor cannot be modified. |
The result table of the SELECT or VALUES statement cannot be updated. On the database manager, the result table is read-only if the cursor is based on a VALUES statement or the SELECT statement contains any of the following:
Note that these conditions do not apply to subqueries of the SELECT statement. The statement cannot be processed. |
Do not perform updates on the result table as specified. Federated system users: isolate the problem to the data source failing the request. If a data source is failing the request, examine the restrictions for that data source to determine the cause of the problem and its solution. If the restriction exists on a data source, see the SQL reference manual for that data source to determine why the object is not updatable. sqlcode: -511 sqlstate: 42829 |
SQL0512N |
The statement or command failed because a federated three-part name is being used in a way that is not supported. Three-part name: name. Reason code: reason-code. |
You can reference remote objects without having to use nicknames by referencing the remote objects directly with federated three-part names. This message is returned when a statement uses a three-part name in a way that is not supported. The reason code indicates the restriction that was encountered:
|
Review federated three-part name restrictions, and then modify the statement or command to use three-part name only in ways that are supported. sqlcode: -512 sqlstate: 56023 |
SQL0513W |
The SQL statement will modify an entire table or view. |
The UPDATE or DELETE statement does not contain a WHERE clause so all rows of the table or view are modified if this statement is executed. The statement is accepted. Federated system users: not all data sources report this warning condition. The federated server attempts to issue this warning whenever the condition exists, but there is no guarantee that the federated server can always detect this condition. Do not rely on this warning to preclude UPDATE/DELETE operations from affecting an entire table or view. |
Ensure that you intend to modify the entire table or view. sqlcode: +513 sqlstate: 01504 |
SQL0514N |
The cursor name is not in a prepared state. |
The application program tried to use a cursor that is not in a prepared state. The cursor is associated with a statement that meets the following conditions:
The statement cannot be processed. |
sqlcode: -514 sqlstate: 26501 |
SQL0516N |
The DESCRIBE statement does not specify a prepared statement. |
The statement name in the DESCRIBE statement must specify a statement that was prepared in the same database transaction. The statement cannot be processed. |
Verify that the statement name specifies a statement that has been prepared. sqlcode: -516 sqlstate: 26501 |
SQL0517N |
The cursor name identifies a prepared statement that is not a SELECT or VALUES statement. |
The cursor name could not be used as specified because the prepared statement named in the cursor declaration was not a SELECT or VALUES statement. The statement cannot be processed. |
Verify that the statement name is specified correctly in the PREPARE and the DECLARE CURSOR for cursor name statements. Or correct the program to ensure that only prepared SELECT or VALUES statements are used in association with cursor declarations. sqlcode: -517 sqlstate: 07005 |
SQL0518N |
The statement named in the EXECUTE statement is not in a prepared state or is a SELECT or VALUES statement. |
The application program tried to EXECUTE a statement that
The statement cannot be processed. |
sqlcode: -518 sqlstate: 07003 |
SQL0519N |
The PREPARE statement identifies the SELECT or VALUES statement of the open cursor name. |
The application program attempted to prepare the SELECT or VALUES statement for the specified cursor when that cursor is already open. The statement cannot be prepared. The cursor was not affected. |
Correct the application program so it does not attempt to prepare the SELECT or VALUES statement for a cursor that is open. sqlcode: -519 sqlstate: 24506 |
SQL0525N |
The SQL statement cannot be executed because it was in error at bind time for section = section-number package = pkgschema.pkgname consistency token = Xcontoken. |
One of the following:
Note that contoken is given in hexadecimal. The statement cannot be executed. |
If the SQL statement is not supposed to execute at the indicated location, then correct the program so that the statement in error does not execute at that location. Precompile, compile, and bind replace the package. If the SQL statement is supposed to execute at the indicated location, correct the problem found and reissue PREP or BIND using ACTION(REPLACE). If multiple versions of the package have been bound, issue the following SELECT statement to determine which version has the error: SELECT PKGVERSION FROM SYSCAT.PACKAGES where PKGSCHEMA='pkgschema' AND PKGNAME = 'pkgname' and HEX(UNIQUE_ID) = 'contoken' sqlcode: -525 sqlstate: 51015 |
SQL0526N |
The statement was not processed because the statement refers to a created temporary table or a declared temporary table and includes functionality that cannot be used with temporary tables. |
You can temporarily store the results from the manipulation of data in temporary tables. There are some restrictions on how temporary tables can be used. For example, temporary tables do not support user-defined type columns, and index compression cannot be enabled for temporary tables. This message is returned when an attempt is made to execute an SQL statement that uses temporary tables in way that is not supported. |
Respond to this message in one of the following ways:
sqlcode: -526 sqlstate: 42995 |
SQL0528N |
The table or nickname tablename-or-nickname already has a unique constraint that is a duplicate of constraint name. |
A UNIQUE clause uses the same column list as the PRIMARY KEY clause, another UNIQUE clause or the PRIMARY KEY or a UNIQUE constraint that already exists for the table tablename. Duplicate unique constraints are not allowed. name is the constraint name, if one was specified or exists. If a constraint name is not specified, name is the first column name specified in the column list of the UNIQUE clause followed by three periods. The statement cannot be processed. |
Remove the duplicate UNIQUE clause or change the column list to a set of columns that is not already part of a unique constraint. sqlcode: -528 sqlstate: 42891 |
SQL0530N |
The insert or update value of the FOREIGN KEY constraint-name is not equal to any value of the parent key of the parent table. |
A value in a foreign key of the object table is being set, but this value is not equal to any value of the parent key of the parent table. When a row is inserted into a dependent table, the insert value of a foreign key must be equal to some value of the parent key of any row of the parent table of the associated relationship. Similarly, when the value of a foreign key is updated, the update value of a foreign key must be equal to the value of the parent key of any row of the parent table of the associated relationship at the completion of the statement. Federated system users: the constraint can exist on the data source (if the child and parent tables exist on the data source). Some data sources do not provide the appropriate values for constraint 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. The statement could not be executed. The contents of the object table are unchanged. |
Examine the insert or update value of the foreign key first, and then compare it with each of the parent key values of the parent table to determine and correct the problem. sqlcode: -530 sqlstate: 23503 |
SQL0531N |
The parent key in a parent row of relationship constraint-name cannot be updated. |
An operation attempted to update a parent key in the row of the parent table but the parent key in the specified row has dependent rows in the dependent table associated with it in the constraint-name constraint. When the update rule of constraint constraint-name is NO ACTION, the value of a parent key in a parent row cannot be updated if the parent row has any dependent rows at the completion of the statement. When the update rule of constraint constraint-name is RESTRICT, the value of a parent key in a parent row cannot be updated if the parent row has any dependent rows at the time the update of the parent key is attempted. Federated system users: the constraint can exist on the data source (if the child and parent tables exist on the data source). Some data sources do not provide the appropriate values for constraint 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. The statement could not be executed. The contents of the parent table are unchanged. |
Examine the parent key of the object table and the foreign key of the dependent table to determine if the value of the specified row of the parent key should be changed. If this does not show the problem, examine the contents of the object table and the dependent table to determine and correct the problem. sqlcode: -531 sqlstate: 23001, 23504 |
SQL0532N |
A parent row cannot be deleted because the relationship constraint-name restricts the deletion. |
An operation attempted to delete a specified row of the parent table but the parent key in the specified row has dependent rows in the referential constraint constraint-name and the delete rule of NO ACTION or RESTRICT is specified for the relationship. When the delete rule of constraint constraint-name is NO ACTION, a row of the parent table cannot be deleted if the dependent rows are still dependent on the parent key at the completion of the statement. When the delete rule of constraint constraint-name is RESTRICT, a row of the parent table cannot be deleted if the parent row has any dependent rows at the time of the delete. Note that a delete can cascade to delete other rows in dependent tables that have a delete rule of NO ACTION or RESTRICT. Thus the constraint constraint-name may be on a different table than the original delete operation. Federated system users: the constraint can exist on the data source (if the child and parent tables exist on the data source). Some data sources do not provide the appropriate values for constraint name. In these cases the appropriate fields contain values (such as “unknown”) that indicate that the actual value is unknown. The statement could not be executed. The contents of the table are unchanged. |
Examine the delete rule for all descendent tables to determine and correct the problem. The specific tables involved can be determined from the relationship constraint-name. sqlcode: -532 sqlstate: 23001, 23504 |
SQL0533N |
The INSERT statement is not valid because a relationship restricts the result of the fullselect to one row. |
An INSERT operation with a fullselect attempted to insert multiple rows into a table that is a parent and a dependent in the same relationship of a referential constraint. The fullselect of the INSERT operation should return no more than one row of data. The INSERT statement could not be executed. The contents of the object table are unchanged. Federated system users: the constraint can exist on the data source (if the child and parent tables exist on the data source). |
Examine the search condition of the fullselect to ensure selection of no more than one row of data. sqlcode: -533 sqlstate: 21501 |
SQL0534N |
Invalid multiple-row update. |
An UPDATE operation attempted to perform a multiple-row update of a column included in a primary key or unique index. Multiple-row updates of columns of a primary key or unique index are not supported. The UPDATE statement could not be executed. The contents of the table are unchanged. Federated system users: the constraint can exist on federated server (if the child and parent tables exist as tables on federated server), or it can exist on the data source (if the child and parent tables exist on the data source). |
Ensure the search condition of the UPDATE statement selects only one object table row to update. sqlcode: -534 sqlstate: 21502 |
SQL0535N |
The DELETE statement is not valid because a self-referencing relationship restricts the deletion to one row. |
A DELETE operation with a WHERE clause attempted to delete multiple rows from a table which is a parent and a dependent in the same relationship of a referential constraint with a RESTRICT or SET NULL delete rule. The WHERE clause of the DELETE operation should select no more than one row of data. The DELETE statement could not be executed. The contents of the object table are unchanged. Federated system users: the constraint can exist on the data source (if the child and parent tables exist on the data source). |
Examine the WHERE clause search condition to ensure no more than one row of data is selected. NOTE: This is only a restriction in releases of DB2 prior to Version 2. sqlcode: -535 sqlstate: 21504 |
SQL0536N |
The DELETE statement is not valid because table name can be affected by the operation. |
A DELETE operation was attempted with the indicated table referenced in a subquery. The indicated table referenced in a subquery of the DELETE statement can be affected because it is either:
Federated system users: the constraint can exist on the data source (if the child and parent tables exist on the data source). Some data sources do not provide the appropriate values for name. In these cases the appropriate fields contain values (such as “unknown”) that indicate that the actual value is unknown. The statement could not be processed. |
Do not reference a table in a DELETE statement subquery when the table can be affected by the DELETE statement. NOTE: This error is only applicable to releases of DB2 prior toVersion 2 and hosts accessed through DB2 Connect. sqlcode: -536 sqlstate: 42914 |
SQL0537N |
A key column list identifies column column-name more than once. |
The column column-name appears more than once in a key column list. A key column list could occur in a PRIMARY KEY clause, FOREIGN KEY clause, UNIQUE clause, DISTRIBUTE BY clause, ORGANIZE BY clause, PARTITION BY clause or as a functional dependency of a CREATE or ALTER statement. Federated system users: the constraint can exist on the data source (if the child and parent tables exist on the data source). Some data sources do not provide the appropriate values for column-name. In these cases the appropriate fields contain values (such as “unknown”) that indicate that the actual value is unknown. The statement cannot be processed. |
Remove the duplicate column names. sqlcode: -537 sqlstate: 42709 |
SQL0538N |
FOREIGN KEY name does not conform to the description of the parent key of table or nickname table-name-or-nickname. |
The definition of the indicated foreign key does not conform to the parent key description of the table or nickname table-name-or-nickname. Possible reasons are:
name is the constraint name if specified in the FOREIGN KEY clause. If a constraint name was not specified, name is the first column name specified in the clause followed by three periods. Federated system users should note that some data sources do not provide the appropriate values for name and table-name-or-nickname. In these cases the appropriate fields contain values (such as "unknown") that indicate that the actual value is unknown. The constraint can exist the data source (if the child and parent tables exist on the data source). The statement cannot be processed. |
Correct the statement so the foreign key description conforms to the parent key description. sqlcode: -538 sqlstate: 42830 |
SQL0539N |
Table or nickname name does not have a key-type key. |
One of the following occurred:
Federated system users: the constraint can exist on the data source (if the child and parent tables exist on the data source). Some data sources do not provide the appropriate values for name and key-type. In these cases the appropriate fields contain values (such as “unknown”) that indicate that the actual value is unknown. The statement cannot be processed. A system catalog cannot be defined as a parent in a referential constraint. |
When creating a referential constraint, specify the primary key before specifying any foreign keys (constraints). sqlcode: -539 sqlstate: 42888 |
SQL0540N |
The definition of table table-name is incomplete because it lacks a primary index or a required unique index. |
The table named was defined with a PRIMARY KEY clause or a UNIQUE clause. Its definition is incomplete, and it cannot be used until a unique index is defined for the primary key (the primary index) and for each set of columns in any UNIQUE clause (the required unique indexes). An attempt was made to use the table in a FOREIGN KEY clause or in an SQL manipulative statement. The statement cannot be executed. |
Define a primary index or a required unique index on the table before referencing it. sqlcode: -540 sqlstate: 57001 |
SQL0541W |
The referential, primary key, or unique constraint name is ignored because it is a duplicate constraint. |
If name refers to a referential constraint, then a FOREIGN KEY clause uses the same foreign key and parent table or the same foreign key and parent nickname as another FOREIGN KEY clause. If name refers to a primary key or unique constraint, then one of the following situations exists.
name is the constraint name, if specified. If a constraint name was not specified, name is the first column name specified in the column list of the FOREIGN KEY or UNIQUE clause followed by three periods. Federated system users: the constraint can exist on the data source (if the child and parent tables exist on the data source). Some data sources do not provide the appropriate values for name. In these cases the appropriate fields contain values (such as "unknown") that indicate that the actual value is unknown. The indicated referential constraint or unique constraint was not created. The statement was processed successfully. |
No action is required. Processing can continue. sqlcode: +541 sqlstate: 01543 |
SQL0542N |
The column named column-name cannot be a column of a primary key or unique key constraint because it can contain null values. |
The column named column-name identified in a PRIMARY KEY clause or UNIQUE clause is defined to allow null values, or an attempt was made to alter a column that is part of a PRIMARY KEY or UNIQUE constraint to allow null values. Federated system users: some data sources do not provide the appropriate values for column-name. In these cases the appropriate fields contain values (such as "unknown") that indicate that the actual value is unknown. The statement cannot be processed. |
Correct the column, primary key or unique key definition. If this error was returned as part of an alter table statement, the PRIMARY KEY or UNIQUE constraint must be removed before the column can be altered to allow null values. sqlcode: -542 sqlstate: 42831 |
SQL0543N |
A row in a parent table cannot be deleted because the check constraint constraint-name restricts the deletion. |
The delete operation cannot be executed because the target table is a parent table and is connected with a referential constraint to a dependent table with a delete rule of SET NULL. However, a check constraint defined on the dependent table restricts the column from containing a null value. The statement cannot be processed. |
Examine the foreign key and its delete rule in the dependent table and the conflicting check constraint. Change either the delete rule or the check constraint so that they do not conflict with each other. sqlcode: -543 sqlstate: 23511 |
SQL0544N |
The check constraint constraint-name cannot be added because the table contains a row that violates the constraint. |
At least one existing row in the table violates the check constraint that is be added in the ALTER TABLE statement. The statement cannot be processed. |
Examine the check constraint definition that was specified in the ALTER TABLE statement and the data in the table to determine why there is a violation of the constraint. Change either the check constraint or the data so that the constraint is not violated. sqlcode: -544 sqlstate: 23512 |
SQL0545N |
The requested operation is not allowed because a row does not satisfy the check constraint constraint-name. |
Check constraint violations can occur on either INSERT or UPDATE operations. The resulting row violated the check constraint definition on that table. The statement cannot be processed. |
Examine the data and the check constraint definition in the catalog view SYSCAT.CHECKS to determine why the INSERT or UPDATE statement failed. Change the data so that the constraint is not violated. sqlcode: -545 sqlstate: 23513 |
SQL0546N |
The check constraint constraint-name is invalid. |
A check constraint in the CREATE TABLE or CREATE NICKNAME, ALTER TABLE, or ALTER NICKNAME statement is invalid for one or more of the following reasons:
The statement cannot be processed. |
The user response is one of the following, depending on the cause of the error:
sqlcode: -546 sqlstate: 42621 |
SQL0548N |
A check constraint or generated column that is defined with check-condition-element is invalid. |
A check constraint in the CREATE TABLE or CREATE NICKNAME, ALTER TABLE or ALTER NICKNAME statement is invalid for one or more of the following reasons:
The token within the text of the error message lists the invalid item. The statement cannot be processed. |
The user response is one of the following, depending on the cause of the error:
sqlcode: -548 sqlstate: 42621 |
SQL0549N |
The statement statement is not allowed for object-type1 object-name1 because the bind option DYNAMICRULES RUN is not in effect for the object-type2. |
A program attempted to issue the indicated SQL statement that is one of several SQL statements that can be dynamically prepared only in a package exhibiting run behavior. Those SQL statements are:
The SQL statement cannot be executed. |
Do one of the following to correct the error:
sqlcode: -549 sqlstate: 42509 |
SQL0551N |
The statement failed because the authorization ID does not have the required authorization or privilege to perform the operation. Authorization ID: authorization-ID. Operation: operation. Object: object-name. |
The operation could not be performed on the specified object. In general, this message is returned because the authorization ID does not have the required authority or privilege to perform the operation. In some cases, it is returned for an object that does not allow the operation even when the authorization ID has an administrative authority. This message can be returned for different reasons. Here are some examples of scenarios in which this message could be returned:
The required authorization can be at the federated server, at the data source, or at both the federated server and the data source. Some data sources do not provide appropriate values for the runtime tokens authorization-ID, operation, and object-name. In these cases, the message tokens might be in one of the following formats:
|
If the authorization ID authorization-ID does not have the required authority or privilege, grant the necessary privilege or authority, if appropriate. Here are responses for the scenarios described in the explanation section of this message:
sqlcode: -551 sqlstate: 5UA0K, 42501 |
SQL0552N |
authorization-ID does not have the privilege to perform operation operation. |
Authorization ID authorization-ID attempted to perform the specified operation without the proper authorization. Federated system users: some data sources do not provide the appropriate values for authorization-ID and <operation>. In these cases the message tokens will have the following format: "<data source> AUTHID:UNKNOWN", and "UNKNOWN" indicating that the actual values for authid and operation at the specified data source are not known. The statement cannot be processed. |
Ensure that authorization-ID has the authorization to perform the operation. Federated system users: this authorization can be at the federated server, the data source, or both. sqlcode: -552 sqlstate: 42502 |
SQL0553N |
An object cannot be created with the schema name schema-name. |
The reason the schema name schema-name is invalid depends on the type of object that is being created.
The statement cannot be processed. |
Use a valid schema name or remove the explicit schema name and rerun the statement. sqlcode: -553 sqlstate: 42939 |
SQL0554N |
An authorization ID cannot grant a privilege or authority to itself. |
An authorization ID attempted to execute a statement that would grant a privilege or authority to the authorization ID itself. If this is a GRANT statement, the authorization ID itself appears as one of the entries in the authorization ID list to which privileges, authorities, security labels, or exemptions are to be granted. If this is a CREATE TRUSTED CONTEXT or an ALTER TRUSTED CONTEXT, the authorization ID itself appears as either the value for the SYSTEM AUTHID attribute or one of the authorization names specified in the WITH USE FOR clause. The statement cannot be processed. |
Remove or replace the authorization ID in the statement. sqlcode: -554 sqlstate: 42502 |
SQL0555N |
An authorization ID cannot revoke a privilege from itself. |
An authorization ID attempted to execute a REVOKE statement where the authorization ID itself appears as one of the entries in the authorization ID list from which privileges are to be revoked. The statement cannot be processed. |
Remove the authorization ID from the list. sqlcode: -555 sqlstate: 42502 |
SQL0556N |
An attempt to revoke a privilege, security label, exemption, or role from authorization-ID was denied because authorization-ID does not hold this privilege, security label, exemption, or role. |
The privilege, security label, exemption, or role cannot be revoked because authorization-ID does not hold the privilege, security label, exemption, or role. The statement cannot be processed. |
Change the REVOKE statement to conform to the REVOKE rules and resubmit the statement. Ensure that when a REVOKE statement lists several privileges, security labels, exemptions, or roles to be revoked and a list of authorization IDs that each authorization ID possesses at least one of the specified privileges, security labels, exemptions, or roles. sqlcode: -556 sqlstate: 42504 |
SQL0557N |
The specified combination of privileges cannot be granted or revoked. |
One of the following occurred:
The statement cannot be processed. |
Correct and resubmit the statement. sqlcode: -557 sqlstate: 42852 |
SQL0558N |
An attempt to revoke a privilege from authorization-ID was denied because authorization-ID holds control privilege. |
authorization-ID holds the control privilege. The privilege to be revoked is implicitly provided by the control privilege, so it cannot be revoked unless the control privilege is also revoked. The valid values for control are as follows:
The statement cannot be executed. No privileges are revoked. |
Revoke the control privilege, if desired. sqlcode: -558 sqlstate: 42504 |
SQL0562N |
The statement was not executed because the specified database or schema privileges cannot be granted to group PUBLIC, directly or indirectly through a role. |
You can grant privileges to user or groups by issuing the GRANT statement. This message is returned when an attempt is made to grant unsupported privileges to the group PUBLIC, directly or indirectly by using a role. |
No response is required. It is not supported to grant administrative authorities, such as DBADM or SCHEMAADM, to PUBLIC. sqlcode: -562 sqlstate: 42508 |
SQL0567N |
The operation failed because the specified authorization name does not meet the identifier naming rules. Authorization name: authorization-name. |
Rules exist for the naming of all database objects, user names or authorization names, passwords, groups, files, and paths. Some of these rules are specific to the platform you are working on. This message is returned when a specified authorization name does not satisfy the identifier naming rules. For example this message can be returned when an authorization name contains characters other than a through z, A through Z, 0 through 9, and the supported special characters. The statement cannot be processed. |
Perform the operation again, specifying an authorization name that satisfies the identifier naming rules. sqlcode: -567 sqlstate: 42602 |
SQL0569N |
Authorization ID authorization-name does not uniquely identify a user, a group or a role in the system. |
The authorization ID specified by the GRANT or REVOKE statement does not uniquely identify a user, a role, or a group in the security namespace. The reference to authorization-name is ambiguous. Note that when using DCE security, the USER, GROUP or ROLE keyword is always required. |
Change the statement to explicitly specify the USER, GROUP or ROLE keyword to uniquely identify the specified authorization id. sqlcode: -569 sqlstate: 56092 |
SQL0570W |
Not all requested privileges on object object-name of type object-type were granted. |
A GRANT operation was attempted on object object-name of type object-type, but some or all of the privileges were not granted. The authorization ID that issued the statement does not have all of the privileges to be granted with the GRANT option or does not have ACCESSCTRL or SECADM authority. All valid requested privileges were granted. |
Obtain the required authority and try the operation again. sqlcode: +570 sqlstate: 01007 |
SQL0572N |
Package pkgname is inoperative. |
The package pkgname is marked as inoperative and must be explicitly rebound (without specifying RESOLVE CONSERVATIVE) before it can be used. This package cannot be used because one or more user-defined functions that it depends upon have been dropped. |
Explicitly rebind the named package using either the REBIND (without specifying RESOLVE CONSERVATIVE) or the BIND command. sqlcode: -572 sqlstate: 51028 |
SQL0573N |
A column list specified in the references clause of constraint name does not identify a unique constraint of the parent table or nickname table-name. |
A list of column names was specified in the references clause for the constraint identified by name that does not match the column names of the primary key or any unique key of the referenced table table-name. name is the constraint name, if specified. If a constraint name was not specified, name is the first column name specified in the column list of the FOREIGN KEY clause followed by three periods. The statement cannot be processed. |
Correct the column list in the references clause or add the unique constraint to the referenced table or nickname. sqlcode: -573 sqlstate: 42890 |
SQL0574N |
DEFAULT value or IDENTITY attribute value is not valid for column column-name in table table-name. Reason code: reason-code. |
The DEFAULT value or IDENTITY attribute value for column column-name in table table-name is not valid. The possible reason codes are as follows:
The statement cannot be processed. |
Correct the DEFAULT value or IDENTITY attribute value based on the reason code that was returned. sqlcode: -574 sqlstate: 42894 |
SQL0575N |
View or materialized query table name cannot be used because it has been marked inoperative. |
The view or materialized query table name has been marked inoperative because a table, view, alias, or privilege upon which it is dependent has been removed. The view cannot be used by any SQL statement other than one of the following:
The statement cannot be processed. |
If name is a view, recreate the view by issuing a CREATE VIEW statement using the same view definition as the inoperative view. If name is a materialized query table, recreate the materialized query table by issuing the CREATE TABLE statement using the same materialized query table definition as in the inoperative materialized query table. sqlcode: -575 sqlstate: 51024 |
SQL0576N |
Alias name cannot be created for name2 as it would result in a repetitive alias chain. |
The alias definition of name on name2 would have resulted in a repetitive alias chain which could never be resolved. For example, "alias A refers to alias B which refers to alias A" is a repetitive alias chain which could never be resolved. The statement cannot be processed. |
Change the alias definition for name or revise the definition of one of the other alias definitions in the alias chain to avoid a repetitive chain. sqlcode: -576 sqlstate: 42916 |
SQL0577N |
User defined routine routine-name (specific name specific-name) attempted to modify data but was not defined as MODIFIES SQL DATA. |
The program used to implement the body of a routine is not allowed to modify SQL data. |
Remove any SQL statements that modify data then recompile the program. Investigate the level of SQL allowed as specified when defining the routine. sqlcode: -577 sqlstate: 38002 sqlstate: 42985 |
SQL0579N |
Routine routine-name (specific name specific-name) attempted to read data but was not defined as READS SQL DATA or MODIFIES SQL DATA. |
The program used to implement the body of a routine is not allowed to read SQL data. |
Remove any SQL statements that read data then recompile the program. Investigate the level of SQL allowed as specified when defining the routine. sqlcode: -579 sqlstate: 38004 sqlstate: 42985 |
SQL0580N |
The result-expressions of a CASE expression cannot all be NULL. |
There is a CASE expression in the statement that has all the result-expressions (expressions following THEN and ELSE keywords) coded with the keyword NULL. The statement cannot be processed. |
Change the CASE expression to include at least one result-expression that is other than the keyword NULL. sqlcode: -580 sqlstate: 42625 |
SQL0581N |
The data types of the result-expressions of a CASE expression or DECODE function are not compatible. |
There is a CASE expression or a DECODE function in the statement that has result-expressions (expressions following THEN and ELSE keywords for CASE expressions) that are not compatible. The data type of a CASE expression or the result of a DECODE function is determined using the "Rules for Result Data Types" on the result-expressions. The statement cannot be processed. |
Correct the result-expressions so that they are compatible. sqlcode: -581 sqlstate: 42804 |
SQL0582N |
A CASE expression in a VALUES clause, IN predicate, GROUP BY clause, or ORDER BY clause cannot include a quantified predicate, an IN predicate using a fullselect, or an EXISTS predicate. |
A search condition of a CASE expression is:
and the CASE expression is part of:
Such CASE expressions are not supported. The CASE expression may be part of a function written in SQL. The statement cannot be processed. |
Remove the use of the quantified predicate, IN predicate, or EXISTS predicate from the CASE expression. If the CASE expression is part of a function, the query may need to be written without the function that causes the error. sqlcode: -582 sqlstate: 42625 |
SQL0583N |
The use of routine or expression name is invalid because it is not deterministic or has an external action. |
The routine (function or method) or expression is defined as non-deterministic or as having external action. This is not supported in the context in which it is used. The contexts in which these are not valid are:
The statement cannot be processed. |
If the use of a non-deterministic or external action routine or expression was not intended, substitute a routine without these characteristics. If the behavior associated with the non-deterministic or external action routine or expression is intentional, use the alternate form of the statements that make that intent explicit.
sqlcode: -583 sqlstate: 42845 |
SQL0584N |
The statement failed because of an invalid use of the NULL keyword or the DEFAULT keyword. |
When creating a table, you can define default values for one or more columns. When you insert or merge data into a table with this default behaviour defined for some columns, specifying "DEFAULT" in a VALUES clause will cause default values to be inserted or merged into those columns. You can indicate an absence of data for a particular column in a statement by using NULL keyword, There are requirements and restrictions for how the DEFAULT keyword and the NULL keyword can be used. Here are just a few examples:
|
Modify the statement so that the NULL keyword or the DEFAULT keyword is not being used in an unsupported way, and then resubmit the statement. sqlcode: -584 sqlstate: 42608 |
SQL0585N |
The schema name schema-name appears more than once in the set special-register statement. |
The SET statement for special register special-register includes the schema schema-name more than once. The statement cannot be processed. |
Verify the list in the SET statement that contains the duplicate. If the error is only in entering a schema-name incorrectly, which happens to duplicate another entry, enter the schema name correctly and reissue the statement. If the entry is really a duplicate no action is required. sqlcode: -585 sqlstate: 42732 |
SQL0586N |
The total length of special-register special register cannot exceed length. |
The special-register is defined as a length smaller than the value specified on the SET statement. The content of the string includes each schema name delimited with double quotes and separated from the next schema name by a comma. The total length of the string of all schema names in the special register cannot exceed the maximum length of the special register. A SET PATH or SET CURRENT PACKAGE PATH statement could result in this message. The statement or command cannot be processed. |
Remove schema names to reduce the total length to fit the length of the special register. If the statement that failed was SET PATH and if all the schema names are required, it may be necessary to consolidate some user-defined functions, procedures, methods, or distinct types, so that fewer schema names are required on the SQL PATH. sqlcode: -586 sqlstate: 42907 |
SQL0590N |
Name name specified in context context-tag is not unique. |
Name name is specified as a parameter, SQL variable, cursor, label, or condition in a context defined by context-tag. The name is not unique. If context-tag is "BEGIN...END", then the context of the error is a dynamic SQL compound statement. Otherwise, the context of the error is a trigger or routine and context-tag is the trigger name or routine name containing the compound statement.
|
Change the name so that it is unique. sqlcode: -590 sqlstate: 42734 |
SQL0593N |
NOT NULL must be specified for a ROW CHANGE TIMESTAMP column, ROW BEGIN column, ROW END column, or column of a period. column-name. |
Row change timestamp, row-begin, and row-end columns do not support null values. When such a column is defined on a CREATE TABLE or ALTER TABLE statement, the NOT NULL clause must be specified for these columns. A column of a period must be defined as NOT NULL. The statement cannot be executed. |
Change the statement to specify NOT NULL for the column column-name. sqlcode: -593 sqlstate: 42831 |
SQL0595W |
Isolation level requested-level has been escalated to escalated-level. |
The isolation level specified is not supported by DB2. It has been escalated to the next higher level of isolation supported by DB2. |
To avoid this warning, specify an isolation level which is supported by DB2. DB2 supports isolation levels Repeatable Read (RR), Read Stability (RS), Cursor Stability (CS), and Uncommitted Read (UR). sqlcode: +595 sqlstate: 01526 |
SQL0597N |
Unable to retrieve a DATALINK value. Reason code = reason-code. |
A DATALINK value could not be retrieved. The possible reason codes are as follows:
|
The action is based on the reason code as follows.
sqlcode: -0597 sqlstate: 42511 |
SQL0598W |
Existing index name is used as the index for the primary key or a unique key. |
An index was required for an ALTER TABLE operation that defined a primary key or a unique key, and the indicated index matches the required index. If the index description of a nonpartitioned primary key or a nonpartitioned unique key index identifies the same set of columns (in any order) as the primary or unique key and if it is specified as unique, then it is considered to match, regardless of the ascending or descending specifications. However, partitioned indexes whose columns are not a superset of the partitioning key columns are not considered to match. The statement is processed successfully. |
No action is required. sqlcode: +598 sqlstate: 01550 |
SQL0599W |
Comparison functions are not created for a distinct type based on a long string data type. |
Comparison functions are not created for a distinct type based on a long string data type (BLOB, CLOB, DBCLOB, LONG VARCHAR, or LONG VARGRAPHIC) since the corresponding functions are not available for these built-in data types. This is a warning situation. The statement is processed successfully. |
No action is required. sqlcode: +599 sqlstate: 01596 |
SQL0600N |
A routine routine-name could not be generated because of a duplicate signature or because it would override an existing routine. |
During the CREATE or ALTER operation, a system-generated cast function, observer method, mutator method, or constructor function could not be created because another function or method with the same name and signature already exists in the schema, or because the method or function would override an existing method. |
Choose another name for the user-defined type, attribute, or cast function that causes the conflict, or drop the function or method with the same name as the function or method that could not be generated. sqlcode: -600 sqlstate: 42710 |
SQL0601N |
The name of the object to be created is identical to the existing name name of type type. |
The CREATE or ALTER statement tried to create or add an object name when an object of type type already exists with that name on the application server or in the same statement. If type is FOREIGN KEY, PRIMARY KEY, UNIQUE, or CHECK CONSTRAINT, the name is the constraint name specified in the ALTER NICKNAME, ALTER TABLE, CREATE NICKNAME or CREATE TABLE statement or generated by the system. If type is ROLE, the name is the role name specified in the CREATE or ALTER ROLE statement. If type is DATA PARTITION, the name is the data partition name specified in the ALTER TABLE or CREATE TABLE statement. This error can also occur when registering an XML schema repository object using a REGISTER command or the one of the procedures XSR_REGISTER, XSR_DTD, or XSR_EXTENTITY. The error occurs when the name for the XSROBJECT already exists. Federated system users: some data sources do not provide the appropriate values for the name and type message tokens. In these cases, name and type will have the following format: "OBJECT:<data source> TABLE/VIEW", and "UNKNOWN" indicating that the actual values at the specified data source are not known. If type is permission, name is the permission name specified in the CREATE PERMISSION statement. If type is mask, name is the mask name specified in the CREATE MASK statement. If type is member subset, name is the member subset name specified in the CALL SYSPROC.WLM_CREATE_MEMBER_SUBSET statement. The statement cannot be processed. No new object is created, and the existing object is not altered or modified. |
Either drop the existing object or choose another name for the new object. Federated system users: if the statement is a CREATE FUNCTION MAPPING or a CREATE TYPE MAPPING statement, the user can also consider not supplying a type mapping name and the system will automatically generate a unique name for this mapping. sqlcode: -601 sqlstate: 42710 |
SQL0602N |
The index was not created or altered because too many columns, periods, or expression-based keys were specified. |
There is an upper limit to the number of columns that can be included in an index. The number of columns that are allowed in a given index is influenced by factors such as: the type of table, and whether the columns that are being included in the index use random ordering. This message is returned when an attempt is made to create an index, alter an index, or create an index extension, and the resulting number of columns in the index would exceed the upper limit. Federated system users:
|
Review the restrictions related to the maximum number of columns in an index. Then modify the index definition to have fewer columns. Federated system users: change the index definition to conform to the column limit for the data source. sqlcode: -602 sqlstate: 54008 |
SQL0603N |
A unique index cannot be created because the table contains data that would result in duplicate index entries. |
The index defined in the CREATE INDEX statement could not be created as unique, because the specified table already contains rows that duplicate the values of the identified columns and periods. If defining an index on an XML column, there may be duplicate index values generated from a single XML document. If a partitioned table has a newly attached partition (that is, a partition with a value of 'A' in the STATUS column in the SYSDATAPARTITIONS catalog table), the duplicate index entry may exist in the newly attached partition. The CREATE INDEX statement creates an index partition on the newly attached table partition, even if you cannot yet view the data in that partition. Federated system users: this situation may also be detected by the data source. The statement cannot be processed. The specified index is not created. |
Examine the data to determine if the duplicate data is permitted. Alternatively, consider creating a non-UNIQUE index. If the index is partitioned and there are newly attached partitions on the table, run the SET INTEGRITY statement to bring the newly attached partitions online. The duplicate data might be removed by the SET INTEGRITY statement for violating other constraints, so you should issue the CREATE INDEX statement again. If a unique index is not created again, then check for data that would result in duplicate index entries. sqlcode: -603 sqlstate: 23515 |
SQL0604N |
The length, precision, or scale attribute for column, distinct type, structured type, array type, attribute of structured type, routine, cast target type, type mapping, or global variable data-item is not valid. |
There is an error in the data type specification in a CREATE or ALTER statement, or a CAST specification. An invalid length, precision or scale attribute may have been specified, or it may be that the data type itself is incorrect or not permitted in this context. The location of the error is given by data-item as follows:
Federated system users: if the statement is a CREATE TYPE MAPPING statement, an attempt was made to create a type mapping where a type attribute for either the local data type or the remote data type is not valid. Possible reasons include:
The statement cannot be processed. |
Correct the syntax and try again. sqlcode: -604 sqlstate: 42611 |
SQL0605W |
The index was not created because an index name with a matching definition already exists. |
A CREATE INDEX statement attempted to create a new index which matches an existing index definition. Two index definitions match if they identify the same columns in the same order, with the same ascending or descending specifications, and both enforce uniqueness or only the new index does not enforce uniqueness. Two index definitions also match if they identify the same columns in the same order, with the same or reverse ascending or descending index key order, and at least one index supports both forward and reverse scans. For partitioned tables, two index definitions do not match if one is partitioned and the other is nonpartitioned, even if all other specifications match. Partitioned and nonpartitioned indexes of otherwise similar definitions can coexist on the same table. The new index was not created. |
No action is required unless the existing index name is not a suitable index. For example, the existing index name is not a suitable index if it does not allow reverse scans, and the required one does (or vice versa). In this case, the index name must be dropped before the required index can be created. sqlcode: +605 sqlstate: 01550 |
SQL0606N |
The COMMENT ON or LABEL ON statement failed because the specified table or column is not owned by owner. |
An attempt was made to comment or label on a table or column which does not exist or is not owned by the owner specified in the message text. Processing of the SQL statement has ended. |
Correct the statement. Try again. sqlcode: -606 sqlstate: 42505 |
SQL0607N |
operation is not defined for system objects. |
The operation specified in the SQL statement cannot be performed on system objects. One of the following was attempted:
An online admin move table operation cannot be performed on any tables in a reserved schema. The statement cannot be processed. |
Do not attempt to modify any system objects except for those columns of the system catalog tables which are updatable through updatable SYSSTAT views. See the SQL Reference for more information. sqlcode: -607 sqlstate: 42832 |
SQL0612N |
name is a duplicate name. |
A statement was issued with the same name appearing more than once where duplicates are not allowed. Where these names appear varies depending on the type of statement.
The statement cannot be processed. |
Specify unique names as appropriate for the type of statement. sqlcode: -612 sqlstate: 42711 |
SQL0613N |
The primary key, unique key, or table partitioning key identified by name is too long or has too many columns and periods. |
This error is caused by one of the following:
name is the constraint name, if specified, of the primary key or unique constraint. If a constraint name was not specified, name is the first column name specified in the primary key or unique constraint clause followed by three periods. The index key length limit is based on the page size of the tablespace used by the index:
For a table partitioning key, name is the column name of the column which exceeds the limit. The statement cannot be processed. |
Modify the primary key, unique key or table partitioning key definition by eliminating one or more key columns or periods to conform to the column limit of 64 and the key length limit. sqlcode: -613 sqlstate: 54008 |
SQL0614N |
The index or index extension index-name cannot be created or altered because the combined length of the specified columns is too long. |
The index could not be created or altered because the sum of the key column internal lengths would exceed the index key length limit. Also, an index cannot be created using a LONG VARCHAR, LONG VARGRAPHIC, or LOB column. If the index is defined on a typed table, there is additional index overhead that reduces the maximum length by 4 bytes. The index may be altered by an ALTER TABLE or ALTER NICKNAME statement that alters the data type of one or more columns. An index extension could not be created because the sum of the columns returned by the GENERATE KEY function would exceed the index key length limit. The index key length limit is based on the page size of the tablespace used by the index: The statement cannot be processed. The specified index or index extension was not created or the table or nickname could not be altered. |
To modify the index definition or alter column, eliminate one or more key columns and reduce the key length to the permitted maximum. For an index extension definition, specify a different GENERATE KEY function, or redefine the function to reduce the length of the returned row. sqlcode: -614 sqlstate: 54008 |
SQL0615N |
The object object-name of type object-type cannot be dropped because it is currently in use. |
A DROP statement of an object cannot be issued when it is in use. The statement cannot be processed. The object is not dropped. |
Close any cursors that depend either directly or indirectly on the object object-name and resubmit the statement. For temporary table spaces, resubmit the statement when the table space is not in use. For tenants, ensure that there are no connections using the tenant. sqlcode: -615 sqlstate: 55006 |
SQL0620N |
The CREATE TABLE statement failed because user-id has no private, recoverable dbspaces with less than 255 tables. |
The dbspace name was not specified in the CREATE TABLE statement, so the database manager tried to find a private dbspace owned by user-id. This message will appear under one of the following conditions:
Processing of the SQL statement has ended. |
Suggestions for the three possible conditions are:
Then rerun the CREATE TABLE statement. If appropriate, acquire a private dbspace for the user. sqlcode: -620 sqlstate: 57022 |
SQL0622N |
The clause clause is invalid for this database. |
The clause indicated is invalid because it is incompatible with the defined characteristics for this database. Possible reasons:
The statement cannot be processed. |
Change or remove the clause and re-issue the SQL statement. To allow Unicode objects in a non-Unicode database, update the database configuration to specify the alternate collating sequence (ALT_COLLATE). sqlcode: -622 sqlstate: 56031 |
SQL0623N |
A clustering index already exists on table name. |
The CREATE INDEX statement would create a second clustering index on the specified table. A given table can have only one clustering index. The statement cannot be executed. |
Check to determine the identity and validity of the existing clustering index on table name. Consider creating the index without the CLUSTER attribute. sqlcode: -623 sqlstate: 55012 |
SQL0624N |
Table name already has a primary key or unique constraint using the specified columns and periods. |
A primary key or unique constraint cannot be defined in an ALTER TABLE statement because the indicated table already has a key or constraint of this type. The statement cannot be executed. |
A table cannot have more than one primary key. A table cannot have a unique constraint that duplicates an existing constraint. sqlcode: -624 sqlstate: 42889 |
SQL0628N |
Multiple or conflicting keywords involving the clause-type clause are present. |
There are several possible reasons why this condition might have been diagnosed for the statement. The cause is indicated by the value of clause-type. The possible reasons include:
|
Check that the statement conforms to the syntax and rules defined for the statement. Correct any invalid occurrences of duplicate or conflicting keywords. sqlcode: -628 sqlstate: 42613 |
SQL0629N |
SET NULL cannot be specified because either the column or FOREIGN KEY name cannot contain null values. |
The SET NULL option of the ALTER TABLE statement or indicated FOREIGN KEY clause is not valid. For an ALTER TABLE statement, the column name cannot be altered to not allow NULL values because this column was the last nullable column in the foreign key constraint with action type 'on delete set NULL'. For the FOREIGN KEY clause, no column of the key allows null values. name is the constraint name, if specified. If a constraint name was not specified, name is the first column name specified in the column list of the FOREIGN KEY clause followed by three periods. The statement cannot be processed. |
For an ALTER TABLE statement, either remove the foreign constraint or change at least one other column in this constraint to be nullable. For the FOREIGN KEY clause, change either a column of the key to allow an assignment to the null value or change the delete rule. sqlcode: -629 sqlstate: 42834 |
SQL0631N |
FOREIGN KEY name is too long or has too many columns. |
The sum of the column internal lengths identified in the FOREIGN KEY clause in a CREATE TABLE statement exceeds the index key length limit, or the number of columns identified exceeds 64. Also, a foreign key cannot be defined using a LONG VARCHAR column. name is the constraint name, if specified, in the FOREIGN KEY clause. If a constraint name was not specified, name is the first column name specified in the column list of the FOREIGN KEY clause followed by three periods. The index key length limit is based on the page size of the tablespace used by the index: Max Key Length Page size -------------- --------- 1K 4K 2K 8K 4K 16K 8K 32K
The statement cannot be processed. |
To modify the foreign key definition, eliminate one or more key columns and conform to the 64 column limit and the key length limit. sqlcode: -631 sqlstate: 54008 |
SQL0632N |
FOREIGN KEY name is not valid because the table cannot be defined as a dependent of table table-name because of delete rule restrictions (reason code = reason-code). |
A referential constraint cannot be defined because the object table of the CREATE TABLE or ALTER TABLE statement cannot be defined as a dependent of table table-name for one of the following reason codes:
The delete rules of the existing relationships cause an error, not the delete rule specified in the FOREIGN KEY clause of the CREATE TABLE or ALTER TABLE statement. name is the constraint name, if specified, in the FOREIGN KEY clause. If a constraint name was not specified, name is the first column name specified in the column list of the FOREIGN KEY clause followed by three periods. The statement cannot be processed. |
If possible, eliminate the particular FOREIGN KEY clause from the CREATE TABLE or ALTER TABLE statement. sqlcode: -632 sqlstate: 42915 |
SQL0633N |
The delete rule of FOREIGN KEY name must be delete-rule (reason code = reason-code). |
The delete rule specified in a FOREIGN KEY clause of the CREATE TABLE or ALTER TABLE statement is not valid. The indicated delete rule is required for one of the following reason codes:
name is the constraint name, if specified, in the FOREIGN KEY clause. If a constraint name was not specified, name is the first column name specified in the column list of the FOREIGN KEY clause followed by three periods. The statement cannot be processed. |
If possible, change the delete rule. sqlcode: -633 sqlstate: 42915 |
SQL0634N |
The delete rule of FOREIGN KEY name must not be CASCADE (reason code = reason-code). |
The CASCADE delete rule specified in the FOREIGN KEY clause of the CREATE TABLE or ALTER TABLE statement is not valid for one of the following reason codes:
The statement cannot be processed. |
If possible, change the delete rule. sqlcode: -634 sqlstate: 42915 |
SQL0636N |
Range specified for data partition partition-name is not valid. Reason code = reason-code. |
The range specified for the partitioning key is not valid for one of the following reason codes:
If the value for partition-name is of the form "PARTITION=value", then the partition name was not available when the error occurred. The value provided identifies the starting or ending value of the offending partition in the partition list clause. The statement cannot be processed. |
Correct the invalid ranges for the data partitions. sqlcode: -636 sqlstate: 56016 |
SQL0637N |
Keyword keyword is not valid as used. |
The SQL statement contains a duplicate or conflicting specification for a clause with the indicated keyword. For example:
The statement cannot be processed. |
Correct the statement to specification of duplicate or conflicting clauses. sqlcode: -637 sqlstate: 42614 |
SQL0638N |
Table name cannot be created because no column definitions were specified. |
The CREATE TABLE statement does not contain any column definitions. The statement cannot be processed. |
Add one or more column definitions to the statement. sqlcode: -638 sqlstate: 42601 |
SQL0644N |
Invalid value specified for keyword keyword in statement statement-type. |
The keyword keyword is followed by an invalid value as allowed by the description of statement-type. For numeric values, the value may be outside a defined range. For other types, the value is not in the defined set of valid values. |
Determine from reference documentation for the statement-type what are valid values and make the appropriate change. sqlcode: -644 sqlstate: 42615 |
SQL0647N |
Bufferpool bufferpool-name is currently not active. |
The bufferpool bufferpool-name is not active in the current database environment. An attempt was made to find another bufferpool with the same page size but there are no such bufferpools active in the current database environment. The bufferpool bufferpool-name was recently defined but has not yet been activated. The statement cannot be processed. |
The database must be stopped and started again to activate the required bufferpool. sqlcode: -647 sqlstate: 57003 |
SQL0648N |
The foreign key cannot be defined because it will cause table owner1.table-name1 to be delete-connected to table owner2.table-name2 through multiple paths. Reason Code = reason-code. |
The foreign key cannot be defined because one of the following reason codes = reason-code:
Processing of the SQL statement has ended. |
Correct the statement. Try again. sqlcode: -648 sqlstate: 42915 |
SQL0650N |
The ALTER statement was not executed. Reason code: reason-code. |
The ALTER of an index or a table cannot be executed as specified. The reason code indicates more specifically the nature of the problem:
|
Correct the ALTER statement to avoid the restriction indicated by the reason code, and then issue the statement again. sqlcode: -650 sqlstate: 56090 |
SQL0658N |
The statement failed because the object named name cannot be explicitly dropped, altered, or replaced. |
This message can be returned when an attempt is made to either explicitly alter or explicitly drop an object that is not supported by the ALTER statement or the DROP statement:
This message can also be returned when an object cannot be explicitly altered, dropped, or replaced due to indirect dependencies or other errors, including the following examples:
|
Respond to this error by performing the following troubleshooting steps:
sqlcode: -658 sqlstate: 42917 |
SQL0659N |
Maximum size of a table object has been exceeded. |
One or more of the objects which make up a table has reached its maximum size. The storage objects that make up a table are:
Once a storage object has grown to its maximum size, it cannot be extended further. |
To make existing space within the object available to store new data, the following actions may be taken:
sqlcode: -659 sqlstate: 54032 |
SQL0663N |
Number of partitioning values is not correct for data partition partition-name. |
The wrong number of data partition key limit values was specified in the STARTING or ENDING clause for the data partition. If the data partition specification included an EVERY clause, there must be only one table partitioning key column with a numeric or datetime data type. If the value for partition-name is of the form "PARTITION=value", then the partition name was not available when the error occurred. The value provided identifies the starting or ending value of the offending partition in the partition list clause. |
Change the number of values specified in the STARTING or ENDING clause to match the number of columns in the table partitioning key. Alternatively, change the number of columns in the table partitioning key. sqlcode: -663 sqlstate: 53038 |
SQL0667N |
The FOREIGN KEY name cannot be created because the table contains rows with foreign key values that cannot be found in the parent key of the parent table. |
The definition of the indicated foreign key failed because the table being altered contains at least one row where the foreign key does not match the parent key value in the parent table. name is the constraint name, if specified. If a constraint name was not specified, name is the first column name specified in the column list of the FOREIGN KEY clause followed by three periods. The statement cannot be processed. The specified table is not altered. |
Remove the erroneous table rows and define the foreign key. sqlcode: -667 sqlstate: 23520 |
SQL0668N |
Operation not allowed for reason code reason-code on table table-name. |
Access to table table-name is restricted. The cause is based on the following reason codes reason-code:
|
Respond to this error according to the reason code:
sqlcode: -668 sqlstate: 57007 |
SQL0669N |
A system required index cannot be dropped explicitly. |
The DROP INDEX statement attempted to drop an index required to:
A system required index cannot be dropped using the DROP INDEX statement. The statement cannot be processed. The specified index is not dropped. |
If you do not want to keep the primary or unique constraint, use the DROP PRIMARY KEY clause or the DROP CONSTRAINT clause of the ALTER TABLE statement to remove the primary key or unique constraint. If the index was created only for enforcing the primary or unique key, then the index will be dropped. If not, the DROP INDEX statement could then be processed. The index for an OID column can only be dropped by dropping the table. The index required to maintain a replicated materialized query table can only be dropped by first dropping the replicated materialized query table. The system-required indexes associated with one or more XML columns in a table cannot be dropped explicitly. Such indexes are maintained by the database manager to support the XML column in the table. The index specified in the DROP INDEX statement cannot be dropped without dropping the table. For HBase users, the index can be implicitly dropped only when the associated HBase table is dropped. sqlcode: -669 sqlstate: 42917 |
SQL0670N |
The statement failed because the row or column size of the resulting table would have exceeded the row or column size limit: limit. Table space name: tablespace-name. Resulting row or column size: calculated-size. |
The row size of a table is the sum of the byte counts of the columns, including the inline lengths of all structured or XML type columns. Therefore, the row size is affected by the total number of columns, the total number of LOB columns, and the data type of the columns. The row size limit is the maximum number of bytes of a given table. This limit consists of a defined value in some cases or a variable value that depends on the table space page size. In a column-organized table, a column size limit consists of the maximum size of an uncompressed column data value that can fit on one page of the table. The message is returned when an attempt is made to create or modify a table by using one of the following statements:
The message can also be returned when a multidimensional clustering (MDC) table of extended row size has a VARCHAR, VARGRAPHIC, or VARBINARY dimension key that is greater than 24 bytes. This message can also be returned when a change to a column-organized base table causes the associated synopsis table to exceed the size limit. When this happens, the limit token will indicate that it is the synopsis table which has exceeded the limit. |
To resolve the issue reported by this message, perform the following steps: For row size limits:
For column size limits:
sqlcode: -670 sqlstate: 54010 |
SQL0672N |
Operation DROP not allowed on table table-name. |
The DROP operation failed for one of the following reasons:
The DROP statement cannot be executed. |
If the problem occurred during a DROP TABLE statement, issue an ALTER TABLE statement using the DROP RESTRICT ON DROP clause. Then re-issue the DROP TABLE statement. If the problem occurred during a DROP TABLESPACE or DROP DATABASE PARTITION GROUP statement, ensure that there are no other tables within the table space or database partition group with the RESTRICT ON DROP attribute. The following select statement can help identify the tables:
After identifying tables with the RESTRICT ON DROP attribute, issue an ALTER TABLE statement using the DROP RESTRICT ON DROP clause for each table with the RESTRICT ON DROP attribute. Then re-issue the DROP TABLESPACE or DROP DATABASE PARTITION GROUP statement. sqlcode: -672 sqlstate: 55035 |
SQL0673N |
A primary or unique key index cannot be created because the table contains rows which are duplicates with respect to the values of the identified primary or unique key columns of constraint name. |
The primary or unique key definition of the constraint identified by name failed because the table being altered already contains rows with duplicate values for the PRIMARY KEY or UNIQUE clause columns. name is the constraint name, if specified. If a constraint name was not specified, name is the first column name specified in the primary key or unique constraint clause followed by three periods. The statement cannot be processed. The specified table is not altered. |
Remove the erroneous rows from the table before attempting to define the primary or unique key. sqlcode: -673 sqlstate: 23515 |
SQL0678N |
The literal literal must be compatible with the data type data-type of column column-name. |
The literal literal specified for the STARTING, ENDING or EVERY clause is not compatible with the data type of column column-name. The data type of the column is data-type. The value of a literal used in the EVERY clause must not be zero or negative. The EVERY clause must specify a duration when the PARTITION BY clause specifies a datetime data type. |
Specify a valid literal in the STARTING, ENDING, or EVERY clause. sqlcode: -678 sqlstate: 53045 |
SQL0680N |
The statement failed because too many columns were specified for a table, view, table function, or nickname, or because too many fields were specified for a user-defined row data type. |
The maximum number of columns that you can define for a table depends on the type of object. The maximum number of columns that you can define for a view, table function, or nickname and the maximum number of fields permitted for a user-defined row data type are specified in SQL and XML limits. For tables, the maximum number of columns is affected by the number of LOB columns specified. The section Row size limit in the CREATE TABLE statement includes a formula to calculate the row size of a table. For relational database sources in federated environments, nicknames might also be limited by the maximum number of columns for tables or views on their data source when these limits are less than the limits specified in SQL and XML limits. This message is returned for the following scenarios:
|
Ensure that the number of columns or fields does not exceed the limit. To resolve the issue reported by this message, perform the following types of troubleshooting actions:
sqlcode: -680 sqlstate: 54011 |
SQL0683N |
The specification for column, attribute, user-defined type or function data-item contains incompatible clauses. |
There is an error in a data item specification in a CREATE statement, ALTER statement, an XMLTABLE expression, or a typed-correlation clause of a SELECT statement which is referencing a generic table function. Incompatible specifications are present, such as: "INTEGER and FOR BIT DATA". If the column is of type DB2SECURITYLABEL, incompatible specifications include NOT NULL WITH DEFAULT. The location of the error is given by data-item as follows:
The statement cannot be processed. |
Remove the incompatibility and try the statement again. sqlcode: -683 sqlstate: 42842 |
SQL0695N |
The value provided (seclabel) could not be converted to a security label. In the security policy with a policy ID of policy-id, the element value element-value does not correspond to any element in the component in ordinal position ordinal. |
An INSERT or UPDATE statement specified a value for the column of type DB2SECURITYLABEL. The value cannot be converted to a valid security label for the security policy protecting the table. If the seclabel value is *N, then the actual value has been written in the db2diag log file. The value has a problem in the component indicated by the component number. The ordinal position refers to the position of the component in COMPONENTS clause of the CREATE SECURITY POLICY statement used to create the policy. The indicated element value does not correspond to a valid element in that component. |
Check the INSERT or UPDATE statement and make sure that the value being set in the security label column is valid for the security policy protecting the table. Sometimes an invalid value can be generated as the result of a SELECT done from a table that is not protected with the same security policy as the target table. You should only copy security labels between tables protected by the same security policy. To get the security policy name for the given policy ID use this SQL query. Replace policy-id with the policy ID number given in the error message. sqlcode: -695 sqlstate: 23523 |
SQL0696N |
The definition of trigger trigger-name includes an invalid use of correlation name or transition table name name. Reason code=reason-code. |
The trigger definition included an invalid use of name. The value of reason-code identifies the roblem:
The statement cannot be processed. |
Remove the invalid correlation name or transition table name along with the preceding keyword. |
SQL0697N |
OLD or NEW correlation names are not allowed in a trigger defined with the FOR EACH STATEMENT clause. |
The trigger, as defined, includes a REFERENCING clause with OLD or NEW correlation names specified (or both) and the FOR EACH STATEMENT clause. These cannot be specified together. The statement cannot be processed. |
Remove any OLD or NEW correlation names from the REFERENCING clause or replace FOR EACH STATEMENT with FOR EACH ROW. sqlcode: -697 sqlstate: 42899 |
SQL0707N |
The name name cannot be used because the specified identifier is reserved for system use. |
The following list provides rules about reserved names and qualifiers:
|
Select a name that is not reserved. sqlcode: -707 sqlstate: 42939 |
SQL0713N |
The replacement value for special-register is invalid. |
Either the value specified in the SET statement is not a valid value of the indicated special register, the value specified is valid for the special register but cannot be used on the current server, or the value specified is NULL as a result of an indicator variable. The statement cannot be executed. |
Correct the replacement value or any indicator variables. sqlcode: -713 sqlstate: 42815 |
SQL0719N |
Bind error for user auth-id. Package package-name already exists. |
An attempt is made, using the ACTION ADD option of PRECOMPILE or BIND to add a package that already exists. The combination of 'pkgschema.pgkname.pkgversion' must be unique in the SYSCAT.PACKAGES catalog view.
The package is not created. |
Possible ways to ensure that there is no attempt to add a duplicate entry include:
sqlcode: -719 sqlstate: 42710 |
SQL0720N |
Attempting to replace package pkgschema.pkgname WITH VERSION pkgversion, where this version already exists. |
An attempt is made to create a version of a package that already exists using the ACTION REPLACE REPLVER option. The version specified in the REPLVER keyword is different from the version specified in the VERSION precompile option. The version specified in the VERSION precompile option already exists in the catalog. The combination of 'pkgschema.pkgname.version' must be unique in the SYSCAT.PACKAGES catalog view. A common mistake is that the user may believe that the version that is being created is the one specified in the REPLVER keyword. This is not the case. The version specified in the REPLVER keyword is the name of the version being replaced. The version that will be created is the version that is given to the program in the VERSION option. No package is created. |
Ensure that the version being created does not already exist. There are two approaches to solve this problem:
sqlcode: -720 sqlstate: 42710 |
SQL0721N |
Package pkgschema.pkgname with consistency token = 0Xcontoken cannot be created since it is not unique. |
An attempt is made to add or replace a package with a consistency token that is not unique for that package. The combination of 'pkgschema.pkgname.contoken' already exists. This is most likely caused by using the LEVEL option of the PRECOMPILE to specify the consistency token. The package is not created. |
Check the SYSCAT.PACKAGES catalog table for names of existing application packages with the indicated consistency token. Reissue the PREP or BIND command such that the 'pkgschema.pkgname.contoken' is unique within the catalog. The following SQL statement can be used to query the catalog:
If the LEVEL option on the precompile was used, reissuing the precompile and specifying a different LEVEL value would change the consistency token. It is recommended that the LEVEL option is not used; not specifying the LEVEL option of the precompile would ensure that the consistency token is a current timestamp value. |
SQL0722N |
Error performing bind-command for user auth-id. Package package-name does not exist. |
Bind or rebind was issued against a package that does not exist. The error would occur if ACTION REPLACE was specified and the REPLVER option specified a version that doesn't exist.
The package was not bound or rebound. |
|
SQL0723N |
An error occurred in a triggered SQL statement in trigger trigger-name. Information returned for the error includes SQLCODE sqlcode, SQLSTATE sqlstate and message tokens token-list. |
An SQL statement in the trigger trigger-name has failed during execution of the trigger. The sqlcode, sqlstate and message token list (each token is separated by the vertical bar character) are provided. The message tokens may be truncated. See the corresponding message for the sqlcode for further explanation of the error. The trigger and the original SQL statement that caused the trigger to execute cannot be processed. |
Check the message associated with the SQLCODE of the SQL statement that failed. Follow the action suggested by that message. sqlcode: -723 sqlstate: 09000 |
SQL0724N |
The activation of object-name of type object-type would exceed the maximum level of indirect SQL cascading. |
Cascading of indirect SQL occurs when a trigger activates another trigger (possibly through referential constraint delete rules) or a routine, containing SQL, invokes another routine. The depth of this cascading is limited to 16 for triggers and 64 for routines. Note that recursive situations where a trigger includes a triggered SQL statement that directly or indirectly causes the same trigger to be activated, or where a routine directly or indirectly invokes itself, is a form of cascading that is very likely to cause this error if there are no conditions to prevent cascading from exceeding the limit. The object-type is one of TRIGGER, FUNCTION, METHOD, or PROCEDURE. The object-name specified is one of the objects that would have been activated at the seventeenth level of cascading. |
Start with the objects that are activated or invoked by the statement that received this error. If any of these objects are recursive, ensure that there is some condition that prevents the object from being activated or invoked more than the limit allows. If this is not the cause of the problem, follow the chain of objects that are activated or invoked to determine the chain that exceeds the cascading limit. sqlcode: -724 sqlstate: 54038 |
SQL0727N |
An error occurred during implicit system action type action-type. Information returned for the error includes SQLCODE sqlcode, SQLSTATE sqlstate and message tokens token-list. |
The processing of a statement or command has caused the database manager to implicitly perform additional processing. During this processing an error was encountered. The action attempted is shown by the action-type:
The sqlcode, sqlstate and message token list (each token is separated by the vertical bar character) are provided. The message tokens may be truncated. See the corresponding message for the sqlcode for further explanation of the error. The original SQL statement or command that caused the action-type cannot be processed and the implicit system action was not successful. Federated system users: You may have received this message because you dynamically prepared an SQL statement in a pass-through session and then tried to execute the statement after the session was closed. |
Check the message associated with the SQLCODE of the SQL statement that failed. Follow the action suggested by that message. For an invalid package, the REBIND command can be used to recreate the error or to explicitly validate the package once the cause of the error has been resolved. For a failure that occurred while a database object was being revalidated:
Federated system users: If the statement that failed was dynamically prepared in a pass-through session, open another pass-through session, write and prepare the statement again, and execute it while the session is still open. sqlcode: -727 sqlstate: 56098 |
SQL0740N |
Routine routine-name (specific name specific-name) is defined with the MODIFIES SQL DATA option, which is not valid in the context where the routine is invoked. |
The routine routine-name (specific name specific-name) is defined with MODIFIES SQL DATA and is therefore not allowed in:
Module functions and functions defined with a compound SQL (compiled) statement as the function body that are defined with the MODIFIES SQL DATA option can only be the sole expression on the right hand side of an assignment statement in a compound SQL (compiled) statement. |
Ensure that routine resolution resolved to the desired routine. Remove the routine from the failing statement or redefine the routine with an SQL access indicator other than MODIFIES SQL DATA. sqlcode: -740 sqlstate: 51034 |
SQL0746N |
The routine named routine-name (specific name specific-name) failed because the routine violated nested SQL statement rules when attempting to perform operation operation on the table named table-name. |
This message is returned when an application calls a routine that attempts to access a table in a way that conflicts with other uses of the table by either the application, or a routine invoked directly or indirectly from that application. The value of the token operation indicates the nature of the conflict:
This message can be returned in multiple scenarios:
|
Retry the operation. If the operation continues to fail with this error, take the following steps to avoid this error:
sqlcode: -746 sqlstate: 57053 |
SQL0750N |
The statement failed because the table or column cannot be renamed. |
The source table in a RENAME statement cannot be renamed for one or more of the following reasons.
The column of the target table in an ALTER TABLE statement cannot be renamed for one or more of the following reasons.
|
If the error pertains to a RENAME statement, drop the view, materialized query table, trigger, SQL function, SQL method, check constraint, referential constraint, or XSR object dependent on the table and recreate the expression-based index without explicit reference to the table name before issuing the RENAME statement. Objects dependent on the table can be determined by querying the catalog.
If the error pertains to a RENAME COLUMN action of an ALTER TABLE statement, the column cannot be renamed directly while the target table is a history table. The column can be renamed by taking one of the following actions.
If a column is a random distribution key column of a random distribution table using random by generation method, no action is required. The column is a system-generated column and cannot be renamed. sqlcode: -750 sqlstate: 42986 |
SQL0751N |
Routine routine-name (specific name specific-name) attempted to execute a statement that is not allowed. |
The program used to implement the body of a routine is not allowed to issue any connection statements. If the routine is a function or method, COMMIT and ROLLBACK (without the SAVEPOINT option) are also not allowed. If the routine is a procedure and is called within a trigger, function, method, or dynamic compound statement, a COMMIT or ROLLBACK statement is not allowed in the procedure. |
Remove the statement that is not allowed, then recompile the program. sqlcode: -751 sqlstate: 38003, 42985 |
SQL0752N |
Connecting to a database is not permitted within a logical unit of work when the CONNECT type 1 setting is in use. |
An attempt was made to connect to either another database or the same database before issuing a COMMIT or ROLLBACK statement. The request cannot be processed within a CONNECT type 1 environment. |
sqlcode: -752 sqlstate: 0A001 |
SQL0773N |
The case was not found for the CASE statement. |
A CASE statement without an ELSE clause was found in the routine body of an SQL routine. None of the conditions specified in the CASE statement were met. |
Change the CASE statement to handle all conditions that can occur. sqlcode: -773 sqlstate: 20000 |
SQL0774N |
The statement cannot be executed within an ATOMIC compound SQL statement. |
A COMMIT or ROLLBACK statement was encountered within the context of an ATOMIC compound SQL statement. These statements are not allowed in this context. |
Remove the COMMIT or ROLLBACK statement or change the context so that it is not an ATOMIC compound statement. sqlcode: -774 sqlstate: 2D522 |
SQL0776N |
Use of cursor cursor-name is not valid. |
Cursor cursor-name is specified as the cursor name on a FOR statement in an SQL procedure. The cursor cannot be specified on a CLOSE, FETCH, or OPEN statement within the FOR statement. |
Remove the CLOSE, FETCH, or OPEN statement. sqlcode: -776 sqlstate: 428D4 |
SQL0777N |
Nested compound statements not allowed. |
Atomic compound statements in the routine body of an SQL procedure cannot be nested. |
Ensure that the SQL procedure does not contain nested atomic compound statements. sqlcode: -777 sqlstate: 42919 |
SQL0778N |
End label label is not the same as the begin label. |
Label label specified at the end of a FOR, IF, LOOP, REPEAT, WHILE or compound statement is not the same as the label at the beginning of the statement. You cannot specify an end label if a begin label is not specified. |
Ensure that the end label is the same as the begin label for FOR, IF, LOOP, REPEAT, WHILE, and compound statements. sqlcode: -778 sqlstate: 428D5 |
SQL0779N |
Label label specified on a GOTO, ITERATE, or LEAVE statement is not valid. |
Label label is specified on a GOTO, ITERATE or LEAVE statement. The label is not defined or is not a valid label for the statement. The label on an ITERATE statement must be the label for a FOR, LOOP, REPEAT, or WHILE statement. The label on a LEAVE statement must be the label for a FOR, LOOP, REPEAT, WHILE, or compound statement. The label on a GOTO must be defined within a scope that the GOTO statement can reach.
|
Specify a valid label on the GOTO, ITERATE, or LEAVE statement. sqlcode: -779 sqlstate: 42736 |
SQL0780N |
UNDO is specified for a handler when ATOMIC is not specified for the compound statement. |
UNDO is specified for a handler in a compound statement in an SQL procedure. UNDO cannot be specified unless the compound statement is ATOMIC. |
Either specify that the compound statement is ATOMIC or specify EXIT or CONTINUE on the handler. sqlcode: -780 sqlstate: 428D6 |
SQL0781N |
Condition condition-name is not defined or the definition is not in scope. |
Condition condition-name was specified in a handler declaration, SIGNAL statement, or RESIGNAL statement, but the condition is not defined in the scope of the compound statement that includes the condition reference or the condition could not be found as a defined module condition. The statement cannot be processed. |
Define the condition either by using the DECLARE CONDITION statement in a compound statement that includes the condition reference or by defining the condition in a module that is visible where the condition is referenced. As an alternative, you could replace the condition reference with a specific SQLSTATE value or remove the handler declaration, SIGNAL statement or RESIGNAL statement that references the condition. sqlcode: -781 sqlstate: 42737 |
SQL0782N |
A condition or SQLSTATE value specified in a handler is not valid. |
A condition or SQLSTATE value specified in a handler in an SQL statement is not valid for one of the following reasons:
|
Remove the condition, SQLSTATE value or SQLCODE value from the handler. sqlcode: -782 sqlstate: 428D7 |
SQL0783N |
A duplicate column name or unnamed column was specified in a DECLARE CURSOR statement of a FOR statement. |
The select list in the FOR statement must contain unique column names. The select list specified contains either duplicate column names or unnamed expressions. |
Specify unique column names in the select list specified in the FOR statement. sqlcode: -783 sqlstate: 42738 |
SQL0784N |
The statement failed because the constraint named constraint-name cannot be dropped. |
A constraint that is implicitly generated when a BUSINESS_TIME period is defined cannot be dropped using an ALTER TABLE statement with either a DROP CHECK or DROP CONSTRAINT clause. |
Remove the DROP CHECK or DROP CONSTRAINT clause from the ALTER TABLE statement. If you need to drop the constraint, the BUSINESS_TIME period can be dropped using the DROP PERIOD clause in an ALTER TABLE statement. sqlcode: -784 sqlstate: 42860 |
SQL0785N |
The declaration or use of the SQLSTATE or SQLCODE variable is not valid. |
SQLSTATE or SQLCODE was used as a variable in the routine body of an SQL routine, but is not valid for one of the following reasons:
The statement cannot be processed. |
Declare the SQLSTATE variable as CHAR(5) and the SQLCODE variable as INTEGER. Set the variable to a valid value. sqlcode: -785 sqlstate: 428D8 |
SQL0787N |
RESIGNAL statement is not within a handler. |
The RESIGNAL statement can only be used inside condition handlers. |
Remove the RESIGNAL statement or use a SIGNAL statement instead. sqlcode: -787 sqlstate: 0K000 |
SQL0788N |
The statement was not processed because a row of target table table-name was identified more than once for update, delete or insert. |
This message is returned when the ON search-condition of a MERGE statement or WHERE search-condition of an UPDATE statement matches a single row from the target table with multiple rows of the source table reference. If a row from the target table matches multiple rows of the source table reference, the target row might be operated on more than once with an update or delete operation, which is not supported. |
Respond in one of the following ways:
sqlcode: -788 sqlstate: 21506 |
SQL0789N |
The data type for parameter or SQL variable name is not supported in the routine, compound SQL statement, or parameter list of a cursor value constructor. |
One of the following situations has occurred:
|
Perform any of the following actions that apply:
sqlcode: -789 sqlstate: 429BB |
SQL0796N |
The grant of role role-name1 to role role-name2 is not valid as it would create a cycle. |
A role cannot be granted if it would create a cycle. The role role-name1 contains the role role-name2, possibly through another role, and so it cannot be granted to role-name2. |
If appropriate, to remove the potential for a cycle to be created, revoke the role role-name2 from role role-name1, or from whichever role contained in role-name1 that contains role-name2, then resubmit the statement. sqlcode: -796 sqlstate: 428GF |
SQL0797N |
The trigger trigger-name is defined with an unsupported triggered SQL statement. |
The trigger must be defined with a triggered SQL statement that can only include statements from the following lists. A trigger can include the following control statements:
An AFTER trigger or an INSTEAD OF trigger can also include the following triggered SQL statements:
A BEFORE trigger that is defined using an SQL compound (compiled) statement can also include the following triggered SQL statements:
If a BEFORE trigger is not defined using an SQL compound (compiled) statement, or a BEFORE INSERT trigger is defined with a SQL compound (compiled) statement and the triggering operation is an INSERT on a UNION ALL view or an UPDATE on a WITH ROW MOVEMENT view, then the triggered SQL statement cannot include:
In some cases the trigger-name is not available for use in the message. |
Check the triggered SQL statements in the trigger for any statement that does not match the list described in this message and remove it. sqlcode: -797 sqlstate: 42987 |
SQL0798N |
A value cannot be specified for column column-name which is defined as GENERATED ALWAYS. |
When inserting or updating a row in a table, a value was specified for the GENERATED ALWAYS column column-name. GENERATED ALWAYS columns should not be specified in the column-list for an INSERT or in the SET clause for an update unless the keyword DEFAULT is specified. The INSERT or UPDATE is not performed. |
Remove the GENERATED ALWAYS column from the column-list or SET clause, or specify DEFAULT as the column value. sqlcode: -798 sqlstate: 428C9 |
SQL0799W |
A SET statement for special register special-register-name was ignored because either the special register does not exist on the database server or an invalid value was specified for the special register. |
A special register is a storage area that is defined by the database manager for an application process. Special registers are used to store information that can be referenced in SQL statements. Some special registers can be updated using the SET variable statement. A DB2 client or driver can be configured to set special registers. When a DB2 client or driver is configured to set special registers, the client or driver sends a SET variable statement to the database server at the same time as an application SQL statement. This message is returned when an attempt is made to update a special register, but either the special register does not exist on the database server or an invalid value was specified for the special register. When a DB2 client or driver sends a SET variable statement to the database server at the same time as an application SQL statement, the database server processes the application SQL statement regardless or whether setting the special register succeeds or fails. |
If the DB2 client or driver is configured to set special registers, validate the special register settings that are specified in the client configuration file db2dsdriver.cfg. sqlcode: +799 sqlstate: 01527 |
SQL0801N |
Division by zero was attempted. |
The processing of a column function or arithmetic expression resulted in division by zero. The statement cannot be processed. For the INSERT, UPDATE, or DELETE statements, no inserts or updates are performed. |
Examine the SQL statement to determine the cause of the problem. If the problem is data dependent, it is necessary to examine the data processed when the error occurred. Refer to the SQL Reference to see the valid ranges for the data types. Federated system users: examine the SQL statement to determine the cause of the problem. If the problem is data dependent, examine the data being processed at the data sources when the error occurred. sqlcode: -801 sqlstate: 22012 |
SQL0802N |
Arithmetic overflow or other arithmetic exception occurred. |
The processing of a column function or arithmetic expression has resulted in an arithmetic overflow. The statement cannot be processed. For the INSERT, UPDATE, or DELETE statements, no inserts or updates are performed. |
Examine the SQL statement to determine the cause of the problem. If the problem is data dependent, it is necessary to examine the data processed when the error occurred. Refer to the SQL Reference to see the valid ranges for the data types. This error may also be returned when column functions cannot handle the value that is returned by the SQL statement. For example, issuing a SELECT COUNT statement against a table that has more rows than defined by the MAX_LONGINT_INT SQL limit will cause an arithmetic overflow error. Consider using the COUNT_BIG column function for tables with more than 2 147 483 647 rows. Federated system users: examine the SQL statement to determine the cause of the problem. If the problem is data dependent, examine the data being processed at the data sources when the error occurred. Refer to the corresponding SQL Reference for the data source to determine the valid ranges for the data types. sqlcode: -802 sqlstate: 22003 |
SQL0803N |
One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by index-id constrains table table-name from having duplicate values for the index key. |
The INSERT or UPDATE object table table-name is constrained by one or more UNIQUE indexes to have unique values in certain columns or groups of columns. Alternatively, a DELETE statement on a parent table caused the update of a foreign key in a dependent table table-name that is constrained by one or more UNIQUE indexes. Unique indexes might support primary keys or unique constraints defined on a table. The statement cannot be processed because completing the requested INSERT, UPDATE or DELETE statement would result in duplicate column values. If the index is on an XML column, the duplicate values for the index key may be generated from within a single XML document. Alternatively, if a view is the object of the INSERT or UPDATE statement, it is the table table-name on which the view is defined that is constrained. If index-id is an integer value, the index name can be obtained from SYSCAT.INDEXES by issuing the following query:
where 'schema' represents the schema portion of table-name and 'table' represents the table name portion of table-name. The statement cannot be processed. The table remains unchanged. |
Examine the definition for the index identified by index-id. For an UPDATE statement, ensure that the specified operation is not itself inconsistent with the uniqueness constraint. If this does not show the error, examine the object table content to determine the cause of the problem. For an INSERT statement, examine the object table content to determine which of the values in the specified value list violates the uniqueness constraint. Alternatively, if the INSERT statement contains a subquery, the object table contents addressed by that subquery must be matched against the object table contents to determine the cause of the problem. Note that if the table is protected using a security policy, your LBAC credentials may not allow you to see the rows that are causing the error. If the index is on an XML column and the statement is either INSERT or UPDATE, consider whether the XML document would result in duplicate values from within the single XML document. For a DELETE statement, examine the identified dependent table for unique constraints on foreign keys that are defined with the rule ON DELETE SET NULL. This table has a foreign key column included in the identified unique index that cannot be set to null since there is already a null in the column for that table. Federated system users: isolate the problem to the data source failing the request and examine the index definitions and data for the conditions listed previously. sqlcode: -803 sqlstate: 23505 |
SQL0804N |
The application program parameters for the current request are not valid. Reason code reason-code. If a host variable or SQLVAR in the SQLDA is invalid then: host variable/SQLVAR number = var-number, SQLTYPE = sqltype, SQLLEN = sqllen, host variable/SQLVAR type = input-or-output. |
An error occurred while processing the current request.
Reason codes are interpreted as follows:
In SQL statements with host variables, use the host variable number to count in from the beginning of the statement (or substatement, in the case of compound SQL) to locate the invalid host variable. For statements using an SQLDA, the SQLVAR number is used to locate the invalid SQLVAR. For an input SQLDA, count only input host variables or SQLVARs; similarly for output. Note that this number is based at 1. The statement cannot be processed. |
Examine the application program for any errors noted. Note that the programmer should not attempt to modify the precompiler output. Federated system users: If you received reason code 102, specify a supported data type and resubmit the program. sqlcode: -804 sqlstate: 07002 |
SQL0805N |
Package package-name was not found. |
The statement cannot complete because the necessary package was not found in the catalog. The package-name is either in the form:
Possible causes for this message (SQLCODE) are:
Note that when version-ids are in use for the given package-schema.package-name, there may be packages defined with the same package schema and package name, but the correct package is not found since the existing packages do not match the requested version or consistency token. A package must match all three parts of the package-name. When multiple versions are being used, additional causes for this messages are:
In all these cases, the consistency token of the request does not match the consistency token of the existing version and thus the package is considered to be not found. The statement cannot be processed. |
Specify the correct package name or bind the program. If the application being run is not bound to the database, contact the database administrator to do the necessary binding. Ensure that the application or object module being executed is the compiled and linked modified source code associated with the precompile and bind that generated the package. If the CURRENT PACKAGE PATH is set, ensure that the schema that includes the package is specified in the CURRENT PACKAGE PATH. The following SQL statements can be used to query the catalog to determine if there are different versions of the package.
Note that the UNIQUE_ID column corresponds to the consistency token. If the DB2 utility programs need to be rebound to the database, the database administrator can accomplish this by issuing one of the following CLP command from the bnd subdirectory of the instance, while connected to the database:
Federated system users: ensure that the packages required for the federated server are bound at the applicable data sources. Refer to the Federated Systems Guide for more information about binding packages to data sources. sqlcode: -805 sqlstate: 51002 |
SQL0808N |
The CONNECT statement semantics are not consistent with those of other existing connections. |
The CONNECT statement originates from a source file which was precompiled having different connection options (SQLRULES, CONNECT type, SYNCPOINT, or RELEASE type) than that of a source file for which a connection exists. |
Ensure that all source files are precompiled using the same CONNECT options, or if this is not possible, call the SET CLIENT api to set the desired options for the application process before issuing the first CONNECT statement. sqlcode: -808 sqlstate: 08001 |
SQL0811N |
The result of a scalar fullselect, SELECT INTO statement, or VALUES INTO statement is more than one row. |
One of the following caused the error:
Federated system users: this situation can be detected by federated server or by the data source. The statement cannot be processed. |
Ensure that the statement contains the proper condition specifications. If it does, there may be a data problem that is causing more than one row to be returned when only one is expected. Federated system users: isolate the problem to the data source failing the request and examine the selection criteria and data for that object. sqlcode: -811 sqlstate: 21000 |
SQL0817N |
The SQL statement cannot be executed because the statement will result in a prohibited update operation. |
The application attempted to execute an SQL statement that would result in updates to user data or to the subsystem catalog. This is prohibited for one of the following reasons:
These SQL statements include INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, GRANT, and REVOKE. The statement cannot be executed. |
If the application is running as an IMS inquiry-only transaction, see your IMS system programmer about changing the inquiry-only status of the transaction under which your application is running. If the IMS or CICS application is attempting a remote update, either the application must be changed to run as a local application on the server DBMS, or the server DBMS must be upgraded to support two-phase commit. If the application is attempting to update data at multiple locations, either the application must be changed, or all DBMSs involved must be upgraded to support two-phase commit. sqlcode: -817 sqlstate: 25000 |
SQL0818N |
A timestamp conflict occurred. |
The timestamp generated by the precompiler at precompile time is not the same as the timestamp stored with the package at bind time. This problem can be caused by the following:
Federated system users: in addition to the causes listed previously, the problem can also be due to not binding the required packages at all applicable data sources. The statement cannot be processed. |
Bind the application again, using the bind file for the program that matches the object module. Or, execute the program that corresponds to the package stored in the database. If installing the sample database, record the number and text of this message and then contact your technical service representative. Federated system users: in addition to the previously listed actions, ensure that the packages required for the federated server are bound at the applicable data sources. Refer to the Federated Systems Guide for more information on binding packages to data sources. sqlcode: -818 sqlstate: 51003 |
SQL0822N |
The SQLDA contains a data address or indicator variable address which is not valid. |
The application program placed an address that is not valid in the SQLDA. The statement cannot be processed. |
Correct the application program so that valid addresses are placed in SQLDA. sqlcode: -822 sqlstate: 51004 |
SQL0840N |
Too many items were returned in a SELECT list. |
The number of items returned in the SELECT list exceeds the allowable maximum. The maximum for SELECT lists (other than on common table expressions) is 2048. The maximum for SELECT lists in common table expressions is 5000. The statement cannot be processed. |
Determine whether all the information is actually needed. (Note that the number of items returned by the SELECT list * in the SQL statement SELECT * from A, B, C is the sum of the number of columns in all three tables.) If possible, rewrite the SQL statement so only the necessary items of information are returned. If all the information is necessary, break the SQL statement into two or more statements. sqlcode: -840 sqlstate: 54004 |
SQL0842N |
A connection to server server-name already exists. |
SQLRULES(STD) is in effect and a CONNECT statement identifies an existing SQL connection. |
The correction depends on the error:
Correct the error in the application and try again. sqlcode: -842 sqlstate: 08002 |
SQL0843N |
The server name does not specify an existing connection. |
A statement, command, or API specified a server name that does not identify an existing SQL connection of the application process. This may have occurred using:
|
The correction depends on the error:
Correct the error in the application and try again. sqlcode: -843 sqlstate: 08003 |
SQL0845N |
A PREVIOUS VALUE expression cannot be used before the NEXT VALUE expression generates a value in the current session for sequence sequence-name. |
A PREVIOUS VALUE expression specified sequence sequence-name, but a value has not yet been generated for this sequence. A NEXT VALUE expression must be issued in this session to generate a value for this sequence before a PREVIOUS VALUE expression for the sequence can be issued. |
Issue at least one NEXT VALUE expression for a sequence before issuing any PREVIOUS VALUE expression for the same sequence in a session. sqlcode: -845 sqlstate: 51035 |
SQL0846N |
Invalid specification of an identity column or sequence object object-type object-name. Reason code = reason-code. |
For an identity column or sequence object, the specification of an attribute in a CREATE or ALTER statement may be invalid for one of the following reasons:
|
Correct the syntax and resubmit the statement. sqlcode: -846 sqlstate: 42815 |
SQL0857N |
Conflicting options have been specified (option1, option2). |
Conflicting options have been specified. Either option1 and option2 must be specified together, or the two options must not be specified together. If IMPLICITLY HIDDEN is specified when defining a column, the column must also be defined as a ROW CHANGE TIMESTAMP column. The statement cannot be executed. |
Depending on the options, either specify the options together or do not specify the options together. sqlcode: -857 sqlstate: 42867 |
SQL0859N |
Access to the Transaction Manager Database failed with SQLCODE SQLCODE. |
The application was precompiled with SYNCPOINT(TWOPHASE) and requires a Transaction Manager Database to coordinate the two phase commit. Reasons why the Transaction Manager Database is not available might include the following:
|
Possible actions:
sqlcode: -859 sqlstate: 08502 |
SQL0863W |
A successful connection was made, but only single byte characters should be used. |
The server database and client application are using codepages for different language types and any characters outside the 7-bit ASCII range cannot be guaranteed (only the characters in the 7-bit ASCII range exist in all codepages). For example, the connection might be between a Japanese and a Latin-1 codepage, but none of the Japanese characters will be available in the Latin-1 codepage, so all of these characters should be avoided (English characters are fine though). Federated system users: possible causes are:
|
Do not submit SQL statements or commands that use characters which are not common between the application and database codepages. Federated system users: do not submit SQL statements or commands that use characters which are not common between the client system, the federated system, and the data source. sqlcode: +863 sqlstate: 01539 |
SQL0864N |
A referential constraint constraint-name attempted to modify a row in table table-name that was modified by an SQL data change statement within a fullselect. |
An SQL data change statement was specified in the FROM clause, but the underlying target base table of the SQL data change statement has a referential constraint which modifies the same table. This is disallowed. The statement cannot be processed. |
Avoid using the SQL data change statement within a FROM clause, or change the referential constraint so that it does not modify the table that is the target of the SQL data change statement. sqlcode: -864 sqlstate: 560C6 |
SQL0865N |
Invalid tm_database value. |
The database chosen as the tm_database in the database manager configuration is not valid. The database must be at level DB2 V2.1 or later, and cannot be a database accessed through DRDA protocol (ie. through DB2 Connect). The statement cannot be executed. |
sqlcode: -865 sqlstate: 08001 |
SQL0866N |
The data server driver or data server client terminated the connection to the database named database-name because the <alternategroup> section of the db2dsdriver.cfg file is not valid. |
You can specify multiple alternate database servers for automatic client reroute to connect to, in the event that the connection to a database fails, using the <alternategroup> section of the db2dsdriver.cfg file. This functionality is supported in DB2 for Linux, UNIX, and Windows and DB2 for z/OS servers. There are some restrictions on the contents of the <alternategroup> section of the db2dsdriver.cfg file when connecting to DB2 for z/OS database servers. If a database, named db_A, is located on a DB2 for z/OS database server, there can be no more than one <database> entry in the <alternategroup> section for db_A. This message is returned when one of these situations occur:
|
In the db2dsdriver.cfg file, modify the <alternategroup> sections that are related to the given database, database-name, so that those entries and sections satisfy the <alternategroup> support restrictions:
sqlcode: -866 sqlstate: 08001 |
SQL0868N |
A CONNECT using a USER/USING clause was attempted to a server for which a connection already exists. |
A current or dormant connection to a server exists, and an attempt to CONNECT to this server using the USER/USING clause is invalid. |
Possible actions:
sqlcode: -868 sqlstate: 51022 |
SQL0873N |
Objects encoded with different encoding schemes cannot be referenced in the same SQL statement. |
All tables, SQL functions, and SQL methods referenced in the SQL statement are not defined with the same encoding scheme. This situation can occur when:
|
Correct the SQL statement so that only objects with the same encoding scheme are referenced. sqlcode: -873 sqlstate: 53090 |
SQL0874N |
The CCSID of all the parameters must match the PARAMETER CCSID of the routine. |
All the parameters of a routine must use the same encoding scheme as the routine itself. If the CCSID is specified for a parameter, it must match the implicitly or explicitly specified PARAMETER CCSID option for the routine. |
Remove the CCSID option from the parameter or change the statement so the same CCSID value is specified throughout. sqlcode: -874 sqlstate: 53091 |
SQL0880N |
SAVEPOINT savepoint-name does not exist or is invalid in this context. |
An error occurred issuing a RELEASE or ROLLBACK TO SAVEPOINT savepoint-name statement. Either a savepoint with that name does not exist, or it was established outside the current atomic execution context. The statement cannot be processed. |
Correct the name of the savepoint in the statement and reissue the statement. sqlcode: -880 sqlstate: 3B001 |
SQL0881N |
A SAVEPOINT with name savepoint-name already exists, but this savepoint name cannot be reused. |
The name savepoint-name has already been used in a SAVEPOINT statement. The savepoint name cannot be reused because at least one of the SAVEPOINT statements that used this name also specified the UNIQUE keyword, which asserts that the name must be unique. The statement cannot be processed. The new savepoint is not set. The old savepoint with the same name still exists. |
Choose another name for this savepoint and reissue the SAVEPOINT statement. If this existing savepoint name must be reused, issue the RELEASE SAVEPOINT statement to free the existing savepoint. However, be aware that the RELEASE SAVEPOINT statement also releases any savepoints that were established in the transaction since the specified savepoint was established. For more information, refer to the SQL Reference. sqlcode: -881 sqlstate: 3B501 |
SQL0882N |
Savepoint does not exist. |
An error occurred issuing a ROLLBACK TO SAVEPOINT statement. Issuing a ROLLBACK TO SAVEPOINT without specifying a specific savepoint name is not allowed when there are no existing savepoints. The statement cannot be processed. |
Issue a different statement, or try rolling back the entire transaction with the ROLLBACK statement. sqlcode: -882 sqlstate: 3B502 |
SQL0900N |
The application state is in error. A database connection does not exist. |
A connection to a database does not exist. This may be due to one of the following reasons:
|
Reestablish a current connection by either switching to an existing dormant connection (using CONNECT TO or SET CONNECTION), by establishing a new connection (using CONNECT), or by successfully switching to another user in a trusted connection. sqlcode: -900 sqlstate: 08003 |
SQL0901N |
The SQL statement or command failed because of a database system error. (Reason reason.) |
There are many scenarios in which this message can be returned. Here are two examples of scenarios in which this message can be returned:
In some cases, although this attempt to execute the SQL statement failed, future attempts to execute this SQL statement or other statements might succeed. The runtime token, reason, might be empty or it might contain English text that is intended for IBM software support personnel only. |
Respond to this error by performing the following troubleshooting steps:
If the error continues after performing the troubleshooting steps described, contact IBM software support for assistance:
sqlcode: -901 sqlstate: 5UA0L, 58004 |
SQL0902C |
A system error occurred. Subsequent SQL statements cannot be processed. IBM software support reason code: reason-code. |
This message is returned when the database manager encounters a critical error, such as a severe operating system error, or an error accessing storage media, which might prevent a database from continuing to be usable. There are different scenarios in which the database manager might encounter an operating system error, or a severe media error. Here is one example of a scenario in which this message can be returned:
The runtime token, reason-code, might sometimes be empty, and is intended to assist IBM software support personnel only. |
Respond to this message by performing the following troubleshooting steps:
If the error continues after performing the troubleshooting steps described, contact IBM software support for assistance:
Federated system users: isolate the problem to the data source failing the request and take the necessary diagnostic steps for that data source. The problem determination procedures for data sources vary, so refer to the applicable data source manuals. sqlcode: -902 sqlstate: 58005 |
SQL0903N |
COMMIT statement failed, transaction rolled back. Reason code: reason-code. |
One or more of the servers participating in the current unit of work was unable to prepare the database to be committed. The COMMIT statement has failed and the transaction has been rolled back. If there is only one server participating in the current unit of work, the transaction may have been committed instead. Possible reason codes are:
|
If a connection to a database was lost, reestablish the connection. If the failure was not connection related, reference the error diagnostic logs on the remote system to determine the nature of the failure and what action might be required. Rerun the application. sqlcode: -903 sqlstate: 40504 |
SQL0904N |
Unsuccessful execution caused by an unavailable resource. Reason code: reason-code, type of resource: resource-type, and resource name: resource-name. |
The SQL statement could not be executed because resource resource-name of type resource-type was not available at the time for the reason indicated by reason-code. Refer to the Problem Determination documentation of DB2 for MVS for an explanation of resource type codes. |
Verify the identity of the resource that was not available. To determine why the resource was unavailable, refer to the specified reason-code. sqlcode: -904 sqlstate: 57011 |
SQL0905N |
Unsuccessful execution due to resource limit being exceeded. Resource name = resource-name, limit = limit-amount1 CPU seconds (limit-amount2 service units) derived from limit-source. |
The execution of the SQL statement was terminated because a resource limit was exceeded. The name of the resource whose limit was exceeded is resource-name. It is also the name of the column in the resource limit specification table from which the limit was derived. The limit that was exceeded in CPU seconds is limit-amount1 and in service units it is limit-amount2. The resource-name may be ASUTIME, which is the number of CPU seconds permitted for each SQL statement. The maximum number of CPU seconds permitted is limit-amount1. The maximum number in service units is limit-amount2. The source used to derive the limit-amount is limit-source and is either the name of a resource limit specification table or a 'system parameter'. If the source is a system parameter, the resource limit specification table did not contain an applicable entry or an error occurred while accessing the table. In either case, the limit is obtained from an install (system) parameter. |
Determine why this SQL statement took so long and take appropriate action. Consider simplifying the SQL statement, restructuring tables and indexes, or contacting the installation group responsible for maintaining the resource limit specification tables. An application program that receives this return code can execute additional SQL statements. sqlcode: -905 sqlstate: 57014 |
SQL0906N |
The SQL statement cannot be executed because this function is disabled due to a prior error. |
Execution of the SQL statement failed because the requested function had been disabled by a prior error. This situation can arise if the application program has intercepted an abend (for instance, by an ON ERROR condition in a PL/I program) and continued to execute SQL statements. This situation may also arise if a DB2 CICS transaction encountered a create thread error yet continued to issue SQL requests without issuing a SYNCPOINT ROLLBACK first. |
In general, an application program should terminate upon receipt of this return code. All subsequent attempts by the application to execute other SQL statements will also fail with the same return code. In the case of a DB2 CICS transaction, if the SQLERRP field in the SQLCA contains the module name DSNCEXT1, the transaction may issue a SYNCPOINT ROLLBACK and continue processing. If the transactions chooses to ROLLBACK and continue processing, it must be capable of correcting the situation that caused the create thread error to occur originally. sqlcode: -906 sqlstate: 24514, 51005, 58023 |
SQL0907N |
An attempt was made to modify the target table, table-name, of the MERGE statement by constraint or trigger name. |
The MERGE statement caused constraint or trigger name to activate, which attempted to update, insert into or delete from table table-name that is also a target table, or table within the same table hierarchy, of the MERGE statement. This is not allowed. |
Change the MERGE statement to remove the operation that causes the constraint or trigger to activate, or alter the table that has the constraint or trigger to remove the reference to the target table. sqlcode: -907 sqlstate: 27000 |
SQL0908N |
bind-type error using auth-id authority BIND, REBIND, or AUTO_REBIND operation is not allowed. |
For BIND and REBIND, the indicated authorization ID is not allowed to perform the indicated bind-type against a plan or package. An entry in the resource limit specification table (RLST) prohibits binding and rebinding by this authorization ID, or all authorization IDs. For AUTO-REBIND, the system parameter controlling AUTO-REBIND operations is set to disallow AUTO-REBIND.
|
If the indicated authorization id should be allowed to bind, change the entry in the active RLST table. If AUTO-REBIND operations are disabled, rebind the package before reexecuting the package. sqlcode: -908 sqlstate: 23510 |
SQL0909N |
The object has been deleted. |
The application program has either (1) dropped a table and then attempted to access it, or (2) dropped an index and then tried to access its object table using that index. |
The logic of the application program must be corrected such that it does not attempt to access or use an object after it has been dropped. Dropping indexes within an application program is especially hazardous, because there is no way of determining whether or not the plan that has been generated for the application (by BIND or REBIND) actually uses a particular index for access to its object table. sqlcode: -909 sqlstate: 57007 |
SQL0910N |
The SQL statement cannot access an object on which a modification is pending. |
The application program attempted to access an object within the same unit of work in which either:
or the application program issued an SQL statement that attempted to access a WLM object on which a modification is pending. The SQL statement may be one of the following:
Federated system users: in addition to the previously listed causes, other data source specific restrictions may exist that prevent access to the object. The SQL statement cannot be processed. |
Modify the application program so there is no attempt to access an object within the same unit of work in which the modification was made. In general, it is better to isolate Data Definition Language (DDL) statements in a different unit of work than Data Manipulation Language (DML) statements that access the same objects. The unit of work must be committed or rolled back before the statement that failed can be processed successfully. If the committed modification caused an object to be dropped, then the object may have to be recreated in order for the failing SQL statement to be processed successfully. If the object is modified within a SAVEPOINT, modify the application program so that it does not attempt to access the object after the application issues a ROLLBACK TO SAVEPOINT statement. Any cursor that accesses the modified object and is open at the time of the ROLLBACK TO SAVEPOINT will not be accessible. Modify the application so that it closes the cursor. If an insert, delete or update statement involving a NOT LOGGED created temporary table or declared temporary table fails, then all rows in that table are deleted. Any cursor that is open against that table at the time of the failure will not be accessible and should be closed by the application. If an ALTER TABLE ... DETACH PARTITION fails because of a pending ALTER TABLE ... ATTACH PARTITION, use two different units of work to do the two operations. If the SQL statement attempted to access a trusted context object, then reissue the statement later. If the SQL statement attempted to access a WLM object, then reissue the statement later. Federated system users: if the previous action does not solve the problem, isolate the request and determine what additional constraints exist on the data source that are preventing access to the object. Ensure that the application is not violating any of those constraints. sqlcode: -910 sqlstate: 57007 |
SQL0911N |
The current transaction has been rolled back because of a deadlock or timeout. Reason code reason-code. |
The current unit of work was involved in an unresolved contention for use of an object and had to be rolled back. The reason codes are as follows:
The application was rolled back to the previous COMMIT. |
The changes associated with the unit of work must be entered again. To help avoid deadlock or lock timeout, issue frequent COMMIT operations, if possible, for a long-running application, or for an application likely to encounter a deadlock. Federated system users: the deadlock can occur at the federated server or at the data source. There is no mechanism to detect deadlocks that span data sources and potentially the federated system. It is possible to identify the data source failing the request (refer to the problem determination guide to determine which data source is failing to process the SQL statement). Deadlocks are often normal or expected while processing certain combinations of SQL statements. It is recommended that you design applications to avoid deadlocks to the extent possible. If a deadlock state was reached because of a queuing threshold such as the CONCURRENTDBCOORDACTIVITIES threshold, increase the value of the queuing threshold. If the deadlock state was reached because the application is waiting for resources governed by workload manager admission control, increase the resourceshare for the service class in which the last statement of the application was executing. To help avoid deadlocks involving resources governed by workload manager admission control, reduce the number of concurrently executing SQL statements in applications by closing SQL cursors when they are no longer needed. Retry the request if the catalog member is in the resynchronization state. The catalog member needs to resynchronize with the entire cluster before it can allow requests to be processed. Retry the request if the catalog member is performing a database update operation. sqlcode: -911 sqlstate: 40001 |
SQL0912N |
The maximum number of lock requests has been reached for the database. Reason code = reason-code |
The maximum number of locks for the database was reached because of insufficient memory for the lock request. The reason code indicates the type of memory limit that was reached:
The statement cannot be processed. |
The application should submit a COMMIT or ROLLBACK statement before submitting other SQL statements. Consider increasing the value of the database configuration parameter indicated by the reason code to support more lock requests.
sqlcode: -912 sqlstate: 57011 |
SQL0913N |
Unsuccessful execution of a transaction caused by deadlock, timeout or write conflict. Reason code reason-code. |
The request issued by a transaction was involved in an unresolved contention for use of an object and the execution failed. The reason codes are as follows:
The text of this message and the runtime tokens might vary, depending on the version and platform of the database server or client. |
sqlcode: -913 sqlstate: 57033 |
SQL0917N |
Bind package failed. |
An error has occurred which prevents the package from being created. This SQLCODE can be issued during bind or commit processing. If issued during commit processing, all changes to the database are rolled back. If issued during bind processing, only package creation fails and other changes within the logical unit of work are still able to be committed. |
This problem is usually caused by one or more SQL statements which did not get bound because of an error. Determine which statements are causing the error and correct them. Reissue the command to create the package. sqlcode: -917 sqlstate: 42969 |
SQL0918N |
Application must execute a rollback. |
The unit of work has already been rolled back in the database but other resource managers involved in this unit of work might not. To ensure integrity of this application, all SQL requests will be rejected until the application issues a rollback. |
All SQL requests will be rejected until the application issues a rollback. For example, in a CICS environment, this would be a CICS SYNCPOINT ROLLBACK command. sqlcode: -918 sqlstate: 51021 |
SQL0920N |
Data on a database client system cannot be accessed from other database client systems. |
The workstation has been configured as a client or a server with local clients. Any databases created on this system cannot be shared by other workstations. The function cannot be processed. |
Request data only from server workstations. sqlcode: -920 sqlstate: 57019 |
SQL0925N |
SQL COMMIT invalid for application execution environment. |
COMMIT is disallowed in the following cases:
|
Correct the problem by doing one of the following:
sqlcode: -925 sqlstate: 2D521 |
SQL0926N |
SQL ROLLBACK invalid for application execution environment. |
ROLLBACK is disallowed in the following cases:
|
sqlcode: -926 sqlstate: 2D521 |
SQL0930N |
There is not enough storage available to process the statement. |
A request was made to the database that required another memory page but no more pages are available to the database manager. The statement cannot be processed. |
Possible solutions include:
If these solutions do not solve the problem, it may be necessary to consider changing the definition of the routine. sqlcode: -930 sqlstate: 5UA0L, 57011 |
SQL0931C |
Operating system file table overflow occurred. Subsequent SQL statements cannot be processed. |
An Operating system limit has been reached. The application program is not permitted to issue additional SQL statements. The database is marked as needing recovery and all applications using the database are prevented from accessing the database. |
Terminate all the applications using the database. Restart the database. To help prevent the problem from recurring:
sqlcode: -931 sqlstate: 58005 |
SQL0949N |
An invalid operating system operation was attempted by a UTL_FILE module routine. Operating system error = error-text. |
The operation attempted by a UTL_FILE module routine caused the operating system to return an error, as indicated in error-text. |
Refer to the operating system error message information to determine how to correct the problem reported by error-text. sqlcode: -949 sqlstate: 58024 |
SQL0950N |
The table or index cannot be dropped because it is currently in use. |
A DROP TABLE or DROP INDEX statement cannot be issued when an open cursor is currently using the table or index. The statement cannot be processed. The table or index is not dropped. |
Close any cursors required and resubmit the statement. sqlcode: -950 sqlstate: 55006 |
SQL0951N |
The object object-name of type object-type cannot be altered because it is currently in use by the same application process. |
An ALTER statement, SET INTEGRITY, or TRUNCATE statement statement for an object cannot be issued when it is either locked or in use. The statement cannot be processed. The object is not altered. |
Close any cursors that depend either directly or indirectly on the object object-name and resubmit the statement. sqlcode: -951 sqlstate: 55007 |
SQL0952N |
Processing was cancelled due to an interrupt. |
The user may have pressed the interrupt key sequence. The statement processing is terminated. Some changes may have been applied to the database, but not committed, before termination occurred. You might also receive this error if Call Level Interface (CLI) issues an interrupt because a query timed out. For example: if an application uses the SQLSetStmtAttr() function to configure the SQL_ATTR_QUERY_TIMEOUT statement attribute to a non-zero value, then if a SQL statement or XQuery expression does not complete in the specified amount of time, CLI will issue an interrupt to cancel the execution and return to the application. Federated system users: this situation can also be detected by the data source. |
Continue the application. If installing the sample database, drop it and install the sample database again. If you want to prevent CLI from issuing an interrupt when a query times out, you can disable query timeout behavior by setting QUERYTIMEOUTINTERVAL=0 in the db2cli.ini file. Disabling query timeout behavior will allow queries run to completion, unless there is a deadlock or lock wait timeout value set at the server. sqlcode: -952 sqlstate: 57014 |
SQL0954C |
Not enough storage is available in the application heap to process the statement. |
All available memory for the application has been used. The statement cannot be processed. |
Terminate the application on receipt of this message. If the applheapsz database configuration parameter is set to AUTOMATIC, you will need to increase either the APPL_MEMORY database configuration setting, or the INSTANCE_MEMORY database manager configuration setting. Otherwise, increase the applheapsz database configuration parameter to allow a larger application heap. When updating configuration parameters, it is recommended to change them by 10% of the current size at a time until the error condition is resolved. To change applheapsz, enter a command similar to the following, which sets applheapsz to size 4000 for database sample:
If all associated configuation parameters are set to either AUTOMATIC or COMPUTED, then the memory demands of the instance exceed the amount of memory configured on the machine. Possible solutions include reducing the database workload, enabling the connection concentrator feature, or adding additional memory to the machine. sqlcode: -954 sqlstate: 57011 |
SQL0955C |
Sort memory cannot be allocated to process the statement. Reason code = reason-code. |
Insufficient virtual memory is available to the database agent for sort processing, as indicated by the reason code:
The statement cannot be processed but other SQL statements might be processed. |
Respond to this message by performing the corresponding action for each reason code:
sqlcode: -955 sqlstate: 57011 |
SQL0956C |
Not enough storage is available in the database heap to process the statement. |
All available memory for the database has been used. The statement cannot be processed. |
Terminate the application on receipt of this message. Increase the dbheap database configuration parameter to allow a larger database heap. If the number of I/O servers is near the high limit, reducing this number might also help. If the dbheap database configuration parameter is set to AUTOMATIC, you will need to increase either the DATABASE_MEMORY database configuration setting, or the INSTANCE_MEMORY database manager configuration setting. When updating configuration parameters, it is recommended to change them by 10% of the current size at a time until the error condition is resolved. To change dbheap, enter a command similar to the following, which sets dbheap to size 2400 for database sample: To change dbheap when disconnected from the database, enter a command similar to the following If all associated configuation parameters are set to either AUTOMATIC or COMPUTED, then the memory demands of the instance exceed the amount of memory configured on the machine. Possible solutions include reducing the database workload, enabling the connection concentrator feature, or adding additional memory to the machine. sqlcode: -956 sqlstate: 57011 |
SQL0958C |
The maximum number of open files has been reached. |
The maximum number of file handles available to the database has been reached. The statement cannot be processed. |
Increase any parameter that affects the maximum number of open files allowed at the location of the database. This includes increasing the configuration parameter ( maxfilop) to allow more file handles for the instance and terminating other sessions to reduce the number of file handles being used. sqlcode: -958 sqlstate: 57009 |
SQL0959C |
Not enough storage is available in the communication heap of the server to process the statement. |
All available memory in the server communication heap has been used. The command or statement cannot be processed. |
Terminate the application on receipt of this message. Increase the size of the communication heap ( comheapsz) parameter in the server workstation database manager configuration file. NOTE: This message is applicable only for releases of DB2 prior toVersion 2 . sqlcode: -959 sqlstate: 57011 |
SQL0960C |
The maximum number of objects have been created in the table spaces with the following names or identifiers table-space-list. |
You cannot create a new object in the table space because the maximum number of objects for the table space has been reached. |
Specify a different table space in which to create the object or table. If the table space is a SYSTEM TEMPORARY table space, there are too many concurrent temporary tables in use. sqlcode: -960 sqlstate: 57011 |
SQL0964C |
The transaction log for the database is full. |
All space in the transaction log is being used. If a circular log with secondary log files is being used, an attempt has been made to allocate and use them. When the file system has no more space, secondary logs cannot be used. If an archive log is used, then the file system has not provided space to contain a new log file. This message can also be returned when the database has used almost all of the possible log sequence numbers. The database manager identifies database log records using a unique identifier, called a log sequence number (LSN). When transactions cause database logs to be written, the database uses new LSN values. The application cannot perform any transactions that cause the database to write log records. The statement cannot be processed. |
Execute a COMMIT or ROLLBACK on receipt of this message (SQLCODE) or retry the operation. If the database is being updated by concurrent applications, retry the operation. Log space may be freed up when another application finishes a transaction. Issue more frequent commit operations. If your transactions are not committed, log space may be freed up when the transactions are committed. When designing an application, consider when to commit the update transactions to prevent a log full condition. If deadlocks are occurring, check for them more frequently. This can be done by decreasing the database configuration parameter DLCHKTIME. This will cause deadlocks to be detected and resolved sooner (by ROLLBACK) which will then free log space. If the condition occurs often, increase the database configuration parameter to allow a larger log file. A larger log file requires more space but reduces the need for applications to retry the operation. Transaction configuration parameters which may need to be adjusted are LOGFILSIZ, LOGPRIMARY, LOGSECOND. If installing the sample database, drop it and install the sample database again. If this message was returned because the database used nearly all of the possible LSN values, you can reset the LSN values to zero by doing the following:
sqlcode: -964 sqlstate: 57011 |
SQL0965W |
There is no message text corresponding to SQL warning SQLCODE in the message file on this workstation. The warning was returned from module name with original tokens token-list. |
Database server returned code SQLCODE to your application. The warning code does not correspond to a message in the DB2 message file on this workstation. |
Refer to your database server documentation for more information about the specified SQLCODE. |
SQL0966N |
The error mapping file name specified in the Database Connection Services directory cannot be found or cannot be opened. |
One of the following conditions is true:
The error mapping data could not be retrieved. |
Release the file from the application in which it is open or reinstall or restore the original file. sqlcode: -966 sqlstate: 57013 |
SQL0967N |
The format of the error mapping file name specified in the Database Connection Services directory is not valid. |
An error occurred while the program was reading the error mapping file. The error mapping data could not be retrieved. |
Correct all syntactic errors in the error mapping file. sqlcode: -967 sqlstate: 55031 |
SQL0968C |
The file system is full. |
One of the file systems containing the database is full. This file system may contain the database directory, the database log files, or a table space container. In a DB2 pureScale environment, if you are adding a member to the database manager instance, there is not enough disk space to create the additional members files. The statement cannot be processed. |
Free system space by erasing unwanted files. Do not erase database files. If additional space is required, it may be necessary to drop tables and indexes identified as not required. On unix-based systems, this disk full condition may be due to exceeding the maximum file size allowed for the current userid. Use the chuser command to update fsize. A reboot may be necessary. This disk full condition may be caused when containers are of varying sizes. If there is sufficient space in the file system, drop the table space and recreate it with containers of equal size. If the statement that could not be processed referenced LOB data types:
In a DB2 pureScale environment, free system space by erasing unwanted files or adding capacity to the file system, then rerun the command. sqlcode: -968 sqlstate: 57011 |
SQL0969N |
There is no message text corresponding to SQL error error in the message file on this workstation. The error was returned from module name with original tokens token-list. |
The Database server returned SQLCODE error to your application. The error code does not correspond to a message in the DB2 message file on this workstation. |
Refer to your database server documentation for information about the specified SQLCODE. Take action specified in the documentation for the database server to fix this problem. Federated system users: isolate the problem to the data source failing the request. Find the error in the applicable manual at the data source. If the problem is data dependent, it may be necessary to examine the data being processed at the data source at the time the error occurred. |
SQL0970N |
The system attempted to write to a read-only file. |
A file used by the database is marked read-only or does not exist. The database requires write access to this file. The statement cannot be processed. |
Terminate the application on receipt of this message (SQLCODE). Ensure that all database files are allowed both read and write access. Check for unnecessary blank spaces within the specified filename. sqlcode: -970 sqlstate: 55009 |
SQL0972N |
The database drive does not contain the correct diskette. |
The diskette in the drive is not the database diskette. The statement cannot be processed. |
Place the required diskette into the drive. Do not remove a diskette if the application starts using a database that resides in it. sqlcode: -972 sqlstate: 57019 |
SQL0973N |
Not enough storage is available in the heap-name heap or stack to process the statement. |
All available memory for this heap has been used. The statement cannot be processed. |
Terminate the application on receipt of this message. Modify the heap-name heap value to increase the heap or stack size. If heap-name is set to AUTOMATIC, increase the appl_memory database configuration setting, the database_memory database configuration settings, or the instance_memory database manager configuration setting. Otherwise, modify the heap-name heap value to increase the heap size. The package cache and catalog cache have soft limits, and for these, you will need to increase the database_memory database configuration setting or the instance_memory database manager configuration setting. If heap-name is set to BigSQL IO, the Big SQL Java reader and writer memory is exceeded (java.lang.OutOfMemoryError or java.lang.StackOverflowError). In this case, the fenced mode process (FMP) managing the JVM is marked as unstable, and a new FMP is created to handle any new requests to the Big SQL Java reader and writer JVM. If this error is being returned frequently, the system might not be configured properly to handle resource requirements. The default maximum memory (-Xmx) for the Java reader and writer FMP is computed as a percentage of instance_memory, so this might need to be increased. Setting the database_memory database configuration parameter to AUTOMATIC directs the database manager to manage database memory automatically. To increase the application shared heap size, increase either the appl_memory database configuration setting, or the instance_memory database manager configuration setting. When updating a configuration parameter, it is good practice to change the value by no more than 10% at a time until the error condition is resolved. For example, suppose that heap-name is util_heap_sz and the database name is TORDB1. To update this database configuration parameter to 10000, run the following command: To view a list of the database configuration parameters, use the GET DATABASE CONFIGURATION command. To update the value of a database manager configuration parameter, say mon_heap_sz to 100, run the following command: To view a list of the database manager configuration parameters, use the GET DATABASE MANAGER CONFIGURATION command. If all associated configuration parameters are set to either AUTOMATIC or COMPUTED, then the memory demands of the instance exceed the amount of memory that is configured on the machine. Possible solutions include reducing the database workload, enabling the connection concentrator feature, or adding more memory to the machine. sqlcode: -973 sqlstate: 57011 |
SQL0974N |
The drive containing the database is locked. |
The system reported that the drive containing the database is locked. The statement cannot be processed. |
Ensure no other processing (for example, CHKDSK) that can lock the drive is occurring on the system. Retry the operation. If installing the sample database, drop it and install the sample database again. sqlcode: -974 sqlstate: 57020 |
SQL0975N |
A new transaction could not be started because database or instance name is quiesced by user username. Quiesce type: type. |
Another user has quiesced the instance or database that you are attempting to use, and no new transactions are allowed until the instance or database is no longer in the quiesced state. Quiesce type type refers to the instance or database already quiesced and is a '1' for an instance and a '2' for a database. |
Contact the user who currently has the instance or database quiesced to determine when the instance or database will no longer be quiesced, and retry the request at that time. sqlcode: -975 sqlstate: 57046 |
SQL0976N |
The specified I/O device is not ready. |
The I/O device or media is not ready to accept I/O commands. The statement cannot be processed. User Respose: Ensure the I/O device or media is ready and retry the operation. |
sqlcode: -976 sqlstate: 57021 |
SQL0977N |
COMMIT state unknown. |
The tm_database has become unavailable during COMMIT processing, and this has caused the result of the COMMIT to be unknown. Resynchronization of the databases will occur when the tm_database becomes available. Note that the transaction may be rolled back during resynchronization. Further execution of SQL statements can safely occur, however locks might be held until the resynchronization process is complete. |
Verify that the connection to the tm_database can be made, for example by using CLP. If it cannot be made, follow the necessary actions for the SQLCODE returned to ensure that a connection can be established. sqlcode: -977 sqlstate: 40003 |
SQL0978N |
The storage medium is write-protected. |
A write operation was attempted to the database but the database storage medium is write protected. The statement cannot be processed. |
Verify that you are using the correct storage media. Remove write protection from the storage medium, if necessary. sqlcode: -978 sqlstate: 55009 |
SQL0979N |
COMMIT has failed against num databases for an application process running with SYNCPOINT of NONE. The failures include the following database alias and SQLSTATE pairs (a maximum of four can be returned): alias/SQLSTATE1, alias/SQLSTATE2, alias/SQLSTATE3, alias/SQLSTATE4. |
An application was connected to multiple databases, and a COMMIT was issued which failed for one or more of these connections. Federated system users: if one of the failed connections is a federated server database where nicknames are used, then a commit against one of the data sources required for a nickname has failed. |
Depending upon the nature of the application and the data being updated, the user might wish to discontinue the processing being done, log the failure, and issue the appropriate SQL to ensure that the changes intended by the application are consistently reflected across all databases involved. If a full list of databases affected by COMMIT errors could not be returned please refer to the diagnostic log for a full list. sqlcode: -979 sqlstate: 40003 |
SQL0980C |
A disk error occurred. Subsequent SQL statements cannot be processed. |
A disk error occurred that prevented successful execution of the current and subsequent SQL statements. The application program is not permitted to issue additional SQL statements. For example, a recovery routine associated with the application program cannot issue additional SQL statements. The database is marked as needing recovery and all applications using the database are prevented from accessing the database. The statement cannot be processed. |
Record all error information from the SQLCA, if possible. Terminate all applications using the database. Determine if the error is a hardware error. Restart the database. If recovery is not possible, restore the database from a backup copy. If installing the sample database, drop it and install the sample database again. sqlcode: -980 sqlstate: 58005 |
SQL0982N |
A disk error occurred. However, subsequent SQL statements can be processed. |
A disk error occurred during processing of a temporary system file that prevented successful execution of the current SQL statement. However, subsequent SQL statements can be processed. The statement cannot be processed. |
Terminate the application on receipt of this message (SQLCODE). sqlcode: -982 sqlstate: 58004 |
SQL0983N |
The transaction log does not belong to the current database. |
The signature stored in the log file does not match the database dependent signature. This error usually occurs when the user specified that the log file be stored in a directory different from where the database is stored. File redirection can be involved. The statement cannot be processed. |
Resubmit the command with the proper access to the log file. sqlcode: -983 sqlstate: 57036 |
SQL0984C |
COMMIT or ROLLBACK was not successful. Subsequent SQL statements cannot be processed. |
A commit or rollback operation could not be processed successfully because of a system error. The application program is not permitted to issue additional SQL statements. For example, a recovery routine associated with the application program may not issue additional SQL statements. The database is marked as needing recovery and all applications using the database are prevented from accessing the database. The statement cannot be processed. |
Record the message number (SQLCODE) and all SQLCA error information, if possible. Terminate all applications using the database. Restart the database. If installing the sample database, drop it and install the sample database again. If recovery is not possible, restore the database from a backup copy. If trace was active, invoke the Independent Trace Facility at the operating system command prompt. Contact your technical service representative with the following information: Information required:
Federated system users: isolate the problem to the data source failing the request and take the necessary diagnostic steps and database recovery procedures for that data source. The troubleshooting procedures and database recovery procedures for data sources vary, so refer to the applicable data source manuals. sqlcode: -984 sqlstate: 58005 |
SQL0985C |
A file error occurred while processing the database catalogs. The database is not usable. |
The system is unable to recover from an I/O error on a catalog file. The system cannot process any statements using the database. |
Restore the database from a backup copy. If installing the sample database, drop it and install the sample database again. sqlcode: -985 sqlstate: 58005 |
SQL0986N |
A file error occurred while processing a user table. The table is not usable. |
The data in the table is no longer valid. The system cannot process any statements using the table. |
Restore the database from a backup version if the database is inconsistent. If installing the sample database, drop it and install the sample database again. sqlcode: -986 sqlstate: 58004 |
SQL0987C |
The application control shared memory set cannot be allocated. |
The application control shared memory set cannot be allocated. This error is caused by insufficient memory resources for either the database manager or the environment in which its operations are being attempted. Memory resources that can cause this error include:
|
One or more of the following:
sqlcode: -987 sqlstate: 57011 |
SQL0989N |
AFTER trigger trigger-name attempted to modify a row in table table-name that was modified by an SQL data change statement within a FROM clause. |
An SQL data change statement was specified in the FROM clause, but the underlying target base table of the SQL data change statement has an AFTER trigger defined which modifies the same table. This is disallowed. The statement cannot be processed. |
Avoid using the SQL data change statement within a FROM clause, or change the trigger so that it does not modify the table that is the target of the SQL data change statement. sqlcode: -989 sqlstate: 560C3 |
SQL0990C |
An index error occurred. Reorganize the table. |
An index has had considerable activity that used all the free space for indexes. Federated system users: this situation can also be detected by the data source. The statement cannot be processed. |
Commit your work and retry the command. If the error continues, roll back your work. If errors still persist, reorganize the table, if possible. Federated system users: isolate the problem to the data source failing the request and follow the index re-creation procedures for that data source. |
SQL0992C |
The release number of the precompiled program is not valid. |
The release number of the precompiled program (package) is not compatible with the release number of the installed version of the database manager. The precompiled program (package) cannot be used with the current version of the database manager. The command cannot be processed. |
Use only programs that are precompiled with a compatible release level of the database manager. sqlcode: -992 sqlstate: 51008 |
SQL0993W |
The new path to the log (newlogpath) in the database configuration file is not valid. |
The path to the log file is not valid for one of the following reasons:
The requested change is not made. |
To change the path to the log file, submit a database configuration command with a valid value. sqlcode: +993 sqlstate: 01562 |
SQL0994N |
Invalid usage of the application savepoint. |
The application savepoint function has been used inconsistently. The program attempted to perform one of the following:
The function cannot be processed. |
Correct the savepoint usage in the program. |
SQL0995W |
The current path to the log file (logpath) is not valid. The log file path is reset to the default. |
The path to the log file is not valid for one of the following reasons:
For circular logging, the log file is created in the default log path. For archive logging, the next log file is created in the default log path. The requested change is not made. |
To change the path to the log file, submit a configuration command with a valid value. sqlcode: +995 sqlstate: 01563 |
SQL0996N |
Cannot free pages for an object in a table space. |
There are corrupted internal database pages or internal logic errors in a table space. |
Discontinue use of the object or table space. Contact IBM service to inspect the object and the table space. sqlcode: -996 sqlstate: 58035 |
SQL0997W |
General informational message for transaction processing. Reason Code = XA-reason-code. |
The SQLCODE 997 is only passed between components of the database manager and will not be returned to an application. It is used to carry XA return codes for non-error situations. The possible reason codes are:
|
No action required. |
SQL0998N |
Error occurred during transaction or heuristic processing. Reason Code = reason-code. Subcode = subcode. |
An error is detected when processing a distributed transaction. The transaction is:
The possible reason codes (corresponding X/Open XA reason codes are shown in parenthesis) are:
|
For reason codes 1 through 8, an entry will be made in the system log because sometimes the SQLCA cannot be returned to the caller. If the error is due to a failed data source associated with a nickname, the location of the failed data source will always appear in federated server's system log. For reason code 4, verify the content of the xa open string and make necessary corrections. For reason code 4, subcode 11, ensure xa_config file exists in $SYBASE/$SYBASE_OCS directory and the LRM name that is specified as the NODE server option exists in the file. For reason code 9, subcode 02, ensure that the tp_mon_name configuration parameter contains the name of the dynamic library in the external product which has the ax_reg() function used for dynamic registration of transactions. For reason code 14, ensure that the MSDTC service is active. For reason code 15, this error may occur when the MSDTC transaction timeout value is too low. Increase the timeout value and see if the error continues. For reason code 16:
For reason code 35, you attempted to perform a heuristic operation against a database that only participates as a read-only resource manager in a global transaction. Examples are any DRDA databases such as DB2 on MVS. These type of non-XA databases would not have any XA indoubt transactions. For reason codes 36, 37, and 38, you attempted to perform an invalid heuristic operation on an indoubt transaction. Either you specified the wrong XID, or a heuristic or resync operation had taken place since you recorded this XID. Perform a Heuristic Query request to get the current list of indoubt transactions to verify if you still need to perform your heuristic operation. For reason code 39, the XID specified is for a transaction that has ended and is waiting for the two-phase commit process to begin. You can only perform heuristic operations on transactions that have entered the two-phase commit process and become indoubt transactions. For reason code 40, an SQL statement was attempted under a transaction which has failed. An example of this is to attempt an SQL statement in a transaction thread that has successfully registered after a tightly coupled thread participating in the same transaction has abnormally terminated. For reason code 41, you can find more information about the problem in the administration notification log. You need to restart the database manager on the failed nodes. It may be necessary to contact the system administrator for assistance. For reason code 42, an outbound connection can be established by modifying the gateway catalogs to use TCPIP communication protocol. For reason code 43, if connecting to DB2 for z/OS server or DB2 for i server, catalog the database using DB2 Connect and then start the sync point manager. For reason code 69, either the transaction manager (TM) database or the resource manager (RM) database or both are different from the ones when the indoubt transaction was generated. In other words, the TM database or RM database names could be referencing different database instances. The log ID mismatch may be caused by the following reasons:
For reason code 85, you are updating multiple data sources, and some of the data sources have been heuristically rolled back or committed, resulting in the transaction having partially committed and rolled back. With this reason code data is now in an inconsistent state, you must manually check every data source updated by the transaction to correct the data. For reason code 210, some of the nodes are already in commit state. You have to perform heuristic commit to resolve the indoubt transaction. For reason code 221, ensure all applications that participate in the same XA transaction use the same user ID to connect to the database. For reason code 222, ensure all applications that participate in the same XA transaction have the same CCSID. For reason code 223, modify the application and client set-up to use local clients, or for remote clients use TCPIP as the communication protocol to connect to the gateway. For reason code 224, update the client to version 7.1 or later. For reason code 225, ensure the application did not contain any of the invalid operations in an XA Loosely Coupled Transaction. Common application server environments where XA Loosely Coupled Transaction can be used are IBM Encina Transaction Server, IBM WebSphere Application Server, Microsoft Transaction Server, and BEA Tuxedo. If you encounter this reason code, then you must review your application and ensure none of the indicated actions are performed. For reason code 226, the transaction has reached a rollback state, and is now rolled back on this node. For reason code 227, heuristic request should be run on the coordinator node, see the db2diag log file for the coordinator node number. For reason code 228, ensure that the cursors are closed prior to issuing the request. For reason code 229, ensure that the previous transaction is complete prior to issuing the request. For reason code 230, the transaction has already been committed. General information collection procedure: If you cannot resolve the problem identified by the reason codes, record the message number (SQLCODE), reason code, and the optional subcode in the message or the SQLCA in the system log. If the failure is from a federated database, you should also record the location of the failed data source found in the federated server's system log. If trace was active, invoke the Independent Trace Facility at the operating system command prompt. Then, contact your technical service representative with the following information:
There might be additional information in the console or message logs of the transaction manager and the database manager. sqlcode: -998 sqlstate: 58005 |