SQLCODEs -084 through -30090 are associated with error conditions. The SQLCODE descriptive text identified for these SQLCODEs is displayed as continuation lines for message ARI0503E.
-084 | Unacceptable SQL statement. |
Explanation: |This SQL statement is unacceptable to DB2. One of the |following has occurred:
System Action: Processing of the SQL statement has ended.
User Response: |If the situation involves an invalid use of the SQL CALL statement, |correct the statement. Try again.
|If the situation involves an invalid PREPARE of an ALLOCATE CURSOR |statement, change the application program to use a statement identifier that |is not associated with a declared cursor.
-101 | SQL statement is greater than 8192 positions or is greater than an internal limitation of the system. Separate SQL statement into smaller statements. |
Explanation: The SQL statement has caused an internal limitation of the database manager to be exceeded. By examining the SQLERRP of the SQLCA, you can determine the nature of the exceeded limitation. See the following list:
Exceeded maximum number of 200 predicates in an SQL query block (WHERE or HAVING clause). The SQLERRD1 code for this second reason is -110.
If a SQLERRP is not shown in the preceding list, or SQLERRD1 = -199, the explanation is:
When an SQL statement is found to be too complex, the complexity caused DB2 Server for VM internal storage or table limits to be exceeded. Possible causes for such complexity are if the command:
SQLSTATE 54001.
System Action: Processing of this SQL statement ends.
User Response: Either break the SQL statement into smaller statements or try to remove unnecessary conditions in the statement.
Explanation: The SQL statement contains a string constant whose length exceeds the allowed maximum of 254 bytes. When determining the length of this string constant, it is necessary to count each EBCDIC character as one byte and each graphic character as two bytes. A hexadecimal constant has a maximum of 254 numbers, which result as 127 bytes. The beginning graphic delimiter (shift-out) and the ending graphic delimiter (shift-in) each count as one byte.
SQLSTATE 54002.
System Action: If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: Decrease the length of the constant string and rerun.
-103 | Statement contains the incorrect floating point number number. |
Explanation: A floating-point number did not end with a digit (exponent). For example, 12E is not correct, but 12E0 is correct.
SQLSTATE 42604.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-104 | A portion of the SQL statement is incorrect following or involving string. |
Explanation: The portion of the SQL statement shown in string is incorrect.
Some of the possible causes are:
A portion of the SQL statement is incorrect following or involving DESCRIBE/ USING-descriptor.
A portion of the SQL statement is incorrect following or involving missing SQL statement in PREPARE/EXEC.
A portion of the SQL statement is incorrect following or involving a literal, or a host variable is too long.
A portion of the SQL statement is incorrect following or involving illegal format or length of SQL statement literal.
A portion of the SQL statement is incorrect following or involving the semicolon (;).
A portion of the SQL statement is incorrect following or involving a missing semicolon (;).
A portion of the SQL statement is incorrect following or involving an integer number that is larger than the maximum allowable number.
SQLSTATEs:
System Action: Processing of this SQL statement has ended.
User Response: Check the SQL statement for all errors. Correct the statement and resubmit it.
-105 | Either string1 string2 or the text that follows is an incorrect sequence of words or symbols, or string2 is an incorrect or reserved keyword. |
Explanation: The SQL statement does not follow the rules for the statement type. The symbols printed in the message show where the error was encountered. string2 is not allowed to appear in the statement in the position where it was found. If either string1 or string2 was enclosed in double quotation marks ("), the double-quote characters do not appear in the message. If the symbol is a hexadecimal literal, it is not shown. (It is replaced by "X....".) If string1 or string2 appears as :H or a question mark (?), that string refers to a host variable, a field of a host structure, or an element of an indicator array found within the SQL statement. Strings of more than 34 characters may be truncated in the message.
SQLSTATE 42601.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-106 | SQL statement begins properly but is incomplete. |
Explanation: 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.
SQLSTATEs:
System Action: Processing of this SQL statement has ended.
User Response: 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.
-107 | The name name is too long. Maximum allowable size is size. |
Explanation:
One of the following has occurred:
SQLSTATE 42622.
System Action: If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: Shorten the length of the name and rerun.
-108 | The following user ID, password, server name, or host variable does not have the proper length: name. |
Explanation: If name was an application program host variable, the declared length of name was not exactly 8 bytes (or 9 bytes in C) for the user ID or password, or was longer than 18 bytes (or 19 bytes in C) for a server name. If name was not a host variable, either the value specified exceeded 8 bytes for a user ID or password, or exceeded 18 bytes for a server name.
SQLSTATE 42622.
System Action: Processing of the SQL statement ends.
User Response: Correct the statement. Try again.
-109 | You must provide an INTO clause on the SELECT statement or the FETCH statement. |
Explanation: An INTO clause is needed for a SELECT statement if written in an application program. The INTO clause may appear in the SELECT statement itself, or in a FETCH statement if the SELECT statement was specified within a DECLARE CURSOR statement
SQLSTATE 42601.
System Action: Processing of this SQL statement has ended.
User Response: Supply an INTO clause and re-preprocess the program.
-110 | The following incorrect function was specified: function-type. |
Explanation: The function specified is not known to the DB2 Server for VM product. Refer to the DB2 Server for VSE & VM SQL Reference manual for a complete list and description of column and scalar functions.
SQLSTATE 42601.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-111 | A SELECT, HAVING, or WHERE clause contains a column function without an associated column name. |
Explanation: A SELECT, HAVING, or WHERE clause contains a column function that should be associated with a column name. Refer to the DB2 Server for VSE & VM SQL Reference manual for a complete list and description of column and scalar functions.
SQLSTATE 42901.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-112 | A column function was used incorrectly. Either a column function is nested in a column function, or DISTINCT is used with an expression. |
Explanation: One of the following has occurred:
Refer to the DB2 Server for VSE & VM SQL Reference manual for a complete list and description of column functions.
SQLSTATE 42607.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-114 | The server name portion of server-name1.creator.object does not match the name of the connected application server server-name2. |
Explanation: The code is used to report that the server name part (standalone or qualifying a column) does not match the name of the connected application server. This code is returned either when the statement is being executed, or when the program is being preprocessed with the EXIST option.
SQLSTATE 42961.
System Action: Processing of the SQL statement has ended.
User Response: Correct server-name2 or use the ERROR preprocessing option and try again. If the statement is an SQL CALL, an SQL CONNECT may need to be issued to the server server-name1 before issuing the SQL CALL statement.
-115 | The comparison operator, operator, was used incorrectly. Follow SOME, ANY, or ALL with a subselect. Follow IN or NOT IN with a subselect or a list. |
Explanation: One of the following has occurred:
SQLSTATE 42601.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-116 | The length of the following label is greater than 30 bytes: label. |
Explanation: The length of the label for a column or table exceeds the maximum of 30 bytes. Only the first 30 bytes are displayed.
SQLSTATE 42622.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement and try it again.
-117 | The number of data values to be inserted does not equal the number of columns specified or implied. |
Explanation: The number of data values on an INSERT statement must equal the number of columns to be updated. Either too many or too few data values were listed for the columns specified or implied.
This SQLCODE can be produced during re-preprocessing of a package, when the number of columns that a table contained has been changed.
It can also be returned when either the statement is being executed, or when the program is being preprocessed with the EXIST option.
SQLSTATE 42802.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-118 | A table to be modified cannot be referenced in the subquery. |
Explanation: You cannot change (INSERT, DELETE or UPDATE) a table while naming it in the FROM clause of a SELECT (subquery) used in the same SQL statement.
SQLSTATE 42902.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-119 | An item in a SELECT clause or in a HAVING clause was neither a column function nor a column in the GROUP BY clause. |
Explanation: One of the following has occurred:
SELECT DEPTNO, DEPTNAME, AVG(SAL) FROM EMPLOYEE GROUP BY DEPTNO
It should be:
SELECT DEPTNO, DEPTNAME, AVG(SAL) FROM EMPLOYEE GROUP BY DEPTNO, DEPTNAME
SELECT DEPTNO, AVG(SAL) FROM EMPLOYEE GROUP BY DEPTNO HAVING SAL > 10000
It should be:
SELECT DEPTNO, AVG(SAL) FROM EMPLOYEE GROUP BY DEPTNO HAVING AVG(SAL) > 10000
SAL > 10000 is incorrect because SAL is not part of the selected groups. Each group in the answer set only contains an AVG(SAL).
AVG(AGE) + SENIORITY.
Refer to the DB2 Server for VSE & VM SQL Reference manual for a complete list and description of column and scalar functions.
SQLSTATE 42803.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
Explanation: One of the following has occurred:
The following are invalid queries:
SELECT ENAME FROM EMP WHERE AGE=MAX(AGE) SELECT * FROM T0 WHERE T0.B = (SELECT SUM(T1.D) FROM T1 GROUP BY T1.C HAVING SUM(T1.D) = (SELECT MIN(T2.F) FROM T2 GROUP BY T2.E HAVING MIN(T0.A) = T2.E))
SELECT * FROM T0 WHERE T0.B = (SELECT SUM(T1.D) FROM T1 GROUP BY T1.C HAVING SUM(T1.D) = (SELECT T2.F FROM T2 WHERE MIN(T0.A) = T2.E))The following are valid queries:
SELECT MAX(AGE) FROM EMP GROUP BY ENAME HAVING MAX(AGE) > 1
SELECT SUM(T1.D) FROM T1 GROUP BY T1.C HAVING SUM(T1.D) = (SELECT MIN(T2.F) FROM T2 GROUP BY T2.E HAVING MIN(T1.A) = T2.E)
SELECT SUM(T1.D) FROM T1 GROUP BY T1.C HAVING SUM(T1.D) = (SELECT T2.F FROM T2 WHERE MIN(T1.A) = T2.E))
SELECT SUM(T0.B) FROM T0 GROUP BY T0.BB HAVING SUM(T0.B) = (SELECT SUM(T1.D) FROM T1 GROUP BY T1.C HAVING SUM(T1.D) = (SELECT MIN(T2.F) FROM T2 GROUP BY T2.E HAVING MIN(T0.A) = T2.E))
SELECT SUM(T0.B) FROM T0 GROUP BY T0.BB HAVING SUM(T0.B) = (SELECT SUM(T1.D) FROM T1 GROUP BY T1.C HAVING SUM(T1.D) = (SELECT T2.F FROM T2 WHERE MIN(T0.A) = T2.E))Column functions cannot be contained in the SET-CLAUSE for column updates. Thus, the following is not allowed:
UPDATE EMP SET SAL=MAX(SAL) (invalid)
Refer to the DB2 Server for VSE & VM SQL Reference manual for a complete list and description of column and scalar functions.
SQLSTATE 42903.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-121 | You cannot apply an INSERT or UPDATE to the same column more than once in the same statement. |
Explanation: An attempt was made to change the same column in a table more than once in the same statement.
SQLSTATE 42701.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-124 | More than 16 columns were used in an ORDER BY clause. |
Explanation: The maximum number of columns in an ORDER BY clause is 16.
SQLSTATE 54005.
System Action: Processing of the SQL statement has ended.
User Response: Decrease the number of columns in the ORDER BY clause to sixteen or fewer and resubmit the statement.
-125 | The statement contains ORDER BY column-number. The ORDER BY clause does not correspond to a column in the SELECT clause. |
Explanation: The SQL statement contains an ORDER BY column which does not point to a valid column in the SELECT clause.
SQLSTATE 42805.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-126 | A column to be updated is specified in the ORDER BY clause. |
Explanation: The SQL query contains both a FOR UPDATE OF clause and an ORDER BY clause for the same column. The FOR UPDATE OF clause may have been appended when the NOFOR support was invoked.
SQLSTATE 42829.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-127 | DISTINCT is specified more than once in a query or subquery. |
Explanation: The SQL statement contains the keyword DISTINCT more than once in the SELECT clause or HAVING clause.
SQLSTATE 42905.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-128 | The keyword, NULL, cannot be used as a data value in a WHERE clause. |
Explanation: The NULL predicate was used as a data value in a data items list associated with a search condition predicate. This is not allowed. For example, the following statement is incorrect:
SELECT * FROM SAMPLE WHERE PARTNO IN ('SMITH',NULL,'JONES')
It should be:
SELECT * FROM SAMPLE WHERE PARTNO IN ('SMITH','JONES') OR PARTNO IS NULL
SQLSTATE 42601.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-129 | SQL statement contains too many string. |
Explanation: The string that may appear here is listed below along with the allowed associated limits:
SQL statement contains too many input host variable names.
INPUT HOST VARIABLE NAMES - 4096 (CHARACTERS)
SQL statement contains too many output host variable names.
OUTPUT HOST VARIABLE NAMES - 4096 (CHARACTERS)
SQL statement contains too many input host variables.
INPUT HOST VARIABLES - 256
SQL statement contains too many output host variables.
OUTPUT HOST VARIABLES - 256
SQL statement contains too many table names.
TABLE NAMES - 15
SQL statement contains too many selected columns.
SELECTED COLUMNS - 255
SQL statement contains too many cursor references.
CURSOR REFERENCES - 512
SQL statement contains too many CCSID overrides.
CCSID OVERRIDES - 80
Format 9
SQL statement contains too many host identifiers.
HOST IDENTIFIERS - 512
Note: | For Format 8, the 80 associated with CCSID OVERRIDES refers to the number of UNIQUE combinations of CCSID and data type. If you override the same data type with the same CCSID for several different host variables or table columns, this constitutes one override only. |
System Action: Processing of the SQL statement ends.
If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: For Formats 1 through 7, correct the statement and try again. For Format 8, the correct user response is determined by the cause of the error.
To determine which columns have overrides, SELECT the CCSID column from the SYSTEM.SYSCOLUMNS catalog table for each column in your query. Those that differ from the application server defaults are overrides. The CCSID information for columns can also be obtained from the SQLDA returned by a DESCRIBE operation. For more information on CCSIDs, see the DB2 Server for VM System Administration manual.
-130 | A subquery was not enclosed in parentheses. |
Explanation: A subquery in the SQL statement is not enclosed in parenthesis.
SQLSTATE 42601.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-131 | Either the LIKE predicate has an invalid escape character, or the string pattern contains an invalid occurrence of the escape character. |
Explanation: For "column-name LIKE pattern", the escape character can only appear in the character pattern if followed by itself, %, or _. You cannot use the escape character when the column is defined as mixed data, or the pattern is valid mixed data.
SQLSTATEs:.
System Action: Processing of the SQL statement has ended.
Programmer Response: Correct the string pattern, or choose a different ESCAPE character and change the pattern accordingly.
-132 | LIKE or NOT LIKE is used incorrectly. You must precede it with a column name and follow it with either a quoted string, an input variable, or the special register USER. |
Explanation: LIKE or NOT LIKE is incorrectly specified. In x [NOT] LIKE y, x must be a column name and y must be in quotation marks.
If x appears in a WHERE clause when updating or deleting from a view, it must not be derived from an expression, a constant, or a scalar function in a VIEW definition.
SQLSTATE 42824.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-133 | You must use a column name, rather than an expression, as the argument of a column function when that column is a correlated reference column in a WHERE clause or HAVING clause. |
Explanation: The argument of a column function in a WHERE clause or HAVING clause cannot be an expression involving a correlated reference column; the argument must be a column only. The following example is incorrect:
SELECT DEPT,SUM(YEARS) FROM STAFF X GROUP BY DEPT HAVING SUM(YEARS) > ANY (SELECT AVG(YEARS) FROM STAFF GROUP BY DEPT HAVING MAX(YEARS) > MIN(1*X.YEARS))
The expression (1*X.YEARS) must not be the argument of the column function MIN. Refer to the DB2 Server for VSE & VM SQL Reference manual for a complete list and description of column and scalar functions.
SQLSTATE 42906.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-134 | Improper use of the long string column column-name. |
Explanation: The SQL statement references a long string column improperly. The following items are not allowed:
If it is none of the items listed above, it may be a long string column that is in a base table for a view that must be materialized in order to process the SQL statement. View materialization is explained in the DB2 Server for VSE & VM Database Administration manual.
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.
Another format for this code is:
Format 2
System Action: Processing of the SQL statement has ended.
User Response: The use of long strings is described in the DB2 Server for VSE & VM Application Programming manual. If you diagnose it as a view materialization restriction, define a view that does not include the long string column. Correct the statement. Try again.
-135 | 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. |
Explanation: 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.
SQLSTATE 56033.
User Response: Refer to the DB2 Server for VSE & VM Application Programming manual for information on the use of long strings. Correct the statement. Try again.
-136 | A package name consisting of more than two parts is not supported. |
Explanation: A name consisting of more than two parts was used for the package name of a DROP PACKAGE or an extended dynamic SQL statement. This is not supported.
SQLSTATE 56048.
System Action: Processing of the SQL statement ends.
User Response: Correct the statement. Try again.
-137 | The length resulting from operation is greater than size. |
Explanation: The specified scalar operation operation gave a result whose length was greater than the acceptable maximum, size.
SQLSTATE 54006.
System Action: Processing of the SQL statement has ended.
Programmer Response: Correct the statement. Try again.
-140 | The WITH CHECK OPTION cannot be used for the specified view. |
Explanation: The WITH CHECK OPTION cannot be used in a view definition under the following circumstances:
SQLSTATE 42813.
System Action: The statement cannot be processed. The specified view was not created.
User Response: Refer to the DB2 Server for VSE & VM SQL Reference manual for rules regarding the use of the WITH CHECK OPTION in the view definition.
-141 | The INSERT or UPDATE is not allowed because a resulting row does not satisfy the view definition. |
Explanation: The WITH CHECK OPTION was specified in the definition of the view (or on at least one of the views on which this view is based), that is the object of the INSERT or UPDATE statement. Consequently, all attempts to insert or update in that view are checked to ensure that the results conform to the view definition.
SQLSTATE 44000.
System Action: The statement cannot be processed. No inserts or updates were performed, and the contents of the object view (and underlying base table) remain unchanged.
User Response: Examine the view definition to determine why the requested INSERT or UPDATE was rejected.
-144 | Invalid section number. |
Explanation: The specified section number is invalid for one of the following reasons:
SQLSTATE 58003.
System Action: The preprocessing of the program ends. No package is created.
User Response: Do not continue further processing. Notify your system programmer of this distribution protocol error.
-149 | The view cannot be used to modify data because it is based on more than one table. |
Explanation: INSERT, DELETE, or UPDATE of a view is not permitted if the VIEW is based on more than one table.
SQLSTATE 42807.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-151 | A column of a view cannot be updated because it is derived from an expression. |
Explanation: A column of a view may be updated only if derived directly from a column of a base table.
SQLSTATE 42808.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-153 | You must specify a COLUMN name-list in the CREATE VIEW statement because a view column name is derived from an expression or a built-in function. |
Explanation: When a view column is not derived directly from a column (for example, from an expression or function), a column name-list must be supplied in the CREATE VIEW statement.
Refer to the DB2 Server for VSE & VM SQL Reference manual for a complete list and description of column and scalar functions.
SQLSTATE 42908.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-154 | View limitations do not allow you to use the following operation: operation. |
Explanation: Certain limitations exist when creating views:
View limitations do not allow you to use either of the following operations: GROUP-BY or DISTINCT.
View limitations do not allow you to use the following operation: INPUT VARIABLES.
View limitations do not allow you to use the following operation: CURSOR REFERENCE.
View limitations do not allow you to use the following operation: UNION in views.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-157 | View owner.view-name cannot be identified in a foreign key clause. |
Explanation: The indicated view was identified in a FOREIGN KEY clause of a CREATE or ALTER TABLE statement. A FOREIGN KEY clause must identify a table, not a view.
SQLSTATE 42810.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-158 | The CREATE VIEW statement failed. The number of entries in the COLUMN name-list is not equal to the number of items in the SELECT clause. |
Explanation: If a column name-list is specified on a CREATE VIEW statement, the number of column name-list entries (or view column names) must be equal to the number of columns in the SELECT clause defining the view. For example, the following command is not correct:
CREATE VIEW SAMPLE (SAMP1) AS SELECT SUPPNO, PARTNO FROM QUOTATIONS
SQLSTATE 42811.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement so that the number of columns specified in the column name-list for the view is equal to the number of columns in the SELECT clause.
-159 | The following clause, keyword, or name was expected, but not found in the SQL statement: string. |
Explanation: A required keyword was incorrectly specified or was omitted from the SQL statement. Some specific examples of this error are:
The following clause, keyword, or name was expected, but not found in the SQL statement: IN clause.
The following clause, keyword, or name was expected, but not found in the SQL statement: USING descriptor or FROM clause.
The following clause, keyword, or name was expected, but not found in the SQL statement: USING descriptor.
The following clause, keyword, or name was expected, but not found in the SQL statement: SETTING clause.
The following clause, keyword, or name was expected, but not found in the SQL statement: SETTING or FOR clause.
The following clause, keyword, or name was expected, but not found in the SQL statement: FROM clause.
The following clause, keyword, or name was expected, but not found in the SQL statement: DESCRIPTOR keyword.
The following clause, keyword, or name was expected, but not found in the SQL statement: SET QUERYNO.
The following clause, keyword, or name was expected, but not found in the SQL statement: host variable or string constant in FROM clause.
The following clause, keyword, or name was expected, but not found in the SQL statement: LANGUAGE.
The following clause, keyword, or name was expected, but not found in the SQL statement: EXTERNAL.
The following clause, keyword, or name was expected, but not found in the SQL statement: SERVER GROUP.
System Action: If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: Correct the statement to use the proper form of the PREPARE statement and rerun.
-160 | Use or value of string1 is inconsistent with the use or value of string2 in this statement. |
Explanation: The user specification included parts of an SQL statement that are not allowed to coexist with each other. Usually this is a result of using syntax that is an incorrect mixture of two forms of an SQL statement. Some specific examples of this condition are:
Use of FETCH is inconsistent with the use of non-SELECT statement in this statement.
Note: | The following is an example of where this can occur:
stmt1='DROP TABLE FRED'; PREPARE STMT1 FROM :stmt1; DECLARE CURSOR c1 CURSOR FOR STMT1; OPEN c1; FETCH c1 USING DESCRIPTOR :SQLDA; |
Use of PUT is inconsistent with the use of non-INSERT statement in this statement.
Note: | PUT cannot be executed against any statement but an INSERT. This is similar to Format 1. |
Use of the USING host variable clause is inconsistent with the use of DECLARE CURSOR FOR INSERT in this statement.
Note: | The USING clause cannot appear in the OPEN statement for an insert-cursor. |
Use of OPEN with cursor name host variable is inconsistent with the use of USING host variable list in this statement.
Note: | An Extended OPEN must not use a host variable list (an SQLDA is
needed).
PREPARE s1 FROM 'SELECT * FROM t1 WHERE c1=?'; DECLARE c1 CURSOR FOR s1; OPEN :cur USING :hv1; |
Use of OPEN with the cursor name host variable is inconsistent with the use of the input variable in DECLARE CURSOR FOR SELECT in this statement.
Use of statement name is inconsistent with the use of IN clause in this statement.
Note: | An IN package-tag clause is not supported in a non-Extended EXECUTE, a non-Extended DECLARE CURSOR, or a non-Extended DESCRIBE statement. These statements are recognized as being Extended by virtue of the fact that package section is identified by a host variable. |
Use of USING with the host variable list is inconsistent with the use of Extended EXECUTE in this statement.
Note: | An Extended EXECUTE must not use a host variable list ( an SQLDA is needed). |
Use of the USING clause or FROM clause is inconsistent with the use of the non-Dynamic PUT statement in this statement.
Note: | A PUT statement that is linked to a static INSERT statement may not have either a FROM clause or a USING clause. |
Use of FETCH is inconsistent with the use of DECLARE CURSOR FOR INSERT in this statement.
Note: | This differs from Format 1 in that it is for static cursors, and is caught at program run time. |
Use of FETCH with cursor name host variable is inconsistent with the use of INTO clause in this statement.
Note: | An Extended FETCH must not use a host variable list (an SQLDA is needed). |
Use of cursor for SELECT is inconsistent with the use of cursor name host variable in this statement.
Note: | A static DECLARE CURSOR statement cannot exist with a host variable cursor
name.
DECLARE :cur CURSOR FOR SELECT * FROM t1; |
Use of CURSOR FOR INSERT is inconsistent with the use of cursor name host variable in this statement.
Note: | A static DECLARE CURSOR cannot exist with a host variable cursor name.
DECLARE :cur CURSOR FOR INSERT INTO t1 VALUES ('a', 'b'); |
Use of cursor name constant is inconsistent with the use of statement ID in this statement.
Note: | In an Extended DECLARE CURSOR, the cursor name must be a host variable. |
Use of statement name is inconsistent with the use of cursor name host variable in this statement.
Note: | In an Extended DECLARE CURSOR a section-number host variable is required. A non-host variable statement name was provided instead. |
Use of NEW is inconsistent with the use of KEEP/REVOKE in this statement.
CREATE PROGRAM PACK1 USING OPTIONS NEW, KEEP
Use of EXECUTE is inconsistent with the use of SELECT in this statement.
Note: | This is raised when a dynamic EXECUTE is issued against a SELECT section. It is not issued when an Extended EXECUTE without an OUTPUT DESCRIPTOR is issued against a SELECT section. |
Use of FROM NULL is inconsistent with the use of PREPARE SINGLE ROW in this statement.
PREPARE SINGLE ROW FROM NULL
Use of FOR is inconsistent with the use of PREPARE SINGLE ROW in this statement.
PREPARE SINGLE ROW FROM :hv1 FOR :hv2
Use of OUTPUT descriptor is inconsistent with the use of statement name in this statement.
Note: | This is issued when a non-Extended EXECUTE statement contains an OUTPUT
DESCRIPTOR clause.
EXECUTE s1 USING OUTPUT DESCRIPTOR SQLDA |
Use of value is inconsistent with the use of EXPLAIN in this statement.
value = ALL REFERENCE STRUCTURE COST PLAN
Use of PUT is inconsistent with the use of DECLARE CURSOR for SELECT in this statement.
Note: | Similar to Format 9. |
Use of CHECK/ERROR is inconsistent with the use of MODIFY in this statement.
Use of EXECUTE is inconsistent with the use of blocked INSERT in this statement.
Use or value of SERVER GROUP is inconsistent with the use or value of DEFAULT SERVER GROUP in this statement.
Use or value of COMMIT ON RETURN is inconsistent with the use or value of RESULT SETS in this statement.
System Action: If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: Check the syntactical forms of the statement, correct the inconsistencies, and repreprocess the program or repeat the function.
-161 | You specified more than one alternative of the option option or else you specified the option more than once. |
Explanation: When options were offered, you chose more than one. You can select only one. Specifically, the following errors cause this message:
SQLSTATE 42853.
System Action: If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: Choose only one of the alternatives, or choose it only once. Repeat the run. Refer to the DB2 Server for VSE & VM SQL Reference manual for information about related options.
-162 | A name-type name is missing, is too long, or contains incorrect characters. |
Explanation: SQL names must start with an alphabetic character (A-Z) or national character (@, #, $) and may follow with these alphabetic characters, national characters, numbers (0-9), or underscore (_). Ordinary identifiers (table names, column names, dbspace names, etc.), cursor names, and statement names are limited to a length of 18 characters. Authorization names, passwords, and package names are limited to 8 characters. When authorization names or passwords are specified as host variables, they are fixed-length character variables of length 8 (or length 9 in C), padded on the right with blanks.
This message indicates a violation of the above rules for identifier contents or length, or the omission of an identifier of the indicated type.
Other formats of this code include:
A cursor name is missing, is too long, or contains incorrect characters.
Either a user ID or a package name is missing, is too long, or contains incorrect characters.
Either a user ID or a package name is missing, is too long, or contains incorrect characters.
A statement name is missing, is too long, or contains incorrect characters.
A user ID is missing, is too long, or contains incorrect characters.
A package name is missing, is too long, or contains incorrect characters.
A qualifier or field name is missing, is too long, or contains incorrect characters.
System Action: If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: Correct the error in the specification of the identifier and repreprocess the program or repeat the function.
-163 | A host variable is not allowed in this SQL statement. |
Explanation: This particular SQL statement does not support the use of a host variable specification. In particular, the DROP PACKAGE statement permits a host variable name for the specification of the target program name, but other DROP statements require that you specify a constant for the name of the entity that is to be dropped.
SQLSTATE 42618.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-164 | A graphic constant was not ended correctly. |
Explanation: All graphic constants must be started and ended with the proper shift-out and shift-in characters. The SQL form of graphic constant is:
G'so...data...si' or N'so...data...si'
This form can be used in SQL statements, COBOL programs, and DBS Utility.
If this error occurred in a COBOL program or in DBS Utility, a graphic constant was started properly with G' so or N' so and the terminating si was found, but the si was not followed by an ending quote.
In a PL/I program, a graphic constant was started properly, but was not ended properly. The correct formats for a PL/I graphic constant are (format 1):
soX'427D'...data...X'427D42C7'si
or (format 2):
'so...data...si'G or 'so...data...si'N
SQLSTATE 42604.
System Action: If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: Correct the error in the specification of the constant and repreprocess the program or repeat the function.
-165 | You cannot have leading or trailing blanks in a delimited identifier. |
Explanation: You have entered a delimited identifier ("......") that contains either leading blanks, trailing blanks, or all blanks within the double quotes.
SQLSTATE 42602.
System Action: If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: Correct the statement. Try again.
-166 | A graphic constant began incorrectly. |
Explanation: All graphic constants must be started and ended with the proper shift-out and shift-in characters. The SQL form of graphic constant is:
G'so...data...si' or N'so...data...si'
This form can be used in ISQL, COBOL programs, and DBS Utility. In these situations, a graphic constant was started with G', or with N', but a so character was not found following it.
In a PL/I program, a graphic constant was started improperly. For instance, the SQL form was used (G'so...data...si' or N'so...data...si'). The correct formats for a PL/I graphic constant are (format 1):
soX'427D'...data...X'427D42C7'si
or (format 2):
'so...data...si'G or 'so...data...si'N
SQLSTATE 42604.
System Action: If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: Correct the statement. Try again.
-167 | You specified either an odd number of hexadecimal characters or incorrect hexadecimal characters in a hexadecimal constant. |
Explanation: Characters other than 0-9 or A-F were found in a hexadecimal constant (for example, X'0F2AG4') where G is not permitted. This can also result from failure to provide an even number of hexadecimal characters (for example, X'0F429C6').
SQLSTATE 42606.
System Action: If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: Correct the statement. Try again.
-168 | You specified an incorrect parameter parameter or parameter value. |
Explanation: The parameter or the value for the parameter named is not valid. For example, the value is above or below the value limit, or it is an incorrect value type.
SQLSTATE 42615.
System Action: If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: Correct the statement. Try again.
-169 | Incorrect continuation of a graphic constant. |
Explanation: A graphic literal in an SQL statement must be contained on one line in a source program.
SQLSTATE Spaces.
System Action: Processing continues, but a new package will not be produced. If the package existed previously, it will be restored.
User Response: Correct the error in the continuation and repreprocess the program.
-170 | A graphic string either is too long, is improperly terminated, or contains bytes that are incorrectly paired for graphic strings. |
Explanation: All graphic strings must be started and ended with the proper shift-out and shift-in characters.
In addition to the proper shift-out and shift-in characters, a graphic string must have properly paired bytes, and not be too long.
The SQL form of a graphic string is:
G'so...data...si' or N'so...data...si'
This form can be used in ISQL, COBOL programs, and DBS Utility. In these situations, the termination sequence for a graphic constant (a si (X'0F') character followed by an apostrophe) was detected, but it either was not found in the proper byte positions or was incomplete following the graphic constant string. The terminating sequence should follow a pair of bytes. Instead it was found following a single byte or not found.
There are two formats for a PL/I graphic constant, (format 1):
soX'427D'..data...X'427D42C7'
or (format 2):
'so...data...si'G or 'so...data...si'N
In a PL/I program, the following conditions in a graphic constant in an SQL statement can cause this error:
The correct formats for inserting a graphic apostrophe within a PL/I graphic constant are (format 1):
soX'427D'...X'427D427D'...data... X'427D42C7'si
or (format 2):
'so...X'427D427D'...data...si'G or 'so...X'427D427D'...data...si'N
If the graphic option is YES, so/si pairings are imposed on host variable and label names, and character constants in PL/I and COBOL. A violation of this rule causes SQLCODE -170.
The scan for proper termination continued to the end of the SQL statement or to the limit of 127 graphic characters for character string constants in dynamic SQL statements, and to the limit of the line for the SQL statements imbedded in a host language program.
SQLSTATE 42604.
System Action: If this error occurs during DB2 Server for VM preprocessing, processing continues, but a new package is not produced, and no SQLSTATE is issued. If the package existed previously, it is restored. If this error occurs in other than a preprocessing run, the function ends.
User Response: Provide the correct termination of a graphic constant or decrease the size of a graphic constant. Try again.
-171 | The data type, length, or value of argument argument-number of function-type is invalid. |
Explanation: The above message is issued under the following circumstances:
function-type | argument number | reason |
---|---|---|
CHAR | 1 | DATE or TIME |
2 | must be USA or ISO or | |
EUR or JIS or LOCAL | ||
CONCATENATE | not both character or both | |
graphic | ||
DATE | 1 | character string=7, |
timestamp, date or | ||
positive NUMBER | ||
DAY | 1 | date, timestamp, |
DECIMAL(8,0), | ||
DECIMAL(20,6) | ||
DAYS | 1 | date or timestamp |
DECIMAL | 1 | not numeric |
2 | less than 1 or greater than | |
31 | ||
2 | not a numeric constant | |
3 | less than 0 or greater than | |
PRECISION | ||
3 | not a numeric constant | |
DIGITS | 1 | not SMALLINT, |
INTEGER or DECIMAL | ||
FLOAT | 1 | not numeric |
HEX | 1 | exceeds 127 in length |
and >63 DBCS for graphic | ||
HOUR | 1 | timestamp, time, |
DECIMAL(6,0), | ||
DECIMAL(20,6) | ||
INTEGER | 1 | not numeric |
MICROSECOND | 1 | timestamp, DECIMAL(20,6) |
MINUTE | 1 | timestamp, time, |
DECIMAL(6,0), | ||
DECIMAL(20,6) | ||
MONTH | 1 | date, timestamp, |
DECIMAL(8,0), | ||
DECIMAL(20,6) | ||
SECOND | 1 | timestamp, time, |
DECIMAL(6,0), | ||
DECIMAL(20,6) | ||
STRIP | 1 | not short character com- |
patible or graphic | ||
2 | not L T or B (without | |
quotes) | ||
3 | not a character or graphic | |
constant of length 1 | ||
3 | does not match datatype of | |
STRING | ||
SUBSTR | 1 | not character compatible |
or graphic | ||
2 | less than 0 or greater than | |
max_length(no decimal or | ||
float | ||
3 | less than 0 | |
greater than max_length - | ||
START + 1 (no numeric | ||
constant=zero | ||
TIME | 1 | TIMESTAMP or TIME |
TIMESTAMP | 1 | TIMESTAMP, CHAR |
STRING=8 or 14 | ||
2 | TIME | |
TRANSLATE | 1 | not short character com- |
patible or graphic | ||
4 | not a character constant of | |
length 1 | ||
VALUE | incompatible types | |
VARGRAPHIC | 1 | not character or character |
compatible | ||
1 | exceeds 127 characters | |
YEAR | 1 | date, timestamp, |
DECIMAL(8,0), | ||
DECIMAL(20,6) | ||
Note: | Long strings are only allowed for LENGTH and SUBSTR. See description for limitations. |
System Action: Processing of the SQL statement has ended.
Programmer Response: Correct the statement. Try again.
-172 | The number of arguments specified for function-type is invalid. |
Explanation: A SQL statement has specified the scalar function function-type with either too many or too few arguments. Refer to the DB2 Server for VSE & VM SQL Reference manual for a complete list and description of column and scalar functions.
SQLSTATE 42605.
System Action: The statement cannot be executed.
User Response: Correct the statement. Try again.
-173 | UR is specified on the WITH clause but the cursor is not read-only. |
Explanation: The cursor is not read-only. WITH UR can be specified only if the database manager can determine that the cursor is read-only.
SQLSTATE 42801.
System Action: Statement execution fails.
User Response: Change the isolation level specified on the WITH clause.
-180 | The string representation of a date/time value has invalid syntax. |
Explanation: The string representation of a date/time value does not conform to the syntax, or does not meet the minimum length requirements of any supported formats.
SQLSTATE 22007.
System Action: The statement cannot be executed.
User Response: Check that the datetime value conforms to the syntax of a supported format such as ISO, JIS, EUR, USA, or LOCAL. Correct the value where required.
-181 | The string representation of a date/time value is not a valid date/time value. |
Explanation: The string representation of a datetime value contains a value that is out of range.
The proper ranges for datetime values are as follows:
Note: | The above ranges do not apply to LOCAL format values. |
System Action: The statement cannot be executed.
User Response: Provide a value within the valid range. Try again.
-182 | An arithmetic expression with a date/time value is invalid. |
Explanation: The specified arithmetic expression contains an improperly used date/time value or labeled duration.
SQLSTATE 42816.
System Action: The statement cannot be executed.
User Response: Correct the indicated arithmetic expression. Try again.
-183 | An arithmetic operation on a date or timestamp has a result that is not within the valid range of dates. |
Explanation: The result of an arithmetic operation is a date or timestamp that is not within the valid range of dates, which are between '0001-01-01' and '9999-12-31'.
SQLSTATE 22008.
System Action: The statement cannot be executed.
User Response: Examine the SQL statement to determine the cause of the problem. The problem may be data-dependent, in which case you must examine the data that was processed at the time the error occurred.
-184 | Invalid parameter in a date/time arithmetic expression or scalar function argument list. |
Explanation: The specified arithmetic expression contains a parameter marker improperly used, or the parameter marker is used as a scalar function argument.
SQLSTATE 42610.
System Action: The statement cannot be executed.
User Response: Correct the indicated arithmetic expression. Try again.
-185 | The application uses the local format option with a date or time, but the local exit has not been installed. |
Explanation: The local format option has been used with a date or time value but no date or time exit has been installed. This error may occur if the LOCAL option is used with the CHAR function, or if the SYSOPTIONS table indicated that an exit for date or time was supplied, but in fact the exit has not been installed.
SQLSTATE 57008.
System Action: The statement cannot be executed.
User Response: Contact your system programmer about installation of the date or time exit.
-187 | Invalid use of labeled durations. |
Explanation: Labeled durations such as 10 MONTHS can only be used in a valid datetime arithmetic context. They are not to be used as stand-alone expressions such as COL1 > 5 DAYS.
Some examples that cause this SQLCODE to be issued are:
SQLSTATE 42816.
System Action: The statement cannot be executed.
User Response: Correct the statement. Try again.
-189 | An invalid CCSID value ccsid_value was specified. |
Explanation: The ccsid_value was invalid for one of the following reasons:
SQLSTATE 22522
System Action: Processing of the SQL statement ends.
User Response: Correct the statement. Try again.
-191 | A mixed data value is improperly formed. Reason Code = reason-code. |
Explanation: The mixed data contained an improperly formed DBCS portion. This could be a missing X'0E'(shift-out), or X'0F'(shift-in), or a stranded half byte of a DBCS character. The reason codes for this message are:
SQLSTATE 22504.
System Action: Processing of the SQL statement ends.
User Response: Correct the data. Try again.
-192 | function-type scalar function does not allow the first argument to be of MIXED subtype. |
Explanation: You used an expression (column, host variable, constant, and so on) of MIXED subtype as the first argument of the STRIP or TRANSLATE scalar function. This is not allowed.
SQLSTATE 42937.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-198 | A null SQL statement has resulted. |
Explanation: Only the SQL statement delimiters were found. This results in a null SQL statement. The SQL statement start delimiter is EXEC SQL. The SQL statement end delimiter depends on the host language and can be one of the following:
SQLSTATE Spaces.
System Action: The empty statement is marked as incorrect. Processing of the statement ends.
User Response: Check the program to find the empty statement and determine if any SQL statements are missing. Correct the program and resubmit it.
-201 | The following name was not found in the FROM clause: name. |
Explanation: One of the following has occurred:
Note: | If a table-name in a FROM clause is qualified by an owner and this table-name
is used to qualify a column reference in a WHERE clause, ORDER BY clause,
GROUP BY clause, or HAVING clause, the column reference qualifier must also
include the owner along with the table-name. As an example, the
following is incorrect:
SELECT DESCRIPTION FROM SQLDBA.INVENTORY, SQLDBA.QUOTATIONS WHERE INVENTORY.PARTNO = QUOTATIONS.PARTNO
It must be entered as: SELECT DESCRIPTION FROM SQLDBA.INVENTORY, SQLDBA.QUOTATIONS WHERE SQLDBA.INVENTORY. PARTNO = SQLDBA.QUOTATIONS.PARTNO
Or, if you are the owner of the table, you can enter it as: SELECT DESCRIPTION FROM INVENTORY, QUOTATIONS WHERE INVENTORY.PARTNO = QUOTATIONS.PARTNO |
SQLSTATE 42703.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-202 | Column column-name was not found in any table referenced by the statement. |
Explanation: Since the column name column-name was unqualified, all the columns associated with the tables or views in the SQL statement were searched and column-name was not among them.
This SQLCODE may result if you use the double quotation character (") to mark the beginning and ending of a character string constant, instead of using the single quotation character (') required by SQL. For example, the following query generates SQLCODE -202 because the system attempts to use "STORED QUERIES" as a column name, not a character string constant:
SELECT * FROM SYSTEM.SYSCATALOG WHERE TNAME="STORED QUERIES"
This query should be:
SELECT * FROM SYSTEM.SYSCATALOG WHERE TNAME='STORED QUERIES'
Note: | This code is returned when either the statement is being executed, or the program is being preprocessed with the EXIST option. |
SQLSTATE 42703.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-203 | The unqualified column column-name was found in more than one table in the FROM clause. |
Explanation: The SQL statement contained a column name column-name which was not associated with a specific table. The column name must be qualified so that it can be associated with a table in the FROM clause.
SQLSTATE 42702.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-204 | owner.object-name was not found in the system catalog. |
Explanation: The name owner.object-name specified in the message text is incorrect. This code is returned when either the statement is being executed, or the program is being preprocessed with the EXIST option. The owner.object-name referenced may not be the direct object name being manipulated. You may need to check the system catalog tables to identify the type of object missing.
SQLSTATEs:
System Action: Processing of the SQL statement has ended.
User Response: Create the required object or provide the correct name of the object. Try again.
If the required object is one of the EXPLAIN tables, you can use a supplied macro job file (ARISEXP MACRO) to create the EXPLAIN tables. See the DB2 Server for VSE & VM SQL Reference manual for details about the macro job file (ARISEXP MACRO). The implicit EXPLAIN version of this SQLCODE is -649.
If the specified object is a stored procedure, use the CREATE PROCEDURE statement to define the stored procedure. If the specified object is a stored procedure server, use the CREATE PSERVER statement to define the stored procedure server. Once the stored procedure or stored procedure server has been defined, issue START PSERVER or START PROC to activate the new definition.
Note: | If the CREATE statement has already been issued for the PROCEDURE, ensure that it has been committed. The CALL statement searches a cache for the procedure being called, and the cache entry is not made until the unit of work in which the CREATE statement was issued has been committed. |
-205 | Column column was not found in table creator.table. |
Explanation: The SQL command contained a column name column which cannot be found in the table specified in the message text.
SQLSTATE 42703.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-206 | The key-type constraint-name on owner.table-name was not found. |
Explanation: Key-type can be a PRIMARY KEY, FOREIGN KEY, or UNIQUE CONSTRAINT. For a primary key, constraint-name is omitted.
The SQL statement containing a primary key, foreign key constraint, or unique constraint was not found for the named table. Either you specified the constraint-name incorrectly, or the key or constraint does not exist for the specified table.
This code is returned when either the statement is being executed, or the program is being preprocessed with the EXIST option.
SQLSTATE 42704.
System Action: Processing of the SQL statement ends.
User Response: Create the required key or constraint, or provide the correct name for the desired key or constraint.
-207 | A column name is not allowed in an ORDER BY clause of a UNION. |
Explanation: The UNION involves an ORDER BY clause which contains a column name in the order-list. The order-list must contain only integers.
SQLSTATE 42706.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-208 | The column column-name was specified in the ORDER BY clause but does not appear in the SELECT clause. |
Explanation: The ORDER BY clause contains a column name column which is not in the SELECT clause.
SQLSTATE 42707.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-209 | A column name appears more than once in the SELECT clause, but is not qualified in the ORDER BY clause. |
Explanation: The column name in the ORDER BY clause should be qualified so that it can be associated with the appropriate column in the SELECT clause.
SQLSTATE 42702.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-210 | Incorrect symbol used in either a cursor name, owner name, package name, or statement name. |
Explanation: One of the following has occurred:
SQLSTATE 42602.
System Action: Processing of the SQL statement has ended. A package is not produced if the error occurs during preprocessing within a statement that is not an extended dynamic statement.
User Response: When the error occurs in an extended dynamic statement, rollback the logical unit of work, correct the error causing the incorrect name, and rerun the preprocessor. Otherwise, just correct the name and rerun the preprocessor.
-211 | The table name or correlation name name appears more than once in the FROM clause. |
Explanation: One of the following conditions was found in the FROM clause of the SQL statement:
SQLSTATE 42712.
System Action: Processing of the SQL statement ends.
User Response: The actions below correspond to the numbered conditions above:
Use correlation names as column qualifiers.
-301 | The data type of a host variable or parameter is not compatible with the target data type. |
Explanation: It was found that the data type of the input host variable or parameter is not compatible with the target data type:
The problem typically occurs on an INSERT or UPDATE statement. It also occurs on an SQL CALL statement if a host variable is specified for a parameter, and the data type of the host variable is incompatible with the expected data type of the parameter. In this case:
SQLSTATEs:
System Action: Processing of the SQL statement has ended.
User Response: Check data type of column or parameter and correct the input host variable or parameter. You must repeat the steps from preprocessing to execution of the program.
-302 | An input host variable or parameter is invalid for the target column or parameter. |
Explanation: The problem typically occurs on an INSERT or UPDATE statement. It also occurs on an SQL CALL statement when a host variable is specified for an input parameter, and the data type of the host variable is incompatible with the expected data type of the parameter. In this case:
If the error occurred on an INSERT or UPDATE statement, then either the data type and length of your input host variables are not compatible with the target column, or the data type and length assigned to the parameter markers are not compatible with the target column.
DB2 Server for VM assigns a data type and length to a parameter marker. It gets the data type and length contextually from the expression in which the parameter marker is used. As a result, a host variable can be too large if it exceeds the assumed length of the parameter marker for which it is being substituted. Or, in numeric data, a host variable can be too large if its numeric value exceeds the size that can be handled by the assumed data type (for example, greater than 32767 for SMALLINT).
If this SQLCODE is received after migration by an application that previously executed successfully, refer to the appendixes in the DB2 Server for VSE & VM SQL Reference manual about the incompatibilities between the DB2 Server for VM and SQL/DS releases of software for more information about the problem. (For example, as of SQL/DS Version 3 Release 2, the precision of decimal variables is enforced and some applications that insert data into decimal columns may receive this error.)
This problem most typically occurs on INSERT or UPDATE where the data type and length assigned to the parameter marker is that of the column being inserted into or updated.
Any one of the following size conditions may have occurred for the assumed parameter marker data type:
See the DB2 Server for VSE & VM SQL Reference manual for a description of numeric data type maximums and minimums.
This problem can also occur when the assumed data type of the parameter marker in the ESCAPE clause of a LIKE predicate is:
SQLSTATEs:
System Action: Processing of the SQL statement has ended.
User Response: Check the target column or parameter type and correct the host variable or input parameter so that the data will fit in the target column or parameter, or correct the length of the host variable or parameter. If an SQL statement is modified, you must repeat the steps from preprocessing to execution of the program.
-303 | The data type of the output host variable is not compatible with the data type of the fetched column or expression, or the returned value from an SQL CALL statement. |
Explanation: A SQL CALL, FETCH, or SELECT into the output host variable could not be performed. The data type of an output variable is not compatible with the data type of the fetched column, expression, or returned value from an SQL CALL. The data type of the output host variable and the data type of the fetched column, expression, or returned value must both be numeric, or both be character, or both be DBCS. If the data type of the fetched column, expression, or returned value is date, time, or timestamp, the data type of output host variable must be character, or the same data type as the fetched column, expression, or returned value from SQL CALL statement.
SQLSTATE 42806.
System Action: Processing of the SQL statement has ended.
User Response: Check output data type and correct output variable. If an SQL statement is modified, you must repeat the steps from preprocessing to execution of the program.
If this error is received on an SQL CALL statement, you may need to redefine the stored procedure as follows:
-304 | A value with data type data-type1 cannot be assigned to a host variable because the value is not within the range of the host variable in position position-number with data type data-type2. |
Explanation: An SQL CALL, FETCH, or SELECT into a host variable, position number position-number, failed because the host variable with data type data-type2 was not large enough to hold the retrieved value with data type data-type1. In the case of a datetime source data type, the datetime value was too large to fit in the character or datetime output host variable after conversion to character format. The SQL CALL, FETCH, or SELECT statement is not executed. No data is returned.
SQLSTATEs:
System Action: Processing of the SQL statement has ended.
User Response: Correct the output host variable so that it is large enough to contain the source data value. You must repeat the steps from preprocessing to execution of the program.
Note: | If the error occurred in the select-list of an outer SELECT statement, indicator variables can be added to each of the expressions, to allow you to get values not in error, and retrieve subsequent rows. In that case, the +802 SQLCODE would be issued and the indicator VARIABLEs associated with the last VARIABLE in error has been assigned a value of -2. |
-305 | You did not associate an indicator variable with an output host variable. An error has occurred because a NULL data value was fetched. |
Explanation: A null value has been fetched but the output host variable has provided no indicator variable.
SQLSTATE 22002.
System Action: Processing of the SQL statement has ended.
User Response: Declare an indicator variable and connect it to the output host variable. This will allow null values to be returned. You must repeat the steps from preprocessing to execution of the program.
-306 | You did not declare the host variable variable-name. |
Explanation: The named host variable was not declared between the BEGIN DECLARE SECTION and the END DECLARE SECTION SQL statements, or an error occurred in the declaration of the host variable.
SQLSTATE Spaces.
System Action: Processing continues, but a new package will not be produced. If the package existed previously, it will be restored.
User Response: Add a declaration for the missing host variable in the host variable declare section. You must repeat the steps from preprocessing to execution of the program.
-307 | You have already declared host identifier ident-name. |
Explanation: The host-identifier ident-name is declared more than once in a SQL DECLARE section in this program or subprogram unit. The host identifier must be the name of a host variable or indicator variable. In those languages that support host structures, the host identifier can be a host structure or a host structure field. The indicator variable can be an indicator array.
SQLSTATE Spaces.
System Action: Processing continues, but a new package will not be produced. If the package existed previously, it will be restored.
User Response: Remove the duplicate declaration. Rerun the preprocessor.
-309 | You used a negative indicator variable in a predicate in an invalid context. |
Explanation: A predicate uses a negative indicator variable. Negative indicator variables are not allowed in predicates (except predicates using the "=" operator) of Dynamic SQL statements. Nor are they allowed in predicates (except predicates using the "=" operator) of Extended Dynamic SQL statements that have no input SQLDA in the PREPARE statement. See the DB2 Server for VSE & VM Application Programming manual for information about using negative indicator variables.
SQLSTATE 22512.
System Action: Processing of the SQL statement ends.
User Response: Correct the input host variable so that is does not have a negative indicator variable or change the SQL statement so that the negative indicator variable is used in a valid context. You must repeat the steps from preprocessing to execution of the program.
-311 | An invalid length was specified for an input host variable character string. |
Explanation: The value contained in the length portion of the variable length host variable is either negative or greater than the length of its data portion.
SQLSTATE 22501.
System Action: Processing of the SQL statement ends. If this error occurred during an explicit connect, the logical unit of work (if any) is rolled back and the resource adapter returns to the application with SQLCA fields SQLWARN0 and SQLWARN6 both set to S, indicating a serious system error.
User Response: If this SQLCODE was issued in response to a non-CONNECT statement, correct the value in the length portion of the host variable so that it is not negative and it is not greater than the length of its data portion. You must repeat the steps from processing the program through to running the program.
If this SQLCODE was issued in response to a CONNECT statement, only a CONNECT statement will be accepted. Check the length field of the host variable used for your database name. It should be >= 1 and <= 18.
-312 | An SQL statement containing host variables cannot be submitted by way of a PREPARE, EXECUTE IMMEDIATE, or DECLARE CURSOR statement. |
Explanation: Any SQL statement submitted on a PREPARE or EXECUTE IMMEDIATE statement must not contain input or output host variables. In addition, the SELECT portion of the DECLARE cursor statement must not contain input or output host variables.
SQLSTATE 42618.
System Action: Processing of the SQL statement has ended.
User Response: Replace the host variables with parameter markers. You must repeat the steps from preprocessing to execution of the program.
-313 | There is a mismatch between the number of host variables declared and the number of host variables required for the SQL statement. |
Explanation: The user has not supplied exactly as many input program host variables as needed by the SQL statement. SQLERRD1 contains further information about the error. The possible values are:
SQLSTATEs:
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement or define more input host variables. You must repeat the steps from preprocessing to execution of the program.
-314 | You declared a host variable incorrectly. |
Explanation: An error occurred while a DB2 Server for VM preprocessor was processing a host-identifier declaration. The host identifier must be the name of a host variable or indicator variable. In those languages that support host structures, the host identifier can be a host structure or host structure field. The indicator variable can be an indicator array.
SQLERRD1:
SQLERRD1:
short aa,bb,,cc;
SQLVARCHAR (lastname, 10-); projno char[3e];
char var1[123456]; char var1[0];
char var1[123 ;
char var1[32768];
struct{ short ll; char dd[35000]; } Var1;
char empno[12] - missing semi-colon short projno actno; - missing comma char midinit-'E'; - dash instead of '='
long (var1;
Examples:
SQLVARCHAR ABC,35); /* missing left parenthesis */ SQLVARCHAR(ABC 35); /* missing comma */
Examples:
struct{ short ll /* missing semicolon */ char dd[200]; } Var1; struct{ short ll = 23; /* improper initialization */ char dd[200]; } Var1;
struct employee auto { short empno; SQLVARCHAR(firstname,12); SQLVARCHAR(lastname,15); } acct_emp;
short indarr[5][5];
decimal Var1; decimal() Var2;
decimal(42) Var1; decimal(123,3) Var2;
decimal(0) Var1;
decimal(5,8) Var1; decimal(16,32) Var2;
decimal(5,02) Var1; decimal(05,2) Var2; decimal(08,03) Var3;
SQLERRD1:
PIC X(n) 1 <= n <= 32767 PIC G(n) 1 <= n <= 16383
Examples:
PIC (4) should be PIC S9(4) PIC S9(4)V(3) should be PIC S9(4)V9(3)
Examples:
01 NAME PIC X(2A0) 01 NAME PIC S9(-1)
PIC S9(10)V99V99 COMP-3. PIC S9(4)V9 COMP. PIC S9(9)V99 COMP.
PIC X(3)XXIXX PIC Q(3)
PIC S9(10 COMP. PIC S9(8)V9(4 COMPUTATIONAL-3.
PIC Q(3). PIC Z(4). PIC (20).
PIC X(4) COMP. PIC S9(4). PIC X(4) COMP-3.
Examples:
PIC S9(0) COMP PIC S9(10) COMP
PIC S COMPUTATIONAL-3.
PIC X(0).
... BLANK WHEN ZERO. ... SIGN... ... JUSTIFIED...
01 DESCRIPTION. 49 DESCRIPTION-LEN PIC S9(4) COMP. 49 DESCRIPTION-VAL PIC X(33000).
01 NAME PIC X(300).
Examples:
Example 1. 77 FIRST-NM PIC X(10) <- missing period 77 LAST-NM PIC X(10). <- error reported after this declaration Example 2. 01 DESCRIPTION. 49 DESC-LEN PIC S9(4) COMP <- missing period 49 DESC-TXT PIC X(100). <- error reported after this declaration
SQLERRD1:
Examples:
DCL EMPNO BINARY FIXED(31) INITIAL (2500; DCL EMPNAME CHAR (25) INITIAL;
Examples:
DCL EMPNO BNARY FIXED (15); - invalid attribute DCL AUTOMATIC EMPNAME CHAR(20); - incorrect placement DCL DEPTNAME CHAR <10); - unknown string < DCL 01 EMPLOYEE DEFINED, - incomplete attribute specification . .
DCL IND_ARRAY (1-) BINARY FIXED (15); DCL EMPNAME CHAR (1A);
SQLSTATE Spaces.
System Action: Processing has ended for this host variable.
User Response: Correct the statement. Try again.
-315 | The following host variable for user ID or password is not preceded by a colon in the SQL CONNECT statement: variable-name. |
Explanation: User ID and password used in the CONNECT SQL statement should be declared as host variables. The names of those host variables in the CONNECT SQL statement should be preceded by a colon (:).
SQLSTATE Spaces.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-316 | The SQL statement prefix, EXEC SQL, was found in COBOL section A (columns 8-11). EXEC SQL should not start before column 12. |
Explanation: EXEC SQL was coded beginning in Section A of a statement in a COBOL program (columns 8-11). EXEC SQL should not start before column 12.
SQLSTATE Spaces.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-317 | Valid SQL statements in the WORKING-STORAGE SECTION are BEGIN DECLARE SECTION, END DECLARE SECTION, INCLUDE SQLCA, and INCLUDE. |
Explanation: The BEGIN or END DECLARE SECTION, the INCLUDE SQLCA or the INCLUDE command has been coded improperly. Following are probable causes:
SQLSTATE Spaces.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-318 | INCLUDE SQLCA SQL statement is outside the WORKING-STORAGE SECTION. |
Explanation: An INCLUDE SQLCA statement must only be coded in the COBOL WORKING-STORAGE section.
SQLSTATE Spaces.
System Action: Processing of the SQL statement ends.
User Response: Move the statement. Try again.
-319 | More than one INCLUDE SQLCA statement was in the COBOL program. |
Explanation: Only one INCLUDE SQLCA statement can appear in a COBOL program.
SQLSTATE Spaces.
System Action: Processing of the SQL statement ends.
User Response: Remove the extra statement. Try again.
-320 | The SQL declare section did not end before the end of the containing COBOL section. |
Explanation: A BEGIN DECLARE SECTION statement was found, but a matching END DECLARE SECTION was not found before the containing WORKING-STORAGE SECTION, LINKAGE SECTION, or FILE SECTION ended.
SQLSTATE Spaces.
System Action: Processing of the SQL statement ends.
User Response: Insert an END DECLARE SECTION statement. Try again.
-321 | An SQL statement other than an INCLUDE statement appears in the declarative section of the COBOL PROCEDURE DIVISION. |
Explanation: An SQL statement other than an Extended INCLUDE statement cannot appear in the declarative section of the PROCEDURE DIVISION in COBOL.
SQLSTATE Spaces.
System Action: Processing of the SQL statement ends.
User Response: Move or remove the statement. Try again.
-322 | EXEC SQL was in a section other than the FILE, LINKAGE, WORKING-STORAGE SECTION, or PROCEDURE DIVISION sections. |
Explanation: An SQL statement (one beginning with EXEC SQL) must only appear in the WORKING-STORAGE, FILE, or LINKAGE sections of the DATA DIVISION or in the PROCEDURE DIVISION.
SQLSTATE Spaces.
System Action: Processing of the SQL statement ends.
User Response: Move or remove the statement. Try again.
-323 | A new SQL statement begins before the previous one properly ended. Both statements are ignored. |
Explanation: Missing END-EXEC following EXEC SQL. Another EXEC SQL was found before the previous END-EXEC was found.
SQLSTATE Spaces.
System Action: Processing of the SQL statement ends.
User Response: Correct the statements. Try again.
-324 | Host variable variable is declared with an attribute that is incorrect for its use in the SQL statement. |
Explanation: The SQL statement requires a host variable of a particular data type or length that was not found. |If a variable number is specified, it corresponds to the |variable's position in the SQL statement. Some specific examples of this error are:
SQLSTATE Spaces.
System Action: Processing continues, but a new package will not be produced. If the package existed previously, it will be restored.
User Response: Change the host variable declaration to conform to the required type/length specification. Try again.
-325 | This preprocessor does not support the SQL statement. |
Explanation: The SQL statement used is only supported by the Assembler preprocessor of the database manager. The SQL statement was probably of the Extended Dynamic type.
SQLSTATE Spaces.
System Action: Processing continues, but a new package will not be produced. If the package existed previously, it will be restored.
User Response: Eliminate the failed statement either by moving it to an Assembler language program for preprocessing or by changing the statement to the Dynamic form as opposed to the Extended Dynamic form. Try again.
-326 | Indicator variable variable-name must be declared with a data type and length that equates to an SQL data type of SMALLINT. |
Explanation: The named indicator variable was not declared with a data type and length which equates to an SQL data type of SMALLINT.
System Action: Processing of the SQL statement has ended.
User Response: Correct the declaration of the indicator variable so that it has an SQL data type of SMALLINT. This information is in the DB2 Server for VSE & VM Application Programming manual.
-330 | A string value cannot be used because at least one of its characters cannot be converted. |
Explanation: An error occurred when converting an application input string variable to the application server's representation. The value of the string host variable is incompatible with its use because of a mismatch in data representation. The value cannot be used as specified.
SQLSTATE 22021.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement.
-331 | A string value cannot be assigned to a non-nullable host variable because at least one of the characters in the source value cannot be converted. |
Explanation: An error occurred when converting a string value returned by the application server to the application requester. The string value cannot be assigned to a host variable that does not have an indicator variable within a SELECT statement of an application program. The value is incompatible with the host variable because of a mismatch in data representation. The FETCH or SELECT statement is not executed. No data is returned.
SQLSTATE 22021.
System Action: Processing of the SQL statement has ended.
-332 | A source string with a CCSID of source-ccsid cannot be assigned to its target with a CCSID of target-ccsid because of incompatible CCSIDs. Reason Code= reason-code. |
Explanation: No conversion supported for the specified pair of CCSIDs. The reason codes for this message are:
SQLSTATE 57017.
System Action: Processing of the SQL statement has ended.
User Response: Either correct the statement so that it does not move or compare data between incompatible CCSIDs, or add support for the specified conversion.
-334 | An ASCII Mixed string could not be converted because it would exceed the length attribute of its EBCDIC target. |
Explanation: The insertion of shift-out (X'0E') and shift-in (X'0F') characters to indicate the DBCS portion of a mixed string in EBCDIC has caused the converted string to be too large for the target.
SQLSTATE 22524.
System Action: Processing of the statement ends.
User Response: Correct the statement or increase the length of the EBCDIC target and try again.
-401 | Incompatible data types were in an expression or compare operation. |
Explanation: The expression or compare operation violated one of the following rules:
SQLSTATE 42818.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-402 | You cannot use nonnumeric data in the AVG or SUM column functions or as part of an arithmetic operation. |
Explanation: One of the following has occurred:
Refer to the DB2 Server for VSE & VM SQL Reference manual for a complete list and description of column and scalar functions.
SQLSTATE 42819.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-404 | A character string specified in an INSERT or UPDATE statement is too large for the target column. |
Explanation: A character string in the data items-list of an INSERT statement or one of the character strings in the SET clause of an UPDATE statement is longer than the associated target column in the database.
SQLSTATE 22001.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-405 | The numeric value, value, is not within the range of the data type. |
Explanation: A numeric value specified in the statement exceeds the value allowed for the associated target column in the database. Following are the limitations:
SQLSTATE 42820.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-407 | Either an UPDATE statement or an INSERT statement with a null value for a column defined as NOT NULL is not allowed, or a null host variable value is not allowed in a SELECT list. |
Explanation: An attempt was made to update a column with a null value and the column does not allow nulls. The null value may be from a constant value, host variable, an expression, or from a value returned on a subquery.
This SQLCODE will also be issued if you made an attempt to SELECT a host variable in a select-list, and the select-list had an indicator variable value of <0, indicating a NULL host variable value. A NULL host variable value is not allowed in a select-list. For more information about host indicator variables definition, refer to the DB2 Server for VSE & VM Application Programming manual.
SQLSTATE 23502.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-408 | An UPDATE or INSERT of a data value is incompatible with the data type of the associated target column. |
Explanation: A source value was incompatible with the associated target column. This can happen when the source value:
Typical cases are:
SQLSTATE 42821.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-409 | An incorrect specification was used with the column function COUNT. Only * or DISTINCT with a column name is allowed. |
Explanation: The column function COUNT may only be used with * or with the keyword DISTINCT and a column name. Examples of its use are: COUNT(*) or COUNT (DISTINCT PARTNO), where PARTNO is a column name.
Refer to the DB2 Server for VSE & VM SQL Reference manual for a complete list and description of column and scalar functions.
SQLSTATE 42607.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-412 | You cannot specify more than one item in the SELECT clause of a subquery. |
Explanation: A subquery may only contain one item in its SELECT clause. For example, the following subquery is incorrect:
SELECT * FROM EMP_ACT WHERE EMPNO IN (SELECT EMPNO, JOB FROM EMPLOYEE WHERE WORKDEPT = 'E11')
SQLSTATE 42823.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-413 | An overflow occurred while the database manager was converting a data type internally. |
Explanation: A data value being converted by the database manager is too large for the data type to which it is being converted. For example, large floating point numbers will not convert to integers. This overflow is possible when using DECIMAL and INTEGER scalar functions.
SQLSTATE 22003.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-414 | The LIKE predicate was used for a numeric or date/time column type. LIKE must only be used with graphic or character columns. |
Explanation: The SQL statement uses LIKE against a numeric or datetime column. It can only be used against columns that have a data type that is compatible with the graphic data type or that have character data type.
SQLSTATE 42824.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-415 | The corresponding columns, column-number, of the operands of a UNION or a UNION ALL do not have comparable column descriptions. |
Explanation: The SQL statement contains SELECT clauses connected by a UNION or UNION ALL, and the corresponding columns in each SELECT clause cannot be compared. Specifically, columns of ordinality column-number of the operands in this UNION or UNION ALL cannot be compared. For columns to be comparable, corresponding columns must be numeric, character, graphic, date, time, or timestamp. Do not mix these data types. If corresponding columns have field procedures, both must have the same field procedure and the same column CCSID value.
Note the following default data types for literal constants in a SELECT list:
SQLSTATE 42825.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-416 | You cannot specify a long string column in the SELECT clause of a UNION. |
Explanation: The SQL statement contained a SELECT clause item whose data type is a long string. This is not valid.
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.
SQLSTATE 42907.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-417 | Not all the operands of an arithmetic operator or predicate can be parameter markers. |
Explanation: The SQL PREPARE command contains an arithmetic operator or predicate with parameter markers used for all the operands. At least one of the operands must not be a parameter marker. Thus, the following are invalid:
SQLSTATE 42609.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-418 | You cannot specify a parameter marker in the SELECT clause of a SELECT statement. |
Explanation: The SQL PREPARE statement contains a parameter in its SELECT clause.
SQLSTATE 42610.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-419 | The precision of the numerator and/or the scale of the denominator are too large for decimal division. |
Explanation: The internal formula used to calculate the resulting scale of decimal division is:
Scale of result = 31 - np + ns - ds where np = precision of numerator, ns = scale of numerator, ds = scale of denominator.
A negative resulting scale will cause incorrect results because of internal decimal constraints. This may also happen when using the AVG() function.
SQLSTATE 42911.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-422 | The operands of a UNION or UNION ALL do not have the same number of columns. |
Explanation: The operands of a UNION or UNION ALL must have the same number of columns.
SQLSTATE 42826.
System Action: Processing of the SQL statement ends.
User Response: Correct the SQL statement by putting the same number of columns in each operand.
-423 | Invalid result set locator value. |
Explanation: The value specified in a result set locator host variable does not identify a valid result set locator.
SQLSTATE: 0F001.
System Action: Processing of the SQL statement has ended.
User Response: There are two common causes for this error:
-424 | You specified an invalid sign digit in a decimal number. |
Explanation: Decimal numbers are stored with the sign indicator in the lower half byte of the final byte. For example, +300 is stored as 300C. 300 is the digit and the C is the sign digit. The sign digit can be from hexadecimal A to hexadecimal F. The digit must be in the range from hexadecimal 0 to hexadecimal 9. SQLCODE -424 is issued if the decimal data passed to the database manager has an invalid sign or digit.
For zoned decimal or numeric data, SQLCODE -424 indicates that at least one digit contains invalid zone bits or numeric bits.
SQLSTATE 22502.
System Action: Processing of the SQL statement ends.
User Response: Correct the data to have a valid sign and decimal digit. Try again.
-425 | The final result of a SUM is too large for the associated target column. |
Explanation: The database manager encountered a query similar to this:
SELECT SUM(column1) FROM table1
To process the sum, the database manager maintains an internal accumulator. This SQLCODE is issued when the value in the internal accumulator is greater than the final result value can be. For example, accumulating the sum of an integer column is done in a double word accumulator but the result can only be the length of a single word.
SQLSTATE 22003.
System Action: Processing of the SQL statement has ended.
User Response: If you need to work with the data values involved, break the calculation down into smaller segments, so you do not exceed the capacity of the final result field.
Explanation: The database manager received an SQL CALL statement for a stored procedure. The number of parameters supplied on the CALL statement does not match the number of parameters defined in SYSTEM.SYSPARMS.
SQLSTATE: 42884
System Action: The statement cannot be executed.
User Response: If the SQL CALL statement is coded incorrectly, modify the SQL application to provide the correct number of parameters on the SQL CALL statement.
If SYSTEM.SYSPARMS contains incorrect information, you must redefine the stored procedure. You must do the following:
-444 | FORMAT 1
User program load-module-name could not be found for stored procedure proc-name. FORMAT 2 User program load-module-name could not be found for stored procedure proc-name, AUTHID authid. |
Explanation: DB2 received an SQL CALL statement for a stored procedure and found the row in the SYSTEM.SYSROUTINES catalog table associated with the requested procedure name. However, the load module or phase load-module-name identified in the LOADMOD column of the SYSTEM.SYSROUTINES row could not be found.
SQLSTATE: 42724
System Action: Processing of the SQL statement has ended.
User Response: If the LOADMOD value in SYSTEM.SYSROUTINES is specified incorrectly, do the following:
If the LOADMOD value is correct, ensure that the load module or phase exists and can be accessed by the stored procedure server.
-449 | CREATE PROCEDURE for name contains an invalid format of the external name clause or is missing the external name clause. |
Explanation: An error was found in the EXTERNAL NAME clause of the CREATE PROCEDURE statement for name, or the clause is needed but was not specified.
The external name must be a short identifier with letters or digits. A possible cause for this error is the inclusion of a blank in the name.
If the clause is omitted, the external name defaults to the name of the stored procedure. However, if the procedure name is longer than 8 characters then EXTERNAL NAME must be explicitly specified and a valid short identifier must be provided as the external name.
SQLSTATE: 42878
System Action: The statement cannot be executed.
User Response: Correct the syntax of the SQL statement. Refer to the DB2 Server for VSE & VM SQL Reference manual for information on the EXTERNAL NAME clause.
Explanation: While returning parameters from a stored procedure to an application, DB2 detected an overlay of one of the parameters. A stored procedure overwrote storage beyond a parameter's declared length.
SQLSTATE: 39501
System Action: The results of the stored procedure cannot be returned.
User Response: Examine the stored procedure to determine the cause of the overlay. Ensure that all parameters are declared correctly and that they match the corresponding definitions in SYSTEM.SYSPARMS.
-469 | SQL CALL statement must specify an output host variable for parameter par-number. |
Explanation: DB2 received an SQL CALL statement for a stored procedure. DB2 found the row in the SYSTEM.SYSROUTINES catalog table with the requested procedure name. However, parameter par-number was identified in SYSTEM.SYSPARMS as an OUT or INOUT parameter. A host variable must be supplied on the SQL CALL statement for parameters defined as OUT or INOUT.
System Action: Processing of the SQL statement has ended.
User Response: If the SQL CALL statement is coded incorrectly, modify the SQL application to provide an output host variable on the SQL CALL statement.
If the parameter is defined incorrectly, you must change the procedure definition as follows:
-470 | SQL CALL statement specified a NULL value for input parameter par-number, but the stored procedure does not support NULL values. |
Explanation: DB2 received an SQL CALL statement for a stored procedure and found a null value in the incoming parameter list. The DB2 stored procedure was defined in the SYSTEM.SYSROUTINES catalog table with PARAMETERSTYLE = ' ', which specifies that the DB2 stored procedure does not accept null values.
SQLSTATE: 39002
System Action: Processing of the SQL statement has ended.
User Response: If the stored procedure should not accept null values, change the calling application to provide a nonnull value.
If the stored procedure should accept null values, then:
-471 | FORMAT 1
SQL CALL for stored procedure proc-name failed due to reason reason-code. FORMAT 2 SQL CALL for stored procedure proc-name with AUTHID authid failed due to reason reason-code. |
Explanation: DB2 received an SQL CALL statement for a stored procedure. The CALL statement did not execute successfully.
Possible reason codes are :
SQLSTATE: 55023
System Action: Processing of the SQL statement has ended. A message describing the error may be displayed on the VM system console.
User Response: Correct the condition indicated by the reason code.
-478 | The stored procedure server pserver cannot be dropped because group-name, a new object-type, depends on it. |
Explanation: The stored procedure server cannot be dropped because it is the only stored procedure server in stored procedure group group-name, and stored procedures exist that must run in group-name.
SQLSTATE: 42893
System Action: Processing of the SQL statement ends.
User Response: Either define another stored procedure server in the stored procedure server group group-name, or modify the definition of any stored procedure that can run only in group-name. To modify the definition of a stored procedure, issue the ALTER PROCEDURE statement and specify the SERVER GROUP option, as follows:
-480 | The procedure procedure-name has not yet been called. |
Explanation: The procedure identified in a DESCRIBE PROCEDURE or 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.
|SQLSTATE: 51030
|System Action: Processing of the SQL statement has ended.
|User Response: Correct the order of the statements and rerun the application.|
-482 | The procedure procedure-name returned no locators. |
Explanation: The procedure identified in a ASSOCIATE LOCATORS statement returned no result |set locators.
|SQLSTATE: 51030
|System Action: Processing of the SQL statement has ended.
|User Response: Determine if result set locators are returned from the identified procedure by |using the DESCRIBE PROCEDURE statement.|
-499 | Cursor cursor-name has already been assigned to this or another result set from procedure procedure-name. |
Explanation: An attempt was made to assign a cursor to a result set using the SQL statement |ALLOCATE CURSOR. One of the following applies: |
|System Action: Processing of the SQL statement has ended.
|User Response: Determine if the target result set named in the ALLOCATE CURSOR statement has |been previously assigned to a cursor.
|If the result set has been previously assigned to cursor |cursor-name, then either choose another target result set or call |stored procedure procedure-name again and reissue the ASSOCIATE |LOCATOR and ALLOCATE CURSOR statements.
|If the result set has not been previously assigned to a cursor, the cursor |cursor-name specified in the ALLOCATE CURSOR statement has been |previously assigned to some result set from stored procedure |procedure-name. You cannot assign cursor cursor-name |to another result set, so you must specify a different cursor name in the |ALLOCATE CURSOR statement.
-501 | The cursor referenced in a FETCH, PUT, or CLOSE statement is not open. |
Explanation: The cursor referenced in a CLOSE, PUT, or FETCH is not open now.
SQLSTATE 24501.
System Action: Processing has ended.
User Response: Correct the cause of the problem. Try again.
-502 | The cursor referenced in an OPEN or ALLOCATE CURSOR statement is already open. |
Explanation: You cannot open or allocate a cursor that is already in an open state.
SQLSTATE 24502.
System Action: Processing of the SQL statement has ended.
User Response: Correct the cause of the problem. Try again.
-503 | A column used in the SET clause of an UPDATE statement containing a WHERE CURRENT OF clause was not identified in the FOR UPDATE OF clause of the DECLARE CURSOR statement. |
Explanation: One or more columns named in the SET clause were not declared in the FOR UPDATE OF clause of the query which defined the cursor.
SQLSTATE 42912.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-504 | The cursor name or statement name, name, has not been properly declared or prepared. |
Explanation: One of the following has occurred:
SQLSTATEs:
System Action: Processing of the SQL statement has ended.
User Response: Define the name properly. Try again.
|For an allocated cursor, if an implicit or explicit COMMIT, |ROLLBACK, or CLOSE occurred after the cursor was successfully allocated, |modify the application program logic so that after the COMMIT, ROLLBACK, or |CLOSE operation, it calls the associated stored procedure again, and reissue |the ASSOCIATE LOCATORS and ALLOCATE CURSOR statements.
|For an allocated cursor, if the associated stored procedure was |called again and new result sets were returned after the cursor was allocated, |reissue the ASSOCIATE LOCATORS and ALLOCATE CURSOR statements.
|If this error was encountered while preprocessing of a FETCH |statement that references a cursor allocated by a dynamic ALLOCATE CURSOR |statement, the DYNALC preprocessor option must be used to allow the FETCH to |be processed. For more information, refer to the DB2 Server for VSE & VM Application Programming manual.
-505 | A cursor has been declared or a statement has been prepared more than once. |
Explanation: The name used in a DECLARE CURSOR or PREPARE statement was incorrect. A cursor has been declared more than once or a statement name has been used in more than one PREPARE statement.
SQLSTATE Spaces.
System Action: Processing of the SQL statement has ended.
User Response: Correct the SQL statement using a different cursor or statement name. Try again.
-506 | More than one cursor is declared for statement statement. |
Explanation: You can only declare one cursor for statement shown in this message.
SQLSTATE Spaces.
System Action: Preprocessing of the statement ends.
User Response: Ensure that you have defined only one cursor per statement in your application program. Try again.
-507 | An UPDATE or DELETE statement uses a WHERE CURRENT OF clause, but no cursor is open. |
Explanation: A reference to CURRENT OF CURSOR was made but cursor was not opened.
Note: | If blocking is used on the cursor, you may get a -507 even though you may not have explicitly closed the cursor in DRDA protocol. This is because the application server has implicitly closed the cursor. |
SQLSTATE 24501.
System Action: Processing of the SQL statement has ended.
User Response: Ensure the cursor defined on the SELECT statement is OPENED.
-508 | An UPDATE or DELETE statement uses a WHERE CURRENT OF clause, but the cursor is not properly positioned on a row. |
Explanation: A reference to a CURRENT OF CURSOR was made when the cursor was not positioned on a row or no row has been fetched.
SQLSTATE 24504.
System Action: Processing of the SQL statement has ended.
User Response: Verify that the value in the SQL statement matches the row in the table. Try again.
-509 | An UPDATE or DELETE statement with a WHERE CURRENT OF clause specifies a table for which no cursor exists. |
Explanation: A reference was made to CURRENT OF CURSOR when a cursor is not defined on the current table.
SQLSTATE 42827.
System Action: Processing of the SQL statement has ended.
User Response: Either correct the UPDATE or DELETE statement by removing the WHERE CURRENT OF clause or declare the necessary cursor. Try again.
-510 | You cannot use a WHERE CURRENT OF clause in this UPDATE or DELETE statement. |
Explanation: You can not use a DELETE WHERE CURRENT OF clause if the query is not deleteable. You can not use an UPDATE WHERE CURRENT OF clause if the query is not updateable.
SQLSTATE 42828.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-511 | You cannot declare a cursor with a FOR UPDATE OF clause that involves a query that is not updateable. |
Explanation: Following are some examples of queries that are not updateable:
SQLSTATE 42829.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-512 | You cannot open or close a cursor that has been prepared with an SQL statement other than SELECT or INSERT. |
Explanation: An OPEN or CLOSE has been attempted on a cursor that is not associated with a SELECT or INSERT statement.
SQLSTATE 07005.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-513 | More than 512 disjoint DECLARE CURSOR and PREPARE statements have been used in the program. |
Explanation: If a PREPARE statement uses a cursor, the preprocessor matches it to the appropriate DECLARE CURSOR statement. The total number of such pairs plus any unmatched DECLARE CURSOR and PREPARE statements cannot exceed 512.
SQLSTATE Spaces.
System Action: Processing of this SQL statement has ended.
User Response: Rewrite the program to contain fewer disjoint DECLARE CURSOR and PREPARE statements. Try again.
-515 | You cannot use the SQL EXECUTE statement to perform a COMMIT or ROLLBACK. |
Explanation: The statements that control logical units of work cannot be the object of dynamic SQL statements; PREPARE, EXECUTE, or EXECUTE IMMEDIATE.
SQLSTATEs:
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-516 | The current statement references a statement-name which has not been properly prepared. |
Explanation: The current statement refers to a statement name that has not been properly prepared. The current statement is an EXECUTE, a DESCRIBE, or a dynamic cursor operation.
SQLSTATEs:
System Action: Processing of the statement has ended.
User Response: Correct the logic of the application program to ensure that the referenced statement is properly prepared prior to the current statement, and in the same logical unit of work. Try again.
-517 | The cursor name cursor-name has already been declared for package package-name. |
Explanation: The cursor name specified in a DECLARE CURSOR statement has already been declared for the named package in the current logical unit of work.
SQLSTATE 3C000.
System Action: Processing of the SQL statement ends.
User Response: Two cursors of identical names cannot be declared in the same logical unit of work. Move this statement outside the current logical unit of work, or end the current logical unit of work with a COMMIT or ROLLBACK command before executing this statement. Correct the error and rerun the program.
-518 | The application program references the cursor cursor-name, but the cursor is not declared in the current logical unit of work. |
Explanation: The cursor name used in an Extended OPEN, FETCH, PUT, or CLOSE was not declared (using an Extended DECLARE cursor) in the current logical unit of work.
SQLSTATE 42719.
System Action: Processing of the SQL statement ends.
User Response: Roll back the logical unit of work, then correct the error. Try again.
-519 | The database manager is blocking INSERTs. The application has issued a COMMIT, and there is at least one INSERT cursor which the program has not yet closed. |
Explanation: The application, in which the database manager is blocking INSERTs, has executed a COMMIT statement, but there is still at least one opened INSERT cursor (which has been blocked) in the current logical unit of work that has not been closed. Note that the application may have run successfully on previous occasions because the database manager chose not to block because of storage limitations or was executing the program in single user mode.
SQLSTATE 24505.
System Action: The COMMIT has not been executed and the current logical unit of work has been rolled back.
User Response: Modify the program to ensure that all OPEN cursors have a corresponding CLOSE for the same cursor. Also ensure that all opened cursors will be closed prior to executing a COMMIT statement. After these two conditions are met, preprocess, compile, and execute the program again.
-520 | The database manager is blocking FETCHs for cursor cursor-name. Therefore, a DELETE... WHERE CURRENT OF CURSOR statement cannot be executed against that cursor. |
Explanation: Because the database manager is blocking FETCHs for the mentioned cursor, any dynamic or extended dynamic PREPAREs, or EXECUTE IMMEDIATEs of DELETE... WHERE CURRENT OF CURSOR statements against that cursor are considered errors and will not be executed.
SQLSTATE 42828.
System Action: Processing of the PREPARE or EXECUTE IMMEDIATE statement is terminated.
User Response: Blocking applications cannot use DELETE... WHERE CURRENT OF CURSOR statements in conjunction with SELECT cursors that are qualified for blocking. Such DELETE statements should be removed from blocking applications. If the application continues execution after receiving this SQLCODE, any subsequent EXECUTEs, which are dependent upon the PREPARE of the DELETE, also will not be executed successfully by the database manager.
-521 | The database manager is blocking FETCHs or PUTs. The data type or length has changed for a host variable whose ordinal position is position-number in the host variable list or descriptor SQLDA. |
Explanation: The database manager is blocking FETCHs or PUTs. A discrepancy has been found concerning the use of host variables in the FETCH or PUT. The reason code is in SQLERRD1. The ordinal position of the host variable is in SQLERRD2. The meaning of the SQLERRD1 codes are as follows:
This reason code can also be generated by a NUMERIC or DECIMAL type with a length greater than 31.
Note: | This error can also occur when the database manager is not blocking FETCHs or PUTs. |
SQLSTATE 55021.
System Action: Processing of the PUT or FETCH statement is terminated.
For PUTs, the inserted data is not included in the block buffer.
For FETCHs, the row is not returned to the application and is skipped as part of the output answer set. The next FETCH of the cursor would return the next row, if there is one, of the answer set.
User Response: Check the application. If the host variable associated with an ordinal position in the host variable list or DESCRIPTOR SQLDA changes, make sure its data type and length are identical to the host variable in that position for the previous FETCH or PUT. Also check that the code does not alter the data type or length of elements in the DESCRIPTOR SQLDA from on FETCH or PUT to the next. The data types and lengths may be altered after the subject cursor is closed, but once the cursor is opened, each ordinal position is bound to the data types and lengths specified on the first FETCH or PUT after the OPEN.
You may wish to continue processing even though the row of information was not included in the input or output set. Or you may issue a ROLLBACK and terminate the program, make the correction, and then preprocess, compile, link edit, and run the application again.
-522 | NCSCANS, the initialization parameter that defines the number of cursors which you may open concurrently in a logical unit of work, has been exceeded. |
Explanation: The current logical unit of work in the user application has too many cursors opened concurrently. Each opened cursor usually corresponds to one internal scan, but when joins and subqueries are used, the database manager implicitly opens its own cursors. As a guideline, the database manager will open as many cursors as there are subqueries or tables joined in an SQL SELECT statement (or DECLARE CURSOR SELECT statement). Additional cursors may be opened, however, if the access path chosen requires sorts for ordering. The database manager also implicitly uses internal cursors to execute Searched DELETE, Searched INSERT via SELECT statement, Searched UPDATE, and CREATE INDEX statements and to access its catalog and packages.
One of the following limitations occurred for the current logical unit of work:
SQLSTATE 54014.
System Action: Processing of the SQL statement has ended.
User Response: Acquire information about the number of open cursors in the current logical unit of work and the nature of the SQL SELECT statements associated with those cursors and contact your database administrator. The database administrator may have to change the DB2 Server for VM initialization parameter NCSCANS, or the application may need more SQL COMMIT statements to reduce the number of opened scans in a logical unit of work.
-523 | Section section-number of package package-name was not created as the result of executing the NULL form of an extended dynamic PREPARE or of preprocessing a dynamic PREPARE statement. |
Explanation: The user's application is executing a dynamic PREPARE or the FOR form of an Extended Dynamic PREPARE for the package named package-name. The database manager does not allow such execution because the section number section-number was not created by the execution of either the NULL form of an Extended Dynamic PREPARE, or the previous preprocessing of a dynamic PREPARE statement.
SQLSTATE 54015.
System Action: Processing of the SQL statement has ended.
User Response: The program and the package are probably out of synchronization. Preprocess the program again; then compile and link-edit the program to ensure that the package matches the application. If you are executing the FOR form of the Extended Dynamic PREPARE, make sure that the statement-id specified was generated using the NULL form of the Extended Dynamic PREPARE.
-524 | You used an ORDER BY clause in a query with no cursor. |
Explanation: The system assumes that a statement involving an ORDER BY clause will refer to more than one row. Therefore, queries using an ORDER BY clause should use a cursor.
SQLSTATE 42601.
System Action: Processing of the SQL statement has ended.
User Response: Remove the ORDER BY clause, or define a cursor. Try again.
-525 | Section section-number of package package-name cannot be executed because of an error that was detected at preprocessing time. |
Explanation: At preprocessing time, the ERROR parameter was specified, and the package was stored in the database with incorrect sections. At execution time, an attempt was made to execute the section that contained the error.
SQLSTATE 51015.
System Action: Execution of the statement has ended.
User Response: Correct the statement. Preprocess, compile, link edit, and run the program again.
-530 | The INSERT or UPDATE value of a foreign key constraint-name owned by owner is invalid. |
Explanation: There is an attempted violation of the referential constraint owner.foreign-key during the execution of an insert or update operation on a dependent table. The value is invalid because it does not also appear as a value of the PRIMARY KEY of the parent table of the relationship.
SQLSTATE 23503.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-532 | The DELETE or UPDATE operation is prevented by a rule of RESTRICT associated with the foreign key constraint-name owned by owner. |
Explanation: There is an attempted violation of the referential constraint owner.constraint-name during the execution of a DELETE or UPDATE operation on a parent table. A row in the table cannot be deleted or updated because of either of the following:
SQLSTATE 23504.
System Action: Processing of the SQL statement has ended.
User Response: Examine the constraint rule for all descendent tables to determine the cause of the problem. The specific tables involved can be determined from the relationship constraint-name.
-534 | Invalid multiple row update. |
Explanation: An UPDATE statement cannot be processed because the table is in a nonrecoverable storage pool and a PRIMARY KEY column is an object of the SET clause, and more than one row is selected for updating.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-535 | Invalid UPDATE WHERE CURRENT OF clause. |
Explanation: The UPDATE WHERE CURRENT OF clause cannot be used when the column to be updated is part of a PRIMARY KEY column.
SQLSTATE 42913.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-536 | The DELETE or UPDATE statement is invalid because table owner.table-name can be affected by the operation. |
Explanation: The DELETE or UPDATE statement is invalid because the indicated table is referenced in a subquery of the statement. The indicated table is either:
SQLSTATE 42914.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-537 | The key-type identifies column column-name more than once. |
Explanation: The indicated column-name appears more than once in a key. Key-type could be PRIMARY KEY, FOREIGN KEY, or UNIQUE CONSTRAINT.
SQLSTATE 42709.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-538 | Foreign key constraint-name does not conform to the description of the primary key of table owner.table-name. |
Explanation: The definition of the indicated FOREIGN KEY does not conform to the description of the PRIMARY KEY of the indicated table. Either the keys do not have the same number of columns, or the description of the corresponding columns of the FOREIGN KEY is not identical to the PRIMARY KEY. The requirement for identical descriptions includes data type, field procedure, and length, but not the null attributes. If a field procedure is defined for the corresponding columns, their column CCSID values must be identical. The name is the FOREIGN KEY name specified in the FOREIGN KEY clause or, if a constraint-name was not specified, the generated name.
SQLSTATE 42830.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-539 | Table owner.table-name does not have a primary key. |
Explanation: The indicated table, which is specified as a parent in a FOREIGN KEY clause, cannot be defined as a parent because it does not have a PRIMARY KEY.
SQLSTATE 42888.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-542 | column-name cannot be a column of a key-type because it can contain NULL values. |
Explanation: A column identified in a key is defined to allow null values. Key-type can be a PRIMARY KEY or UNIQUE CONSTRAINT. You cannot allow null values in a PRIMARY KEY or UNIQUE CONSTRAINT column.
SQLSTATE 42831.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-550 | You cannot create or acquire the object-type. The owner SYSTEM is reserved for internal use. |
Explanation: The owner SYSTEM is reserved for internal use and therefore cannot be used as specified.
SQLSTATE 42939.
System Action: Processing of the SQL statement has ended.
User Response: Change owner to a valid name. Try again.
-551 | User user-id does not have the privilege to perform action on object-name. |
Explanation: An attempt was made to reference an object that the user is not authorized to use, or the SQL statement needs specific authority that the user does not have (for example, RUN authority). This can occur if a user with DBA authority preprocesses a program but because of the nature of the SQL statements in the program, the DBA does not have the authority to grant RUN authority to another user. Refer to the DB2 Server for VSE & VM Application Programming manual for information on defining privileges on packages.
This error might also occur if the object is a read-only view (for GRANT DELETE/INSERT/UPDATE).
When this SQLCODE results from GRANT ALL, the grantor has no privilege on the object table/view upon which he/she can grant privileges.
No error message is issued for GRANT ALL on a view if the grantor has at least one grant privilege on the view.
No error message are issued for GRANT ALL on a table if the grantor has less than all possible privileges on the table as long as he/she has at least one privilege.
This code is returned either when, a statement is being executed, or a program is being preprocessed with the EXIST option.
Formats of this code include:
Format 1:
Format 2
Format 3
SQLSTATE 42501.
System Action: Processing of the SQL statement has ended.
User Response: Check that the user ID, owner, and object name are correct and acquire the required authorization for the object.
-552 | userid is not authorized to action. |
Explanation:
Format 2:
Format 3:
Format 4:
Format 5:
Format 6
Format 7
Format 8
Format 9
Format 10
Format 11
This code is returned when either a statement is being executed, or a program is being preprocessed with the EXIST option.
SQLSTATEs:
System Action: Processing of the SQL statement has ended.
User Response: Create the required object or provide the proper name of the object. Try again.
-554 | You cannot grant a privilege to yourself. |
Explanation: The database manager does not allow you to grant your own privileges or set your password even though you have been granted CONNECT authority implicitly through the command "GRANT CONNECT TO ALLUSERS". You can only change your password after the DBA has granted CONNECT authority to you explicitly and set your initial password.
SQLSTATE 42502.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-555 | You cannot revoke an authority or a privilege from yourself. |
Explanation: The authorization subsystem does not allow you to revoke your own authority or privilege.
SQLSTATE 42502.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-556 | An attempt to revoke a privilege from revokee was denied. Either revokee does not have this privilege, or revoker does not have the authority to revoke this privilege. |
Explanation: The authorization subsystem neither allows you to revoke a privilege which has not been granted nor to exceed your authority.
SQLSTATEs:
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-557 | You cannot grant or revoke this combination of privileges. |
Explanation: User granted a privilege which conflicted with the granting of another privilege in the same statement.
SQLSTATE 42852.
System Action: Processing of the SQL statement has ended.
User Response: Refer to the "Statements" section in the DB2 Server for VSE & VM SQL Reference manual. Correct the SQL statement and resubmit it.
-558 | You cannot revoke an authority from user-id because user-id has DBA authority. |
Explanation: If user has DBA authority, only this authority can be revoked by another user with DBA authority. All other authority (RESOURCE, CONNECT, SCHEDULE) cannot be revoked without revoking DBA authority first.
SQLSTATE 42504.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-560 | A CONNECT statement contains an incorrect password for user-id. |
Explanation: The password you submitted to access the database manager is incorrect for your user ID.
SQLSTATE 42505.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-561 | User user-id does not have CONNECT authority. |
Explanation: The specified user is not authorized to access the database manager because CONNECT authority has not been granted.
SQLSTATE 42505.
System Action: Processing of the SQL statement has ended. If you are attempting to switch databases, SQLWARN0 and SQLWARN6 are set to 'S' to signal that a severe error has occurred.
User Response: See your database administrator to obtain the authorization you require. If a severe error has occurred, only a CONNECT statement will be accepted.
-562 | ALLUSERS is a reserved user ID. ALLUSERS can only be used in a GRANT CONNECT statement without a password. |
Explanation: You cannot grant DBA, SCHEDULE, or RESOURCE authority to the reserved user ID ALLUSERS. You can only grant ALLUSERS CONNECT authority without a password.
SQLSTATE 56034.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-564 | Either the statement contains an incorrect authorization name or password, or the password is missing. |
Explanation: Authorization name or password must begin with an alphabetic character and contain up to eight alphabetic or numeric characters. It cannot contain embedded blanks or special characters. A user ID of SYSTEM, PUBLIC, ALLUSERS, or $TOTAL% is not valid. This error also occurs if a password is not supplied.
If SECTYPE=ESM, SQLERRD1 provides extra information about
error:
SQLERRD1 Meaning
09 External Security
Manager - retryable error
10 External Security
Manager - non-tryable error
14 Password Expired
15 Password Invalid
16 Password Missing
18 Userid Missing
19 Userid Invalid
20 Userid Revoked
SQLSTATE 28000.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-565 | Package package-name1 was specified but another package, package-name2, is the subject of the current logical unit of work. You must end the logical unit of work before changing packages. |
Explanation: You established a package as the target of all activity in the current logical unit of work. The package in the SQL statement now being processed is not the same as the target for the logical unit of work.
SQLSTATE 56042.
System Action: Processing of the SQL statement has ended.
User Response: Roll back the logical unit of work and correct the error that is giving the incorrect package. Try again.
-566 | User ID user-id does not have authorization to modify package package-name. |
Explanation: Only the owner or a user who has DBA authority can modify a package.
SQLSTATE 42501.
System Action: Processing of the SQL statement has ended.
User Response: Rollback the logical unit of work, and correct the error. Try again.
-568 | INFILE contents invalid. |
Explanation: An error has been detected in the RELOAD PACKAGE input data file. The format or content of the input file is incorrect.
SQLSTATE Spaces.
System Action: The command is not processed. See Common Error Action for more information.
Programmer Response: Contact the system programmer. The system programmer should perform problem determination. If a DB2 Server for VM system error occurred, make a record of what went wrong and contact the designated support group for your installation.
-601 | The name used in the CREATE statement or the ACQUIRE DBSPACE statement already exists. |
Explanation: An attempt was made to create a table, create an index, create a view, create a synonym, or acquire a dbspace using a name that already exists. SQLERRD1, module names, and descriptions are shown below:
SQLSTATE 42710.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-602 | You can neither create nor alter a table or a view to establish more than 255 columns. |
Explanation: The maximum number of columns for a table or view is 255. The statement contains more than 255 columns for the table or view.
SQLSTATE 54011.
System Action: Processing of the SQL statement has ended.
User Response: Correct the SQL statement so no more than 255 columns will be established for table or view.
-603 | A key-type cannot be created because the table contains rows that are duplicates with respect to the values of the identified columns. |
Explanation: The following are invalid:
The token key-type can be UNIQUE INDEX, PRIMARY KEY, or UNIQUE CONSTRAINT. (If a column has a type of VARCHAR or VARGRAPHIC, two columns that differ only in the number of trailing blanks might cause duplication.)
SQLSTATE 23515.
System Action: Processing of the SQL statement ends.
User Response: If you are creating a unique index, primary key, or unique constraint, correct the statement. Try again.
If you are reorganizing a unique index or activating a primary key or unique constraint, then the unique index or supporting unique index is marked invalid with Duplicates Exist in UNIQUE INDEX. You can use the SHOW INVALID operator command to display invalid indexes.
Either drop the index, remove the duplicates, and recreate the index, or deactivate the primary key or unique constraint, remove the duplicates, and activate the primary key or unique constraint again. For more information about invalid indexes, see the SHOW INVALID operator command in the DB2 Server for VSE & VM Operation manual.
-604 | An incorrect length, precision, or scale was specified for a column. |
Explanation: You cannot create or expand the table to establish the precision, scale (decimal type), or field length specified because it is beyond the design limits of the column type.
SQLSTATE 42611.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-605 | The creation of an index failed because you exceeded the limit for indexes on a table. |
Explanation: The maximum number of indexes that can be created for a table is 255. The target table for an index already has 255 indexes. Adding an index to a table can occur from a CREATE INDEX statement or by adding a PRIMARY KEY or UNIQUE CONSTRAINT to the table.
SQLSTATE 54020.
System Action: Processing of the SQL statement ends.
User Response: Drop an index that you do not need from the table. Try again.
-606 | The COMMENT ON or LABEL ON statement failed because the specified table or column is not owned by owner. |
Explanation: 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.
SQLSTATE 42502.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-607 | The CREATE TABLE statement failed because adding a table would cause more than 255 tables in dbspace owner.dbspace-name. |
Explanation: The dbspace specified in the CREATE TABLE statement exists, but it has 255 tables, which is the maximum number of tables allowed in a dbspace.
The number 255 includes both tables in the dbspace and any internal tables created because of long fields defined in the tables. Each table with one or more long fields requires an internal table to be created in the dbspace.
If the dbspace specified is PUBLIC.SYSnnnn, where nnnn >= 0002 and nnnn <= 9999, the dbspace has 255 tables created for packages. Information about these tables is in catalog table SYSACCESS.
SQLSTATE 54016.
System Action: Processing of the SQL statement has ended.
User Response: There are the following options:
Database Administrator Response: If appropriate, acquire a private dbspace for the user.
-608 | The CREATE TABLE statement failed because the dbspace dbspace-name was not found for the table owner.table-name. |
Explanation: The dbspace specified in the CREATE TABLE statement was not found. The search order is:
SQLSTATE 42704.
System Action: Processing of the SQL statement has ended.
User Response: These are the options:
Then rerun the CREATE TABLE statement.
Database Administrator Response: If appropriate, acquire a dbspace for the user.
-609 | The ALTER statement cannot be applied to a system DBSPACE dbspace-name. |
Explanation: An attempt was made to change a public system dbspace.
SQLSTATE 42832.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-610 | The statement failed because a user without DBA authority attempted to create a table in a dbspace owned by another user or by the system. |
Explanation: Only users with DBA authority can create a table in another user's dbspace or a system dbspace.
SQLSTATE 42502.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-611 | The ALTER statement failed because the NOT NULL option was specified for the new column. |
Explanation: The new column specified in an ALTER TABLE statement must allow null values. The NOT NULL option cannot be used.
SQLSTATE 42601.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
Explanation: All columns within a specific table, view or index must be unique. The user tried to create a column with name as specified in the message, but it already exists in the table.
SQLSTATE 42711.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-614 | You cannot create a(n) key-type1 on a long string column or on a table where the length of the encoded key derived from the key-type2 column(s) is greater than 255 bytes. |
Explanation: Either:
SQLSTATE 54008.
System Action: Processing of the SQL statement has ended.
User Response: For a multiple column key, use fewer columns. If only one column is involved and its data type is VARCHAR or VARGRAPHIC, the length of the encoded value used as the key must not exceed 255. To prevent the encoded key from exceeding the limit, the length of a VARCHAR column must be less than or equal to 204; the length of a VARGRAPHIC column must be less than or equal to 102.
-615 | Package name owner.package-name not found in application server server-name. |
Explanation: The database manager did not find the identified package in the SYSTEM.SYSACCESS catalog table for this application server.
SQLSTATE Spaces.
System Action: The command is not processed. See Common Error Action for more information.
Programmer Response: Ensure the package-name specified in the command is correct. If it is incorrect, correct the command and reprocess it. (See Rerunning DBS Utility.) If the package-name is correct, create the package before processing it with the UNLOAD PACKAGE command, or specify the NEW parameter in the RELOAD PACKAGE command.
-616 | The RELOAD PACKAGE command with the NEW option cannot be used because the package already exists in server server-name. |
Explanation: The Database Services Utility cannot create a package because one with the same package-name already exists in this application server.
SQLSTATE Spaces.
System Action: Command processing on this application server is ended. If the TO clause was used in command, processing continues on subsequent application servers.
Programmer Response: Correct the command by specifying a different package-name or the REPLACE parameter. Reprocess the command for the failed cases. (See Rerunning DBS Utility.)
-617 | You cannot create a(n) key-type on more than 16 columns. |
Explanation: The maximum number of columns for a key-type is 16. key-type can be an INDEX, a PRIMARY KEY, or a UNIQUE CONSTRAINT. The statement contains more than 16 columns for the INDEX, PRIMARY KEY, or UNIQUE CONSTRAINT.
SQLSTATE 54008.
System Action: Processing of the SQL statement has ended.
User Response: Correct the SQL statement so that no more than 16 columns are established for the index, key, or constraint.
-618 | You cannot use the NEW option because the package already exists. |
Explanation: You specified the NEW option on a CREATE PACKAGE statement to create a new package, but the named package already exists.
SQLSTATE 42710.
System Action: Processing of the SQL statement has ended.
User Response: Unless you used the NEW option intentionally to determine whether a package already exists, roll back the logical unit of work, correct the statement, and try again.
Explanation: Explanation tables for the EXPLAIN statement may have been created improperly. Check for an incorrect column type, length, or nulls specification.
If there are no errors in the explanation tables, a system error has occurred. If this is the situation, apply the explanation and actions given for SQLCODE -901.
SQLSTATE 55002.
System Action: Processing of the SQL statement has ended.
User Response: Drop and recreate the required tables before using EXPLAIN. You can use a supplied macro (ARISEXP MACRO) to create the EXPLAIN tables. See the DB2 Server for VSE & VM SQL Reference manual for details about the ARISEXP MACRO file.
-620 | The CREATE TABLE statement failed because user-id has no private, recoverable dbspaces with less than 255 tables. |
Explanation: 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:
SQLSTATE 57022.
System Action: Processing of the SQL statement has ended.
User Response: Suggestions for the three conditions above are:
Then rerun the CREATE TABLE statement.
Database Administrator Response: If appropriate, acquire a private dbspace for the user.
-621 | You have attempted to use invalid index index-id in dbspace dbspace-number. |
Explanation: A statement made by the user attempted to use an index which has been marked invalid.
SQLSTATE 51013.
System Action: Processing of the SQL statement has ended.
User Response: If you are the owner of the invalid index then drop and recreate the index. The index-id can be found in the SYSINDEXES catalog table as follows:
SELECT A.DBSPACENO, B.IID, B.INAME,B.ICREATOR, A.TNAME FROM SYSTEM.SYSCATALOG A, SYSTEM.SYSINDEXES B WHERE A.TNAME = B.TNAME AND A.CREATOR = B.CREATOR AND A.DBSPACENO = dbspace_number AND B.IID = index_id ORDER BY A.DBSPACENO, B.IID ;
Otherwise, notify your database administrator.
Database Administrator Response: Contact the owner of the invalid index and have the owner drop and recreate the index.
-622 | A request to continue collecting statistics while loading table owner.table-name has failed. |
Explanation: The Database Services Utility made a request to continue collecting statistics while loading table owner.table-name. This request failed because the database manager provided statistics as input, but the statistics are not for the table being loaded.
SQLSTATE Spaces.
System Action: Statistics are not collected during subsequent inserts into the table. If this message is received while the Database Services Utility is executing a DATALOAD or RELOAD command, DATALOAD or RELOAD processing is discontinued.
User Response: If you received this message while using the Database Services Utility, reissue the DATALOAD or RELOAD command to continue loading the table. To collect statistics for the specified table, issue an UPDATE STATISTICS command for the table.
-623 | You cannot collect statistics while loading table owner.table-name. Reason Code = reason-code. |
Explanation: The Database Services Utility requested statistics collection to begin for table owner.table-name while the utility added rows to the table. owner is the owner of the table. table-name is the name of the table. The database manager does not support this form of statistics collection for this table, as explained by the reason code:
SQLSTATE Spaces.
System Action: Statistics are not collected during subsequent inserts into the table. If you receive this message while executing a Database Services Utility DATALOAD command, the database manager generates table statistics by issuing an UPDATE STATISTICS statement after the Database Services Utility has loaded all the rows.
User Response: To use this form of statistics collection, you must first correct the indicated problem. Alternatively, you can issue an UPDATE STATISTICS statement for the table after all rows have been loaded into it.
-624 | Completion of statistics for table owner.table-name has failed. Reason Code = reason-code. |
Explanation: The Database Services Utility requested the termination of statistics collection for table owner.table-name during the addition of rows to the table. owner is the owner of the table. table-name is the name of the table. The reason code could be either of the following:
SQLSTATE Spaces.
System Action: The database manager did not modify any table statistics. It discarded any statistics that it had collected.
User Response: To get statistics for the specified table, issue an UPDATE STATISTICS statement for the table.
-625 | A request to collect statistics while loading table owner.table-name has failed. Statistics collection is in progress for some table. |
Explanation: The Database Services Utility made a request to begin collecting statistics for table owner.table-name during the addition of rows to the table. owner is the owner of the table. table-name is the name of the table. This request has failed because statistics are already being collected for some table (this might be the same table). The database manager does not support concurrent collecting of statistics for more than one table by a user. This error occurs only if a previous request to begin collecting statistics did not have a matching request to terminate the collecting of statistics.
SQLSTATE Spaces.
System Action: Statistics are not collected during subsequent inserts into the specified table. The statistics that the database manager has already collected are not affected. If this message is received while you are executing a DATALOAD or RELOAD command, the Database Services Utility stops the DATALOAD or RELOAD processing.
User Response: To collect statistics for the specified table, you must first terminate the statistics collection that is currently underway. If you are using the Database Services Utility, reissue the DATALOAD or RELOAD command.
-629 | SET NULL cannot be specified because foreign key constraint-name cannot contain null values. |
Explanation: The SET NULL option of the indicated FOREIGN KEY clause is invalid because no column of the key allows null values. The constraint-name was specified in the FOREIGN KEY clause or, if a FOREIGN KEY constraint-name was not specified, it is the generated name.
SQLSTATE 42834.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-630 | Duplicate keyword keyword. |
Explanation: The SQL statement contains a duplicate specification for the keyword keyword.
SQLSTATE 42614.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-632 | The table owner1.table-name1 cannot be defined as a dependent of table owner2.table-name2 because of rule restrictions. Reason Code = reason-code. |
Explanation: The object table specified in the CREATE TABLE or ALTER TABLE statement cannot be defined as a dependent of the indicated table because one of the following reason codes = reason-code.
SQLSTATE 42915.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-640 | The clause or scalar function name is invalid because mixed and graphic data are not supported on this system. |
Explanation: One of the following has occurred:
SQLSTATE 56031.
System Action: Processing of the SQL statement has ended.
User Response: Specify the appropriate CCSID for the package, or try the statement on an application server which supports mixed and graphic data.
-641 | You cannot reorganize a key index with a DBSU REORGANIZE INDEX command. |
Explanation: Using the DBSU REORGANIZE INDEX command to reorganize an index that the database manager created to enforce the uniqueness of a primary or unique key is invalid.
SQLSTATE Spaces.
System Action: The Database Services Utility ignores the command.
-644 | name is a duplicate name for the same keytype. |
Explanation: name cannot be defined as a new key-name for the same keytype because the name has already been defined on the current table.
The duplication can occur if the specified name already exists for the same FOREIGN KEY, PRIMARY KEY, or UNIQUE CONSTRAINT on the current table.
SQLSTATE 42710.
System Action: Processing of the SQL statement has ended.
User Response: Specify a different name on the statement. Try again.
-648 | 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. |
Explanation: The foreign key cannot be defined because one of the following reason codes = reason-code:
SQLSTATE 42915.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-649 | The EXPLAIN table owner.explain-table-name was not found in the system catalog. |
Explanation: The EXPLAIN table (owner.explain-table-name) does not exist, so the EXPLAIN statement cannot be performed.
SQLSTATE 42704.
System Action: Processing of the SQL statement has ended, and the statement is not recorded in the package.
User Response: Create the EXPLAIN tables, and then resubmit the application to the preprocessor. You can use the IBM-supplied macro (ARISEXP MACRO) to create the EXPLAIN tables. See the DB2 Server for VSE & VM SQL Reference manual for details about the ARISEXP MACRO file. The explicit EXPLAIN versions of this SQLCODE are +204 or -204.
-656 | Table owner.table-name already has a primary key. |
Explanation: A PRIMARY KEY cannot be defined in an ALTER TABLE statement because the indicated table already has a PRIMARY KEY.
SQLSTATE 42889.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-657 | You cannot issue the UPDATE STATISTICS statement for a view. |
Explanation: An attempt was made to update statistics on a view rather than the base table of the view.
SQLSTATE 42809.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-666 | The LABEL ON statement failed because the row describing the column-name column does not exist in SYSTEM.SYSCOLUMNS or SYSTEM.SYSCATALOG. |
Explanation: The row for the label column (TLABEL or CLABEL) was not found in SYSTEM.SYSCOLUMNS. column-name is either TLABEL or CLABEL. The TLABEL column resides in SYSTEM.SYSCATALOG and contains correlation names. The CLABEL column resides in SYSTEM.SYSCOLUMNS and contains column labels.
SQLSTATE 42703.
System Action: Processing of the SQL statement has ended.
User Response: Verify that your SQL statement is valid. If you cannot determine the cause of the error, contact your system programmer.
Database Administrator Response: Use SQLERRP and SQLERRD1 in message ARI0504I to determine more information about the error. Verify that the DB2 Server for VM catalog has not been destroyed. If this is a system error, make a record of what went wrong and contact the designated support group for your installation.
-667 | The database manager cannot activate the key constraint-name defined for table owner.table-name. Reason Code = reason-code. |
Explanation: The key-type could be PRIMARY KEY, FOREIGN KEY, or UNIQUE CONSTRAINT. For a PRIMARY KEY, constraint-name would be omitted. For a FOREIGN KEY, constraint-name would be the name of the first key that causes the failure. For a UNIQUE CONSTRAINT, constraint-name would be omitted.
The reason code could be one of the following:
You have to update or remove the erroneous rows before the PRIMARY KEY or UNIQUE CONSTRAINT can be activated.
You must activate the PRIMARY KEY of the parent table before you can activate the dependent FOREIGN KEY.
You have to update or remove the erroneous rows before the key can be activated. The failure could occur when you attempt to activate a FOREIGN KEY, or when you attempt to activate a PRIMARY KEY which implicitly activates other FOREIGN KEYs that reference it.
For more information see the DB2 Server for VSE & VM Database Administration manual.
SQLSTATE 22519.
System Action: Processing of the SQL statement has ended. No keys were added or activated.
User Response: See Explanation for the reason of failure and recovery action. For more information, refer to the DB2 Server for VSE & VM Database Administration manual.
-668 | Table owner.table-name is inactive and you cannot access it. |
Explanation: No operation can be performed on this table because at least one inactive key participates in a relationship with this table.
This may be a PRIMARY KEY, a FOREIGN KEY, or a dependent FOREIGN KEY which references the PRIMARY KEY.
While an inactive key exists, only the table owner and a DBA can issue DML statements against the table. In addition, no one can issue DML statements against an active table which results in a reference to an inactive table in order to enforce Referential Constraints.
SQLSTATE 57016.
System Action: Processing of the SQL statement has ended.
User Response: Before using the indicated table you must make sure that all the keys in which the table participates are active. Once the keys are active try the statement again.
-669 | You cannot drop a key index explicitly. |
Explanation: The database manager does not allow you to drop a primary key index or unique constraint index explicitly with the DROP INDEX statement. A key can be a PRIMARY KEY or a UNIQUE CONSTRAINT.
SQLSTATE 42917.
System Action: Processing of the SQL statement has ended.
User Response: If you want to reorganize the primary key or unique constraint index, you can drop and recreate the unique constraint, or deactivate and activate the unique constraint.
If you do not want to keep the unique constraint, you can use the DROP UNIQUE clause of the ALTER TABLE statement to remove the constraint and implicitly remove its index.
-670 | You cannot create the foreign key constraint-name for table owner.table-name. Reason Code = reason-code. |
Explanation: The reason code could be one of the following:
For more information, refer to the DB2 Server for VSE & VM Database Administration manual.
SQLSTATEs:
System Action: Processing of the SQL statement has ended. A foreign key is not created.
User Response: The next step depends on the reason code you received:
-674 | The database manager cannot load the DBCS data conversion routine transproc-name. Reason Code = reason-code(sub-code). |
Explanation: The DBCS data conversion routine transproc_name cannot be loaded. The reason-code has one of the following values:
The sub-code is a one-byte hexadecimal value represented as a hexadecimal string constant. It has one of the following meanings:
X'01' - The error was discovered at the application requester.
X'02' - The error was discovered at the application server.
SQLSTATE 57011
System Action: Processing of the SQL statement has ended.
User Response: Report to your system programmer.
Database Administrator Response:
If there is no longer any need for the DB2 Server for VM application server to run AMODE 24 (that is, if all your user exits and single user mode applications support 31-bit adressing), then you can use the AMODE(31) parameter when running SQSTART. The DB2 Server for VM application server's default addressing mode becomes AMODE 31 and your data conversion routine can be loaded above the 16MB line.
For 3 or 4, use NUCXDROP to drop the conversion routine transproc-name.
-681 | Column column-name is in violation of installation defined field procedure fieldproc-name Return Code=nn, Reason Code=cccc, Message= string. |
Explanation: The installation field procedure fieldproc-name has returned an error for column column-name. Use the return code nn to determine the problem.
The following return codes are reserved:
Use the nn and string, which the field procedure returned, for further information.
SQLSTATE 23507.
System Action: Processing of the SQL statement ends.
User Response: If a field procedure did not cause the error, determine the requirements imposed by the field procedure; verify the data type and length of the values to encode (return code 4), or verify the contents of the Field Procedure Parameter Value List (return code 8). If a field procedure caused the error, examine the field procedure (return code 12).
-682 | The database manager cannot load the field procedure fieldproc-name. Reason Code = reason-code. |
Explanation: The field procedure fieldproc-name cannot be loaded. The reason code can have one of the following values:
SQLSTATE 57010.
System Action: Processing of the SQL statement has ended. The application either commits or rolls back to the previous COMMIT; then the application terminates.
User Response: If you get a reason code of 8 check your application, correct it if necessary and try again. If the application is correct and your problem persists, contact your systems programmer. For all other reason codes, contact your systems programmer immediately.
System Programmer Response:
If there is no longer any need for the DB2 Server for VM application server to run AMODE 24, (that is, all your user exits and single-user-mode applications support 31-bit addressing), then you can use the AMODE(31) parameter when running SQLSTART. AMODE 31 will then become the default addressing mode for the DB2 Server for VM application server, and your field procedure can be loaded above the 16MB line.
-683 | Column type of column name column-name is invalid for string option. |
Explanation: The string option can either be FIELDPROC, FOR subtype DATA, or CCSID integer. The following actions are invalid:
SQLSTATE 42842.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-684 | The length of literal list beginning string is too long. |
Explanation: The length of literal list beginning with string, excluding insignificant blanks and delimiting parentheses, is greater than 254.
SQLSTATE 54012.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-685 | Invalid field type. Column: column-name in table owner.table-name. |
Explanation: The field description returned by the field procedure field-definition function is invalid. The data type code denotes a long string or the data type has an invalid value.
SQLSTATE 58002.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-686 | Column defined with a field procedure cannot be compared to another column with a different field procedure. |
Explanation: The columns specified are not compatible. Each column has a different field procedure, or only one column has a field procedure. If the columns have the same field procedure, their column CCSID values are different.
SQLSTATE 53043.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Refer to the DB2 Server for VSE & VM SQL Reference manual for restrictions on comparing columns defined with a field procedure. Try again.
-687 | Field types incompatible. |
Explanation: Comparing a column defined with a field procedure to the value of a constant or host variable that has an incompatible type is invalid.
SQLSTATE 53044.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Refer to information on predicates definition in the DB2 Server for VSE & VM SQL Reference manual for restrictions on comparing columns defined with field procedures. Try again.
-688 | Incorrect data returned from field procedure. Column = column-name. Table owner.table-name. Reason Code = reason-code. |
Explanation: A field procedure for column column-name in table owner.table-name returned unexpected data.
The reason code can have the following values:
SQLSTATE 58002.
System Action: Processing of the SQL statement has ended.
User Response: Correct the field procedure according to the following reason codes, and try again:
-698 | The statement failed because the invalid entities table could overflow. |
Explanation: The statement requires an available entry in the invalid entities table and the total number of invalid and transient indexes is greater than the internal limit. The statement can be CREATE INDEX, REORGANIZE INDEX, or searched UPDATE. These statements mark indexes transient or invalid during processing and therefore require room in the invalid entities table.
SQLSTATE 56004.
System Action: Processing of the SQL statement has ended.
User Response: Try the statement again later. If the error persists then contact your database administrator.
Database Administrator Response: Use the SHOW INVALID operator command to display the invalid entities table. Notify the owners of the invalid indexes and have them drop and recreate or reorganize the invalid indexes to free entries in the table.
If there are no invalid indexes, the error was caused by too many concurrent CREATE INDEX, REORGANIZE INDEX, and searched UPDATE statements. Try the statement again later.
If the problem persists, do one of the following:
-699 | The ACQUIRE DBSPACE statement failed because all storage pools for available dbspaces are full. |
Explanation: Dbspaces are available, but the storage pools in which they reside do not have enough space for you to acquire dbspaces. The shortage can occur if someone deleted all dbextents from a storage pool, and other storage pools do not have available dbspaces.
SQLSTATE 57037.
System Action: Processing of the SQL statement ends.
User Response: Inform your database administrator.
Database Administrator Response: Use the SHOW POOL command to find the full storage pools. Increase the size of your storage pools.
-700 | No available space in storage pool pool-number. |
Explanation: An SQL request requires a physical page (a new page or a shadow page) but the storage pool does not have enough space. If a REORGANIZE INDEX command returned this SQLCODE, the command processing may have marked the index invalid. Use the SHOW INVALID operator command to determine if the index is now invalid.
SQLSTATE 57038.
System Action: Processing of the SQL statement ends.
User Response: Inform your database administrator.
If an index that you are reorganizing is now invalid, either drop and recreate the index or reorganize it again after the database administrator has corrected the storage pool problem.
Database Administrator Response: Increase the size of the storage pool.
-701 | No available space in the dbspace number dbspace-number for data. |
Explanation: The space allocated for data in the dbspace is full. No more pages are available now. dbspace-number is the dbspace number which has run out of space.
SQLSTATE 57011.
System Action: Processing of the SQL statement has ended.
User Response: Notify your system programmer.
System Programmer Response: Check the PCTFREE value for the dbspace (the value in the FREEPCT column in SYSTEM.SYSDBSPACES). If this value is greater than 0, it can be reduced to 0 by the ALTER DBSPACE statement. This reduction allows for more insertions of data. If PCTFREE is currently 0, you must delete some data from the dbspace to make room for the new data. You can delete space using the DROP TABLE statement. You can also, create a new dbspace and use the DBS Utility UNLOAD and RELOAD statements to transfer the information to the new larger dbspace.
Note: | If the dbspace referenced in the text is the catalog dbspace (SYS0001), you must do another database generation specifying a larger size for the first dbspace. Then use the DBS Utility UNLOAD and RELOAD commands to transfer the information to the new database. |
-702 | No available space in the dbspace number dbspace-number for indexes. |
Explanation: The space allocated in the dbspace for indexes is full. No more pages are available. dbspace-number is the dbspace number which has run out of space.
SQLSTATE 57011.
System Action: Processing of the SQL statement has ended.
User Response: Notify your system programmer.
System Programmer Response: You may use the DROP INDEX statement to make room for the new index. If this is not desirable, a new dbspace will have to be created with a larger number of index pages. This is determined by the PCTINDEX value on the ACQUIRE DBSPACE statement. You may specify a larger PCTINDEX value with the same number of pages as the current dbspace or increase the PAGES value to acquire a larger dbspace. Then use the DBS Utility UNLOAD and RELOAD commands to transfer the information to the new dbspace. Then the original statement may be resubmitted.
For more information, refer to the DB2 Server for VSE & VM Database Administration manual.
Notes:
-703 | No available space in the dbspace for header information. |
Explanation: The space allocated for the database manager to record information about the contents of the |dbspace is full. No more header pages are available.
SQLSTATE 57011.
System Action: Processing of the SQL statement has ended.
User Response: Notify your system programmer.
System Programmer Response: Check the NHEADER value for the dbspace in the catalog table SYSTEM.SYSDBSPACES. If the value is less than 8, issue an ACQUIRE DBSPACE statement with a larger NHEADER value (less than or equal to 8). Then use the DBS Utility UNLOAD and RELOAD commands to transfer the information to the new larger dbspace. If the NHEADER value is already 8, the dbspace is full. |You may either acquire a new dbspace or delete some objects in the |current dbspace by using the DROP TABLE or DROP INDEX statements which will |free space in the current dbspace. Then the original statement may be resubmitted.
For more information, refer to the DB2 Server for VSE & VM Database Administration manual.
Note: | If the indicated action does not eliminate the problem, the dbspace referenced in the text is probably the catalog dbspace(SYS0001). You must do another database generation specifying a larger size for the first dbspace. Then use the DBS Utility UNLOAD and RELOAD commands to transfer the information to the new database. |
-704 | The ACQUIRE DBSPACE statement failed because no dbspaces are available. |
Explanation: Either:
SQLSTATE 57011.
System Action: Processing of the SQL statement has ended.
User Response: For reason 3, enter the SHOW POOL operator command to determine the existing storage pools. Otherwise, notify your system programmer.
System Programmer Response: Determine what type dbspace is needed and perform an ADD DBSPACE operation. For details on ADD DBSPACE, refer to the DB2 Server for VM System Administration manual. The ACQUIRE DBSPACE statement may be resubmitted when a dbspace has been added.
-705 | You specified an incorrect value for the parameter, parameter. |
Explanation: An incorrect value was provided for the parameter specified in the message.
Format 2:
Format 3:
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-706 | The ACQUIRE PUBLIC DBSPACE statement failed because you cannot acquire SYSxxxx from a nonrecoverable storage pool. |
Explanation: Public dbspace names beginning with SYS are system dbspaces and cannot be acquired from a nonrecoverable storage pool. The STORPOOL parameter value is for a nonrecoverable storage pool.
SQLSTATE 53060.
System Action: Processing of the SQL statement has ended.
User Response: Resubmit the request with a recoverable storage pool specified on the ACQUIRE DBSPACE STORPOOL parameter or omit the STORPOOL parameter.
System Programmer Response: Same as user action.
-707 | The ACQUIRE DBSPACE statement failed because the name you specified was incorrect. |
Explanation: The DBSPACE name you specified starts with SYS, but is not in the range SYS0002 to SYS9999.
SQLSTATE 42939.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-708 | You cannot ALTER, LOCK, or DROP a public dbspace because you do not have DBA authority. |
Explanation: DBA authority is required to DROP, LOCK, or ALTER a public dbspace.
SQLSTATE 42502.
System Action: Processing of the SQL statement has ended.
User Response: Notify your database administrator.
-709 | You cannot drop a system dbspace. |
Explanation: You tried to drop a dbspace which has a owner of SYSTEM. This is not allowed.
SQLSTATE 42832.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-710 | An attempt to access a private dbspace failed because it is in use. |
Explanation: The private dbspace you tried to access is now in use.
SQLSTATE 40503.
System Action: Processing of the SQL statement has ended.
User Response: Try again later.
-711 | An attempt to access a dbspace failed because it is disabled. |
Explanation: You tried to access an object in a disabled dbspace. The dbspace cannot be accessed until it is enabled by the system programmer.
This error condition can occur when accessing a view. When a view is accessed, the package generated at CREATE VIEW time must be retrieved. If the package dbspace (SYS000n) is disabled, the statement will fail. In this case, the SQLCA SQLERRP value is ARIXOVC. Note that if SQLERRP is not ARIXOVC (or ARIXELX), then the error occurred because an underlying table is in a disabled dbspace.
If this error condition also returns the SQLERRP value of ARIXELX, this indicates that the program's package resides in a disabled dbspace and cannot be accessed. SQLERRP is displayed in message ARI0504I. In this case, SQLCA fields SQLWARN0 and SQLWARN6 are both set to S to indicate a severe error. This condition will cause ISQL, the DBS Utility, and the FORTRAN preprocessor to terminate.
This error condition can occur during preprocessing or during execution of CREATE VIEW if a package dbspace (SYS000n) is disabled.
System Action: Processing of the SQL statement has ended.
SQLSTATE 57011.
User Response: If you must access the disabled dbspace, you must request your system programmer to enable the dbspace. You can continue to access other dbspaces, unless your DB2 Server for VM application's package is in a disabled dbspace.
-712 | The SQL statement failed because internal dbspaces were not available or were too small. |
Explanation: The system may require internal dbspaces to process SQL statements involving ORDER BY, GROUP BY, or joins. Either it was unable to acquire enough internal dbspaces, or the internal dbspaces were not large enough to process the command.
SQLSTATE 57011.
System Action: Processing of the SQL statement has ended.
User Response: If SQLERRD2 = -74, internal dbspaces are returned to the system by a COMMIT or ROLLBACK statement. If you have issued previous SELECT statements without doing a COMMIT statement, you could alleviate the problem by issuing COMMIT statements interspersed with your other SQL statements. Also, notify your system programmer to increase the number of internal dbspaces in the system.
If SQLERRD2 = -77, -78 or -136 notify your system programmer to increase the size of the internal dbspaces.
System Programmer Response: If SQLERRD2 = -74, allocate additional internal dbspaces using the ADD DBSPACE operation (SQLADBSP EXEC) and resubmit the original command.
If SQLERRD2 = -77, -78 and -136, perform an ADD DBSPACE operation (SQLADBSP EXEC) for internal dbspaces with a larger size parameter than previously specified and resubmit the original command.
-713 | Incorrect isolation level value value specified. |
Explanation: During execution of an application program, an incorrect value for isolation level was found. The only values recognized for this option are:
Note: | If the package was created prior to Version 5 Release 1, you must explicitly repreprocess it before you can specify U for isolation level Uncommitted Read. |
System Action: Processing of the SQL statement has ended.
User Response: Assign a correct value to the SQL isolation level variable in the application program. In COBOL, it is SQL-ISL. In other languages, it is SQLISL. Try again.
-714 | Referential constraints cannot span dbspaces in different types of storage pools. |
Explanation: Both the parent and dependent tables of a referential constraint must be in the same type of storage pool; that is, both are in a recoverable or nonrecoverable storage pool.
SQLSTATE 56035.
System Action: Processing of the SQL statement has ended.
User Response: Make sure both tables are in the same type of storage pool. Correct the statement. Try again.
-720 | The initial subcomponent message repository could not be accessed. |
Explanation: During NLS sub-component initialization, code -720 will be returned by the resource adapter if all of the following conditions have been met:
Note: | "accessed" implies the following:
|
It contains the language id associated with the last language that failed.
SQLERRMT(1:40) has the following meaning:
It contains the language id associated with the last language that failed.
SQLERRD1 has the following meaning:
SQLSTATE 57024.
System Action: Initialization is aborted with the message ARI2902E.
User Response: Contact your system programmer.
System Programmer Response: Ensure that the repository corresponding to the CMS language is available, or that the ARISNLSC MACRO Q's first entry has a corresponding available repository, or that the repository for AMENG is available (repository name for the NUCXLOAD is ARIMS001 MODULE). Available implies that a discontinuous shared-segment can be accessed and is specified in the file ARISNLSC MACRO Q or a NUCXLOADable module can be found on one of the disks.
-721 | The message file associated with the string or ID specified as an argument to a SET LANGUAGE command cannot be accessed. |
Explanation: While issuing the SET LANGUAGE command (ISQL and operator), code -721 will be returned if the repository associated with the SET LANGUAGE command argument cannot be accessed.
SQLERRD1 has the following meaning:
SQLSTATE 57024.
System Action: Processing of the command or statement has ended with the message ARI2900E.
User Response: Ensure that the SET LANGUAGE argument is valid. For example, you require a language string (LANGUAGE) or language ID (LANGID) that is less than or equal to 40 characters in length. The language string or ID is present in the SQLDBA.SYSLANGUAGE catalog table. If there is no entry in this catalog table for your language, contact the Database Administrator.
System Programmer Response: Ensure that the SET LANGUAGE argument that you have been given, exists in the SQLDBA.SYSLANGUAGE catalog table. If the language string or ID are missing or incorrect in SQLDBA.SYSLANGUAGE, update the catalog table accordingly.
-751 | A stored procedure has been placed in MUST_ROLLBACK state due to SQL operation op-name. |
Explanation: A stored procedure issued an SQL operation that forced the DB2 server to roll back the unit of work.
CALL
COMMIT
CONNECT
ROLLBACK
SQLSTATE: 38003
System Action: The statement cannot be executed. All further SQL statements are rejected until the SQL application that issued the SQL CALL statement rolls back the unit of work.
User Response: If this message is received by a stored procedure, the stored procedure must terminate. When control returns to the SQL application that issued the SQL CALL statement, the application must roll back the unit of work. No other SQL statement will be accepted.
The stored procedure should be deactivated by issuing STOP PROC with the REJECT option, so that the disallowed statement can be removed from the procedure. After the statement has been removed, issue the START PROC command to activate the stored procedure.
-752 | You cannot specify an SQL CONNECT statement within a logical unit of work. |
Explanation: You attempted to issue a CONNECT statement before issuing a COMMIT or ROLLBACK statement.
SQLSTATE 0A001.
System Action: Processing of the SQL statement has ended.
User Response: Submit a COMMIT or ROLLBACK statement before the CONNECT statement.
-753 | Internal system error starting a logical unit of work. |
Explanation: While attempting to start a logical unit of work an internal processing error was encountered.
SQLSTATE 58004.
System Action: Processing of the SQL statement has ended.
User Response: Notify your system programmer.
System Programmer Response: Make a record of what went wrong and contact the designated support group for your installation.
-754 | Database manager internal error while attempting to log user data. |
Explanation: While attempting to log user data, a database error occurred. An internal field contained an incorrect value on the log request.
SQLSTATEs:
System Action: Processing of the SQL statement has ended.
User Response: Notify your system programmer.
System Programmer Response: Make a record of what went wrong and contact the designated support group for your installation.
-756 | You are permitted only one CREATE PACKAGE statement in a logical unit of work. |
Explanation: The program contains more than one CREATE PACKAGE statement in the same logical unit of work.
SQLSTATE 56042.
System Action: Processing of the SQL statement has ended.
User Response: Conclude this logical unit of work with a COMMIT or ROLLBACK statement. Remove the excess CREATE PACKAGE statements. Try again.
-757 | A CREATE PACKAGE statement is not permitted following a statement that modifies a package in the same logical unit of work. |
Explanation: The program contains a CREATE PACKAGE statement in a logical unit of work. In the same logical unit of work, extended dynamic PREPARE or DROP STATEMENT statements have been processed to modify an existing package.
SQLSTATE 56042.
System Action: Processing of the SQL statement ends.
User Response: Roll back the logical unit of work, then correct the placement of the CREATE PACKAGE statement. Try again.
-758 | You cannot use the current statement if a program has been created or changed in the same logical unit of work. |
Explanation: The current statement may not follow in the same logical unit of work, if a DROP STATEMENT statement or Extended PREPARE statement is used.
SQLSTATE 56042.
System Action: Terminate processing of the statement.
User Response: Commit or ROLLBACK the current logical unit of work before trying to execute the current statement.
-759 | The database manager has not committed package package-name because it is not a modifiable package and it contains no statements. |
Explanation: The current logical unit of work contains a CREATE PACKAGE. No statements were added to this package so that the COMMIT did not cause the package to be created. This will occur for any CREATE PACKAGE when using the DRDA protocol, or if the NOMODIFY option was specified with the CREATE PACKAGE statement.
SQLSTATE 42943.
System Action: The current logical unit of work was rolled back.
User Response: The package created by the CREATE PACKAGE must have statements added to it by executing Extended PREPARE statements.
-760 | Statement cannot be executed in the same logical unit of work where a package is being updated because the authority to execute the statement did not exist when the package was processed again. |
Explanation: The database manager has processed the subject package again. When this processing ended, the authority to execute the current statement did not exist. The resulting limitation on the user is that the current statement might not execute in the same logical unit of work in which the system is updating the package. A previous DROP STATEMENT or Extended PREPARE against the subject package in the current logical unit of work started the update activity.
SQLSTATE 56044.
System Action: Processing of the SQL statement ends.
User Response: Drop the current statement. Replace it after the authority needed to execute the statement has been granted.
-761 | The language preprocessor being run cannot replace package package-name. |
Explanation: The Assembler, C, PL/I, and COBOL preprocessors cannot be used to replace a package created using the FORTRAN preprocessor or the CREATE PACKAGE statement. A package created by using a CREATE PACKAGE statement can be replaced only by using a CREATE PACKAGE statement with the REPLACE option. It cannot be replaced by the language preprocessor now being executed.
Note: | This SQLCODE will also be issued if you preprocessed a FORTRAN program in a
Distributed Relational Database Architecture (DRDA) environment and then
repreprocess it in a non-DRDA environment.
To avoid this situation, you must either first drop the package or consistently preprocess the program in a DRDA or non-DRDA environment. |
System Action: Processing of the SQL statement has ended.
User Response: Either use the appropriate preprocessor or change the preprocessor parameters PREPNAME or USERID and then rerun the preprocessor.
-762 | Your request is incompatible with the target application server. Reason Code = reason-code. |
Explanation: The target application server cannot process your request. The possible reason code is:
SQLSTATE Spaces.
System Action: Execution of the statement has ended.
User Response: See the Explanation for details.
-801 | Exception error exception-type occurred during operation-type operation on data-type data. |
Explanation: The database manager had to materialize a view. In doing so, an arithmetic operation in the subselect clause of the view definition has caused the program exception identified by the exception-type value.
The explanation for SQLCODE -802 describes the exception-type and data-type values possible.
SQLSTATEs:
System Action: Processing of the SQL statement has ended.
User Response: The information shown in the message can be used by the view owner to determine what data used in the view might be causing the program exception.
System Programmer Response: The view owner can use the information shown in the message to determine what data used in the view might cause the program exception. Running just the subselect clause used in defining the view should cause a similar problem, except it produces SQLCODE -802. This information should help you to determine the problem.
-802 | Exception error exception-type occurred during operation-type operation on data-type data, position position-number. psw1 psw2. |
Explanation: An arithmetic operation in the SQL statement has caused the program exception identified by the exception-type value. The two 4-byte fields shown in the message are the contents of the Program Status Word (PSW) when the abend occurred. exception-type, data-type, operation-type position-number and psw1 psw2 may or may not be returned in SQLCA, depending on where the error was detected. The SQLERRD1 field will be -9xx, where xx is the value of the interruption code.
Note: | SQLERRD1 would not be set if you are using the Distributed Relational Database Architecture (DRDA) protocol. |
The following is a list of exception-type values:
The possible data-types are INTEGER, SMALLINT, DECIMAL, and FLOAT. The data type displayed in the message indicates the data type of the temporary internal copy of the data which may differ from the actual column or literal data type due to conversions by the database manager. The possible operation-types are ADDITION, SUBTRACTION, MULTIPLICATION, and DIVISION. (Unary minus is treated as a multiply by -1.) If the error was in the select-list of an outer SELECT statement then position-number will indicate the position of the expression in the select list. If the error was not in the select-list, position-number will be zero.
SQLSTATEs:
System Action: Processing of the SQL statement ends.
User Response: Check the arithmetic operation and the columns within the statement to determine what data may be causing the program exception. If you cannot determine the cause of the error, contact your system programmer.
Note: | If the error occurred in the select-list of an outer subselect, indicator variables can be added to each of the expressions to allow you to get values not in error and retrieve subsequent rows. In that case, the +802 SQLCODE would be issued. |
System Programmer Response: Check the arithmetic operation and the columns within the statement to determine what data may be causing the program exception. The exception-type and associated PSW shown in the message should aid in problem determination. Also refer to the DB2 Server for VSE & VM Database Administration manual for information on arithmetic operations.
Explanation: A column was defined with a unique index, primary key, or unique constraint. An attempt was made to update such a column with a value that already exists in that column. This is not allowed.
If a column has a type of VARCHAR or VARGRAPHIC, two column values which differ only by trailing blanks cause duplication.
The index name corresponding to index-id can be found in the SYSINDEXES catalog table as follows:
SELECT A.DBSPACENO,B.II.INAME,B.ICREATOR,A.TNAME FROM SYSTEM.SYSCATALOG A, SYSTEM.SYSINDEXES B WHERE A.TNAME = B.TNAME AND A.CREATOR = B.CREATOR AND A.DBSPACENO = dbspace-number AND B.IID = index-id ORDER BY A.DBSPACENO,B.IID
The reason code provides additional information about the error.
SQLSTATE 23505.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-804 | Either the structure or the section number in the RDIIN control block with call type call-type is incorrect. |
Explanation: The database manager found an incorrect call type in the RDIIN structure. SQLSTATE 07002.
System Action: The processing of this call to the database manager ends.
User Response: If your program generates its own RDIIN structure or modifies an RDIIN structure that DB2 Server for VM preprocessors generated, ensure that a valid call type is in the RDIIN.
If your program does not generate its own RDIIN or modify an existing RDIIN, a database manager error has occurred. Notify your system programmer.
System Programmer Response: Record the error and contact the designated support group for your installation.
-805 | The package owner.package-name is not in the SYSTEM.SYSACCESS catalog table. |
Explanation: When the system tried to run the program, it could not find the package in the catalog table SYSTEM.SYSACCESS.
SQLSTATEs:
System Action: Processing of the SQL statement has ended. The application can issue subsequent SQL statements.
User Response: Be sure that the program has been preprocessed with no errors. If not, correct any errors which caused the preprocess to fail, preprocess the program and rerun it.
If you are using multiple databases, you may use the CONNECT statement to switch to a different database to do some other work.
-806 | The package owner.package-name is unusable. |
Explanation: The package is unusable because it depends on some name (table, view, index, etc.) not now defined, or some authorization is required which is not granted now.
SQLSTATE Spaces.
System Action: Processing of the SQL statement has ended. The logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: Determine the name or authorization that is required and submit necessary statements to correct the error. If a change is made to the program, it must be preprocessed.
If you are using multiple databases, you may use the CONNECT statement to switch to a different database to do some other work.
If you are using CMS work units, you may switch to another work unit to do some work. If the CMS work unit in which the error occurred is reestablished at any time, errors may result and the work unit status will be unknown. If a severe error has occurred, only a CONNECT statement will be accepted.
-807 | The maximum number of active packages for an agent is exceeded. Maximum allowed number is npackage. |
Explanation: The user has link edited more than the permissible number of programs together and has executed an SQL statement from each of them without an intervening COMMIT or ROLLBACK. This means that the user has more than the permissible number of packages active at the same time. The maximum number of active packages allowed is the same as the value of the initialization parameter NPACKAGE.
SQLSTATE 54017.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response:
If the value of the NPACKAGE parameter changes, using the new value, re-run the SQLSTART EXEC.
If you are using multiple databases, you may use the CONNECT statement to switch to a different database to do some other work.
If you are using CMS work units, you may switch to another work unit to do some work. If the CMS work unit in which the error occurred is reestablished at any time, errors may result and the work unit status will be unknown.
-809 | The statement failed because an attempt was made to insert a row longer than allowed. |
Explanation: The row was longer than allowed for a table. Only 4080 bytes of data can be placed in a row, unless a long string is involved. 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.
This error is not detected at the time the table is created. Rather, the error is issued the first time that an attempt is made to insert data into the table.
SQLSTATE 54018.
System Action: Processing of the SQL statement has ended.
User Response: Drop the table. Recreate the table so that the total length of a row is reduced. Try again.
-810 | The statement failed because more than one row was returned for a SELECT clause when only one is allowed. (Subquery or non-cursor SELECT). |
Explanation: A cursor SELECT is required to return more than one row.
The contents of any output host variables are unpredictable.
SQLSTATE 21000.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-811 | The use of this statement is invalid against a section created by a PREPARE SINGLE ROW statement. |
Explanation: The only statements that can be executed against a section created by the PREPARE SINGLE ROW form of the EXTENDED PREPARE statement are Extended EXECUTE statements specified with the OUTPUT DESCRIPTOR clause and Extended DESCRIBE statements.
SQLSTATE 07007.
System Action: Processing of the SQL statement has ended.
Programmer Response: Correct the statement. Try again.
-813 | You cannot lock a view. |
Explanation: An attempt was made to lock a view. A user may only lock a DBSPACE or a table.
SQLSTATE 42809.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-814 | You cannot lock a system dbspace or catalog table. |
Explanation: A dbspace with owner of SYSTEM or a catalog table cannot be locked.
SQLSTATE 42832.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-815 | CONNECT denied by accounting user exit routine. |
Explanation: An attempt to connect to the application server was rejected by the installation's accounting user exit routine. Note that this can occur on either an explicit or implicit
SQLSTATE 42505.
System Action: The application server denies the connection and returns to the application. SQLERRD1 contains the return code from the installation's accounting user exit routine.
User Response: Contact the database administrator to verify the authorization name which was rejected.
-816 | Error converting a date/time value in the local exit routine exit-name. |
Explanation: The local date/time exit exit-name encountered an error when converting a date/time value from/to the local format.
SQLERRD5 contains the function code with the following values.
SQLERRD1 contains the return code set by the local exit.
SQLSTATE 58002.
System Action: The statement is not executed.
User Response: Contact your system administrator about this problem.
-818 | The preprocessor-generated consistency token in the load module is different from the consistency token in the package. |
Explanation: At preprocessing time, the database manager creates a consistency token and stores it, for run time use, in the source program (to be stored later in the object program) and in the package. At run time, the consistency token within the package is compared with the consistency token in the object program being executed. If the two consistency tokens do not match, the package and the program were not the result of the same preprocessing invocation.
This problem can occur if the owner of an application changes the program (in other words, adds or deletes SQL statements), repreprocesses and recompiles the application, and someone else tries to run the program using the old object code.
SQLSTATE 51003.
System Action: Processing of the SQL statement ends.
User Response: Preprocess and compile the program again and rerun it, or rerun the program using the object code that matches the package.
-821 | The PREPARE or EXECUTE IMMEDIATE statement failed because the associated SQL statement has an incorrect length. |
Explanation: The SQL statement that was sent over to the database manager on a PREPARE or EXECUTE IMMEDIATE statement at execution time contained an incorrect length. The SQL statement was expected to be in the form of a variable length character string with length of from 0 to 8 192 bytes.
SQLSTATE 22501.
System Action: Processing of the SQL statement has ended.
User Response: Ensure that the SQL statement that is being used by the PREPARE or EXECUTE IMMEDIATE statement is a variable length character string with a length of from 0 to 8 192.
For a host variable declared as a fixed length character string variable in PL/I or in FORTRAN, ensure that the length is correct.
-823 | The statement failed because you are not permitted to perform this operation on a catalog table. |
Explanation: This code is issued when you attempt to do any of the following:
Only someone with DBA authority may issue UPDATE, INSERT and DELETE statements against catalog tables whose columns may be altered. For a list of alterable catalog tables, see the DB2 Server for VSE & VM SQL Reference manual.
SQLSTATE 42832.
System Action: Processing of the SQL statement has ended.
User Response: Correct the statement. Try again.
-824 | Resource Adapter internal error. |
Explanation: This is a DB2 Server for VM system error. An incorrect internal modify cancel request was made, or an internal error occurred during blocking of a FETCH or PUT request. SQLERRD1 contains further information about the error. The possible values are:
SQLSTATE 58004.
System Action: Processing of the SQL statement has ended.
If the value of SQLERRD1 is less than zero, a severe error has occurred. The logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: Notify your system programmer. After a severe error has occurred, only a CONNECT statement will be accepted.
System Programmer Response: Make a record of what went wrong. Ensure that the SQLERRD1 value is included in the information. Contact the designated support group for your installation.
-825 | An error occurred while processing an operator command. |
Explanation: An error occurred while processing an operator command. SQLERRD1 contains further information about the errors. The possible values are:
SQLSTATE 51010.
System Action: database operator command processing ends.
User Response: Ensure that the command is correct and try again. However, if the SQLERRD1 is +66 and the problem persists, notify your system programmer.
System Programmer Response: Refer to the error messages returned to the user and the operator, and take the appropriate corrective action.
-826 | The statement identifier statement-id in package owner.package-name is not valid because: reason-code. |
Explanation: The statement-id of an Extended DESCRIBE, DECLARE cursor, or EXECUTE is not valid for one of the following reasons:
SQLSTATEs for reason codes 1 and 2:
SQLSTATEs for other reason codes:
System Action: Execution of the SQL statement has ended.
User Response: Rollback the logical unit of work, then correct the error. Try again.
-827 | Extended dynamic statements are permitted only for package created by the CREATE PACKAGE statement. Package owner.package-name was not created by CREATE PACKAGE. |
Explanation: You can use extended dynamic statements only to execute or modify a package that a CREATE PACKAGE statement has created.
SQLSTATE 42862.
System Action: Processing of SQL statement ends.
User Response: Roll back the logical unit of work, correct the error, and rerun the program.
-828 | Package owner.package-name was created using the NODESCRIBE option of the CREATE PACKAGE statement. Therefore, you cannot use the DESCRIBE statement for it. |
Explanation: You used the NODESCRIBE option when creating the package with the CREATE PACKAGE statement.
SQLSTATE Spaces.
System Action: Processing of the SQL statement has ended.
User Response: Roll back the logical unit of work, then correct the error. Try again.
-829 | You cannot use a CREATE PACKAGE statement with the REPLACE option to replace package owner.package-name which was created with the MODIFY option. |
Explanation: When the package was originally created, the MODIFY option was specified. The current CREATE PACKAGE statement is incorrect because it contains the REPLACE option. A modifiable package may not be replaced.
SQLSTATE 56046.
System Action: Processing of SQL statement has ended.
User Response: Rollback the logical unit of work, then correct the error. Try again.
-830 | You cannot use an Extended PREPARE or DROP STATEMENT to change package owner.package-name. |
Explanation: You are not allowed to add or delete a statement from the package either because:
SQLSTATE 42859.
System Action: Processing of the SQL statement ends.
User Response:
Explanation: The only SQL extended dynamic statements that might reference or modify a package created using the CREATE PACKAGE statement are:
Any other SQL statements referencing a CREATE PACKAGE package are invalid.
SQLSTATE Spaces.
System Action: Processing of the SQL statement has ended.
User Response: Roll back the current logical unit of work, correct the problem, and rerun the preprocessor.
Explanation: After you have issued a CREATE PACKAGE, rules apply to the execution of SQL statements that can follow in the same logical unit of work. Those rules are:
After a COMMIT or ROLLBACK statement is issued, these rules no longer apply.
SQLSTATE 56042.
System Action: Processing of the SQL statement has ended.
User Response: Modify the user program so that the statement in error is executed after the package has been committed or rolled back. A package is committed with the COMMIT statement and rolled back with the ROLLBACK statement.
Explanation: The database manager is rebinding package or view name. The package or view was preprocessed with the character set charset1. The database manager is currently running using character set charset2, which is different from the preprocessed character set.
Note that if the value of the column 'VALID' in SYSTEM.SYSACCESS is manually changed to 'N' by a user for a view package, this error will be received on all subsequent invocations of the view.
SQLSTATE 51016.
System Action: Rebinding is terminated and processing of the SQL statement has ended.
User Response:
1. Preprocess the package again.|If it is the DBS Utility package (SQLDBA.ARIDSQL), use the |ARISDBMA EXEC to recreate it. See the DB2 Server |for VM Program Directory for details on the ARISDBMA EXEC.
2. Contact the database administrator. End the application server and restart, supplying a character set name in the CHARNAME parameter that is identical to the character set that was used to first preprocess the package.
Packages preprocessed using either the ENGLISH or the INTERNATIONAL character set never encounter this error. They are always rebound in ENGLISH or INTERNATIONAL, respectively.
-834 | The NULL form of the Extended PREPARE statement does not follow a CREATE PACKAGE...USING NOMODIFY statement in the current logical unit of work. |
Explanation: The user application is executing an Extended PREPARE statement using the NULL option. In the current logical unit of work, this statement does not follow a CREATE PACKAGE statement of the form: CREATE PACKAGE...USING NOMODIFY... . Therefore, the database manager does not allow it to be executed. The database manager enforces an execution sequence rule for the NULL form of the Extended PREPARE: it must be in the same logical unit of work as CREATE PACKAGE of the form: CREATE PACKAGE...USING NOMODIFY... ; and it must follow the CREATE PACKAGE in the execution sequence.
SQLSTATE 56047.
System Action: Processing of the SQL statement has ended.
User Response: Arrange the execution sequence of the NULL form of the Extended PREPARE so that it follows, in the same logical unit of work, a CREATE PACKAGE of the form: CREATE PACKAGE... USING NOMODIFY... .
-835 | The database manager cannot rebind the view owner.view-name because this view was created in a previous version of the database system. |
Explanation: When the database manager is running an application for the first time, and the application uses a view that was created before the current version of the application, the database manager rebinds the CREATE VIEW statement of the view.
An unexpected error can occur during the rebinding. In most instances, this is because the view definition included a SELECT * and the table on which the view is based had columns added to it since the view was originally created. In this instance, SQLERRD1 is equal to -110. Otherwise, SQLERRD1 is set to the SQLCODE that indicates the error detected during view repreprocessing.
When the application server default CHARNAME value has been changed and a view has a dependency on a system table, the view is no longer valid. In this case, SQLERRD1 is set to -833.
SQLSTATE 56049.
System Action: Processing of the SQL statement has ended.
User Response: Drop the view and recreate it before rerunning the application. Contact your database administrator to have this done.
-836 | The current statement cannot be executed using the DRDA protocol. |
Explanation: The current statement is not defined in the DRDA protocol. The following is a list of the statements that are not supported when the DRDA protocol is used.
SQLSTATE 42612.
System Action: Processing of the SQL statement has ended. The logical unit of work (if any) has been rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: Preprocess and execute the program against the database application server and do not use the DRDA protocol. If you must execute against the non-DB2 Server for VM application server, a program should be rewritten to avoid these statements. For example, if the current statement is a PREPARE SINGLE ROW, replace it with a Basic PREPARE and use cursor operations to retrieve the required data.
-841 | A communications directory error has occurred. Reason Code= X'reason-code'. |
Explanation: The database manager detected an error with the communications directory when it tried to resolve the server name.
The reason-code value is the 2-byte hexadecimal error code. Possible reasons for the error:
SQLSTATE:
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: After a severe error has occurred, only a CONNECT statement will be accepted.
Correct the communications directory problem and try to connect again.
-844 | An Extended PREPARE can only be executed using the DRDA protocol if it has an input SQLDA. |
Explanation: You cannot PREPARE an SQL statement with host parameter markers without specifying input SQLDA when using the DRDA protocol.
SQLSTATE 56041.
System Action: Processing of the SQL statement has ended.
User Response: Execute the program using PROTOCOL (AUTO) when the database manager is accessed. If you must execute against a non-DB2 Server for VM database, the program should be rewritten to include the SQLDA information for the parameter markers specified in the PREPARE statement.
-860 | The SQL statement was not processed because the application server server-name is not accepting connections from DRDA-only application requesters. |
Explanation: An implicit or explicit connect request has failed. An application requester that uses the DRDA protocol cannot be connected to an application server that only supports the DB2 Server for VM protocol.
SQLSTATE 56077.
System Action: Processing of this SQL statement has ended. The resource adapter returns to the application with SQLCA fields SQLWARN0 and SQLWARN6 both set to S, indicating a serious system error.
User Response: If the application does not require that the DRDA protocol be used, then issue either SQLINIT PROTOCOL(AUTO) or SQLINIT PROTOCOL(SQLDS) to change the application requester's protocol to one that the application server may accept.
-861 | Neither protocol option AUTO nor DRDA can be specified because the DRDA facility has not been installed for the application requester. |
Explanation: The SQLINIT parameter PROTOCOL is set to either AUTO or DRDA. However, the DRDA facility has not been installed for the application requester.
SQLSTATE 56079
System Action: Processing of the SQL statement ends. The resource adapter returns to the application with the SQLCA fields SQLWARN0 and SQLWARN6 both set to S, indicating a serious system error.
User Response: Change the SQLINIT parameter PROTOCOL to SQLDS if you do not need to use either AUTO or DRDA. Otherwise, contact your database administrator to install the DRDA facility.
Database Administrator Response:
Determine whether or not you require your application requester to initiate DRDA conversation. If so, install the DRDA facility following the steps in the DB2 Server for VM System Administration manual. If not, specify PROTOCOL(SQLDS) on the SQLINIT EXEC.
-900 | The SQL statement cannot be executed because the previous error has left the application in an unconnected condition. |
Explanation: A previous failure has placed the application process in a connectable and unconnected state. The only SQL statement that can be executed from the connectable and unconnected state is CONNECT.
SQLSTATE 08003.
System Action: Processing of the SQL statement ends and SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: After a severe error occurs, enter a CONNECT statement only.
-901 | The SQL statement failed because of a system error. You can continue to use the database manager. |
Explanation: An error has occurred which is due to system error.
SQLSTATE 58004.
System Action: Processing of the SQL statement has ended.
User Response: Verify that your SQL statement is valid. If you cannot determine the cause of the error, contact your system programmer.
SQLERRD2 in message ARI0504I or in the SQLCA is the DBSS return code which may further define the error that occurred. The following SQLERRD2 codes are considered to be limit or user errors, not system errors:
For a complete list of possible SQLERRD2 values, see Chapter 18, DBSS Return Codes.
System Programmer Response: Use SQLERRP and SQLERRD1 in message ARI0504I to determine more information about the error. Verify that the database catalog has not been destroyed. If this is a system error: Make a record of what went wrong and contact the designated support group for your installation.
-902 | Serious system error. Discontinue further use of the database manager. |
Explanation: An unrecoverable error occurred.
SQLSTATE 58005.
System Action: Processing of the SQL statement has ended. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred. If a severe error has occurred, only a CONNECT statement will be accepted.
User Response: Notify your system programmer.
If you are using multiple databases, you may use the CONNECT statement to switch to a different database to do some other work.
If you are using CMS work units, you may switch to another work unit to do some work. If the CMS work unit in which the error occurred is reestablished at any time, errors may result and the work unit status will be unknown.
System Programmer Response: Use SQLERRP and SQLERRD1 in message ARI0504I to determine more information about the error. Make a record of what went wrong and contact the designated support group for your installation.
-903 | The current logical unit of work has been rolled back because of a system failure. |
Explanation: An error has occurred that may be due to a user error or a real system error. The catalog may be destroyed. Refer to User Response.
SQLSTATE 40003.
System Action: Processing of the SQL statement has ended. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred. If a severe error has occurred, only a CONNECT statement will be accepted.
User Response: Notify your system programmer.
If you are using multiple databases, you may use the CONNECT statement to switch to a different database to do some other work.
SQLERRD2 in message ARI0504I or in the SQLCA is the DBSS return code which may further define the error that occurred. The following SQLERRD2 codes are considered to be limit or user errors, not system errors:
For a complete list of possible SQLERRD2 values, see Chapter 18, DBSS Return Codes.
System Programmer Response: SQLERRD2 in message ARI0504I is the DBSS return code if SQLERRD2 is not zero. For more information about the error, see Chapter 18, DBSS Return Codes. If SQLERRD2 is zero, a database system error has occurred. In that case, make a record of what went wrong and contact the designated support group for your installation.
-906 | The current program was cancelled because of a system error. The program exception is as follows: exception-type psw1 psw2 |
Explanation: While the system was executing a package, a program exception occurred.
SQLSTATE 58023.
System Action: Processing has ended.
User Response: Notify your system programmer.
System Programmer Response: The exception-type and associated PSW shown in the message should aid in problem determination. If a database system error occurred, make a record of what went wrong and contact the designated support group for your installation.
-911 | The current logical unit of work was rolled back because of a deadlock or timeout. It was waiting for a lock-level lock in dbspace = dbspace-number held by user sql-userid. Reason code = code. |
Explanation: 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 value of lock-level can be any one of DBSPACE, TABLE, INDEX PAGE, PAGE, INDEX KEY, or ROW.
SQLSTATE 40001.
System Action: Processing has ended for this logical unit of work and all changes to the database have been rolled back.
User Response: If a deadlock occurred, resubmit your current job at a later time.
If a lock timeout occurred, determine if the lock timeout value is too short or resubmit your current job at a later time.
Operator Response: If a lock timeout occurred and it is determined that the lock timeout value is too short, the lock timeout value can be increased by using the SET LTIMEOUT new-time command.
-912 | The current logical unit of work was rolled back because of excessive (system-wide) lock requests. |
Explanation: The system has encountered too many system lock requests and has ended processing for this logical unit of work.
SQLSTATE 57028.
System Action: Processing has ended for this logical unit of work and all changes to the database have been rolled back.
User Response: Resubmit your current SQL application at a later time.
-913 | Unsuccessful execution caused by timeout. Reason code reason-code, type of resource resource-type, and resource name resource-name. |
Explanation: A CALL statement has timed out while waiting for a stored procedure server. The startup parameter PTIMEOUT determines the maximum time the database manager will wait for a stored procedure server to be assigned for an SQL CALL statement.
Possible reason codes are:
1 An agent has exceeded the allowed time
to wait for a stored procedure server
to become available.
2 A stored procedure server failed to
start within the allowed time.
SQLSTATE: 57033
System Action: The statement terminates.
User Response: Run the application again when the stored procedure servers are less busy. Consider rebalancing the stored procedure server workload, or defining additional stored procedure servers.
-914 | A ROLLBACK of the current logical unit of work was scheduled because of a user CANCEL request. |
Explanation: A CANCEL request has been issued. The CANCEL could be initiated by the user or by the system. The CANCEL initiated by the system is a result of reaching the limit on lock request blocks.
SQLSTATE 57014.
System Action:
User Response: You may continue to use SQL.
If the user did not issue a CANCEL request, then retry at a later time and if the operation is still receiving an SQLCODE of -914, contact your system programmer about increasing the NLRBU or the NLRBS parameters when starting the application server.
-915 | The current logical unit of work was rolled back because of excessive locks held for this logical unit of work. |
Explanation: The user has issued too many lock requests within the logical unit of work.
SQLSTATE 57029.
System Action: Processing has ended and all changes to the data base have been rolled back.
User Response: Issue a COMMIT statement between lock requests and rerun.
-916 | The current logical unit of work was rolled back because of operator action. |
Explanation: The database virtual machine operator entered the FORCE command to cause ROLLBACK of the current logical unit of work.
SQLSTATE 57027.
System Action: ROLLBACK logical unit of work.
User Response: You may continue to use SQL.
-917 | The package was not created and the logical unit of work was rolled back due to a system error. |
Explanation: During preprocessing or the creation of a nonmodifiable extended dynamic package that was processed with the ERROR bind option, an error occurred that prevents the package from being created. The logical unit of work was rolled back (SQLWARN0 = W, SQLWARN6 = W). Examples of these types of errors are invalid section numbers, internal limitations of the system, or a system error (-9XX).
SQLSTATEs:
System Action: Processing has ended for this logical unit of work and all changes to the database have been rolled back.
User Response: Correct the cause of the problem and try again.
-921 | The system catalog table table-name has an incorrect column type column-type. |
Explanation: The catalog table in the message has an incorrect column type as shown.
SQLSTATE 58025.
System Action: Processing of the SQL statement has ended.
User Response: Notify your system programmer.
System Programmer Response: This is a system error. Make a record of what went wrong and contact the designated support group for your installation.
-923 | The index was marked invalid. |
Explanation: One of the following may have happened during ROLLBACK, UNDO or REDO processing:
SQLSTATE 51012.
System Action: The database manager completed the ROLLBACK, UNDO, or REDO without updating the index and marked the index invalid. You may now have more than one invalid index. If the database manager performed an implicit ROLLBACK, the actual reason for the ROLLBACK (DBSS Return Code) is in SQLERRD2.
User Response: Issue the SHOW INVALID operator command to find the invalid indexes. You cannot use an invalid index until you have dropped and recreated it. Drop invalid indexes that you own, and inform your system programmer about any other invalid indexes.
System Programmer Response: Contact the owners of the invalid indexes and have them drop and recreate the indexes.
-928 | An error has occurred while connecting with the CMS GLOBALV Command Processor when trying to access GLOBAL variable name. |
Explanation: An error occurred when the application server tried to access the LASTING GLOBALV file. The SQLINIT EXEC and the CMS GLOBALV command write parameters to the LASTING GLOBALV file. Possible causes are:
The system tried to access the global variable name.
SQLERRD1 contains further information about the error. The possible values are:
System Action: Processing of the SQL statement ends.
User Response: Issue the SQLINIT EXEC with the correct parameters, or issue SQLINIT RESET to reset to DB2 Server for VM default values. If the error persists, notify your system programmer.
System Programmer Response: Verify the parameters that were specified in the SQLGLOB EXEC during initialization.
-930 | Sufficient storage is not available to process the statement. |
Explanation: The virtual storage necessary to execute the command is not available now.
SQLSTATE 57011.
System Action: Processing of the SQL statement has ended.
User Response: Resubmit the statement later. If the problem persists, notify your system programmer.
System Programmer Response: One of the following has occurred:
This error is associated with message ARI0001E. Refer to the explanation of message ARI0001E for more information.
Use a larger virtual machine for the database manager. If the problem persists, make a record of what went wrong and contact the designated support group for your installation. If the problem persists, make a record of what went wrong and contact the designated support group for your installation.
-931 | Failure while freeing dynamically allocated storage. |
Explanation: While attempting to free storage during processing, an error occurred. This is a DB2 Server for VM or VM error.
SQLSTATE 58004.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: This is a DB2 Server for VM or VM error.
Notify your system programmer. After a severe error has occurred, only a CONNECT statement will be accepted.
If you are using CMS work units, you may switch to another work unit to do some work. If the CMS work unit in which the error occurred is reestablished at any time, errors may result and the work unit status will be unknown.
System Programmer Response: Make a record of what went wrong and contact the designated support group for your installation.
-932 | An error occurred when the Resource Adapter attempted to get or to free dynamic storage. |
Explanation: The resource adapter encountered an error in either getting or freeing storage needed for control blocks and work areas. SQLERRM will be set to GET for a failure when trying to obtain storage. SQLERRM will be set to FREE, MBXFREE, CURSFREE, or SQLDAFRE for a failure when trying to free up storage.
SQLSTATEs:
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: If possible, retry with a larger virtual machine size. Otherwise, notify your system programmer.
After a severe error has occurred, only a CONNECT statement will be accepted. If the resource adaptor is initialized, only a CONNECT statement will be accepted. If the resource adaptor is not initialized, any subsequent statement will result in termination of the application.
If you are using CMS work units, you may switch to another work unit to do some work. If the CMS work unit in which the error occurred is reestablished at any time, errors may result and the work unit status will be unknown.
System Programmer Response: SQLERRD1 contains the DMSFREE/DMSFRET or CMS CMSSTOR macro return code. If SQLERRD1 is 1, it indicates that not enough space was available to satisfy the request for additional storage. SQLERRD2 indicates the amount of space required. If SQLERRD1 is not 1, make a record of what went wrong and contact the designated support group for your installation.
-933 | The communications path to dbname is disabled. No further access to this path is possible. Request Code = request-code. PROTOCOL: protocol FUNCTION: function REG15: X'reg15' CC: condition-code IPRCODE: X'iprcode' IPCODE: X'ipcode' IPWHATRC: X'ipwhatrc' IPAUDIT: X'ipaudit' |
Explanation: The application server detected a communication error. This usually indicates that the communication path to the application server was disconnected. This disconnection may have resulted from:
Request Code = request-code is the communication request code.
If the SQLSTATE is 57027, then the operator has terminated the application server or issued a FORCE command.
If the SQLSTATE is 57030, then the maximum number of connections allowed to the database machine has been exceeded. This limit (MAXCONN) is established in the DB2 Server for VM database machine directory. Try your SQL request later when the system activity is lighter. If this condition occurs frequently, ask your system programmer to increase the value of MAXCONN.
If the SQLSTATE is 40003, then a system error has occurred.
For further information on determining the cause of the error, see Chapter 22, Debugging Communication Errors.
SQLSTATEs:
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: Report this problem to your system programmer.
After a severe error has occurred, only a CONNECT statement will be accepted.
System Programmer Response: Take corrective action based on the Explanation and the User Response.
-934 | An error occurred referencing object. The action being performed was action. |
Explanation: An error occurred when the Resource Adapter attempted to perform the specified action on the specified object.
object is the program or control block on which the action is performed.
action is the action performed.
Note: | If the application is linked with SQL/DS Version 3 Release 3 or earlier code, the action may not be available. |
System Action: Processing has ended. The following fields are set in the SQLCA:
User Response: If the error occurs when you are running under VM with virtual machine size larger than 16 megabytes and your application has been link-edited with an old version of the database manager, your action would be one of the following:
In all other cases, or if the VM error persists, notify your system programmer.
If you are using CMS work units, you may switch to another work unit to do some work. If the CMS work unit in which the error occurred is reestablished at any time, errors may result and the work unit status will be unknown.
System Programmer Response: The problem may be that the resource adapter bootstrap module (ARISRMBT) was not found because the SQLINIT EXEC was not run prior to preprocessing or running the application.
Review your installation procedures to determine if you executed all the steps successfully. At this time, you should have added all necessary packages to your DB2 Server for VM service and production minidisks. If no steps were left out and all ran successfully, you have a database system error. Make a record of what went wrong and contact the designated support group for your installation.
-935 | The address of an output variable is outside the partition (VSE), or virtual machine boundaries (VM). |
Explanation: An address pointing to application output variables was found to be outside the application virtual machine boundaries.
SQLSTATE 51004.
System Action: The resource adapter returns to the calling program. Some output variables may have been moved to the user area if they contained valid addresses. No moving takes place after the incorrect addresses are found. Processing of the SQL statement has ended. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred. If a severe error has occurred, only a CONNECT statement will be accepted.
In the SQLCA, SQLERRD1 is set to 5, meaning an addressing error has occurred, or SQLERRD1 is set to 4, meaning a protection exception has occurred.
SQLERRD2 is set to the host variable ordinal position number of the address in error, in the host variable list or SQLDA descriptor.
User Response: Notify your system programmer.
If you are using CMS work units, you may switch to another work unit to do some work. If the CMS work unit in which the error occurred is reestablished at any time, errors may result and the work unit status will be unknown.
System Programmer Response: Check the RDIIN structure and verify that it is the same as after preprocessing. If the program looks valid, make a record of what went wrong and contact the designated support group for your installation.
-939 | An error occurred with the CMS MACRO name while accessing the file filename filetype. |
Explanation: During Resource Adapter initialization, an error occurred while accessing the file filename filetype that is required for CCSID support using the DRDA protocol.
SQLSTATE 58030.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: Report this problem to your system programmer.
After a severe error has occurred, only a CONNECT statement will be accepted.
System Programmer Response: To correct the problem, refer to SQLERRD1 for the return code from the CMS MACRO.
-940 | The SQL statement was not processed because the application server resource server-name was not ready or was not found. |
Explanation: An implicit or explicit connect request failed due to the following possible reasons:
If the SQLSTATE is 57011, then a communications directory entry was found with the specified server-name, but the connection to the target application server failed.
If the SQLSTATE is 42705, no communications directory entry was found or the directories were not used. The attempt to connect to the target application server failed.
SQLSTATEs:
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: After a severe error has occurred, only a CONNECT statement will be accepted.
Contact your system administrator to start up the desired application server, communications server, or SNA sessions, and restart your application.
-941 | An error occurred while the database manager was building a system communication message. |
Explanation: An error was detected while building an IUCV or APPC/VM message. The cause of the error is indicated by the return code in SQLERRD1.
The possible return codes are:
For error codes 12 and 16 the amount of storage required by the message is placed in SQLERRD2.
For error code 44, the ordinal number of the host variable with the unsupported datatype in the SQLDA is placed in SQLERRD2.
Either the application program overlaid some of the input structure, or this is a system error.
SQLSTATE 58004.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: Notify your system programmer. After a severe error has occurred, only a CONNECT statement will be accepted.
If you are using CMS work units, you may switch to another work unit to do some work. If the CMS work unit in which the error occurred is reestablished at any time, errors may result and the work unit status will be unknown.
System Programmer Response: Verify that the desired database machine has been started and that the application does not mistakenly overlay any of the DB2 Server for VM input structures. If neither of these is the case, then this is a DB2 Server for VM system error. Make a record of what went wrong and contact the designated support group for your installation.
-942 | Because of insufficient storage, the database manager cannot process the SQL statement. |
Explanation: The DB2 Server for VM virtual machine does not have enough storage to build internal control blocks necessary for receiving the SQL statement. SQLERRD1 contains the length of the storage required.
Note: | This code will be reported for DB2 Server for VM protocol. |
SQLSTATE 57011.
System Action:
User Response: Re-enter the SQL statement after the DB2 Server for VM virtual machine is redefined with more virtual storage (or when the virtual machine is less active).
-943 | User attempted to connect to server server-name on Virtual Machine sql-vmid. Virtual Machine is not accessing this server. |
Explanation: The user virtual machine has on its A-disk a CMS file named ARISRMBT MODULE. This file specifies to the resource adapter the particular application server and the particular DB2 Server for VM virtual machine to be accessed when an EXEC SQL statement is issued. This file is initialized by the SQLINIT EXEC.
SQLCODE -943 is issued when the specifications in the ARISRMBT MODULE file do not match the situation in the system. That is, the database manager in the virtual machine specified is accessing an application server other than the one specified in the ARISRMBT MODULE file.
SQLSTATE 57031.
System Action: Processing of the SQL statement has ended. Any further attempts to access the database manager will cause a CMS abend.
User Response: Determine if the server name identified in the message is the correct application server
Note: | If the application server has been started in a virtual machine other than the one specified in the ARISRMBT MODULE file, you must first rerun the SQLINIT EXEC, specifying that virtual machine, and then rerun the application. |
-944 | The system dbspace SYS0002 does not exist. |
Explanation: The database manager was attempting to store a package on dbspace SYS0002 during preprocessing; however, SYS0002 does not exist. This dbspace should have been created at DB2 Server for VM installation time during database generation.
SQLSTATE 57026.
System Action: Preprocessing will end.
User Response: Contact your system programmer to find out why dbspace SYS0002 was not created or why it no longer exists. When SYS0002 becomes available, rerun the preprocessor job.
System Programmer Response: A user with DBA authority may have deleted the SYS0002 entry in the
SYSTEM.SYSDBSPACES catalog table. Use the INSERT command on the
SYSTEM.SYSDBSPACES catalog table with the following values for the
associated column names:
DBSPACENAME - SYS0002
DBSPACENO - 2
OWNER - PUBLIC
DBSPACETYPE - 1
NTABS - 0
NPAGES - (value specified at database
generation for the second
PUBLIC DBSPACE)
NRHEADER - 8
PCTINDEX - 0
FREEPCT - 1
LOCKMODE - P
NACTIVE - -1
POOL - (value specified at database
generation for the second
PUBLIC DBSPACE)
If this fails or does not correct the problem, you have a system error. A database generation may be necessary. Make a record of what went wrong and contact the designated support group for your installation.
-945 | All dbspaces for packages are full. Acquire another dbspace for additional packages. |
Explanation: Because all dbspaces for packages are full, another package dbspace must be acquired before CREATE VIEW, CREATE PACKAGE, RELOAD PACKAGE, or a preprocessor can run successfully. A dbspace might be full for one of the following reasons:
A FREEPCT column value of zero in a row for a package dbspace in SYSTEM.SYSDBSPACES catalog table indicates the second condition. Issuing the following SELECT indicates (by a count of 255) that all packages in a dbspace are used:
SELECT DBSPACENO,COUNT(*) FROM SYSTEM.SYSACCESS WHERE TNAME NOT LIKE '%AVAILABLE' GROUP BY DBSPACENO
SQLSTATE 57025.
System Action: Preprocessing or statement execution ends. If dbspaces became full during the current logical unit of work, the current logical unit of work is rolled back, the entry or entries in the SYSTEM.SYSDBSPACES table for the filled dbspaces is updated to reflect the full condition (the FREEPCT columns are updated), and the entries in the SYSTEM.SYSACCESS table for the filled dbspaces are also updated to reflect the full condition (the TNAME columns are updated).
User Response: Notify your system programmer or database administrator.
System Programmer Response: Acquire a public dbspace named SYSyyyy as follows:
ACQUIRE PUBLIC DBSPACE NAMED SYSyyyy (PAGES = xxx, PCTINDEX = 0, PCTFREE = 1)
where SYSyyyy is the name of the new package dbspace (yyyy being a value 0003-9999 that has not already been used) and xxx is the number of dbspace pages for the packages in this new dbspace. This size is installation dependent, as determined by the size of the programs at your installation. (The recommended size for the initial dbspace is 1024 pages).
Refer to the DB2 Server for VM System Administration manual for exact instructions on acquiring dbspaces for packages.
Explanation: While attempting to insert a row into a package table residing in dbspace number dbspace-number, the database manager found that the dbspace was full.
SQLSTATE 57025.
System Action: The current logical unit of work is rolled back. The entry in the SYSTEM.SYSDBSPACES catalog table for the filled dbspace is updated to reflect the full condition. (The FREEPCT column is updated.) The entries in the SYSTEM.SYSACCESS table for the filled dbspace are also updated to reflect the full condition. (The TNAME columns are updated.) Preprocessing will end.
User Response: Notify your system programmer or database administrator.
System Programmer Response: If other package dbspaces are not yet full, retry the command. If all package dbspaces are now full, you need to acquire additional package dbspaces. A dbspace might be full for one of the following reasons:
A FREEPCT column value of zero in a row for a package dbspace entry in the SYSTEM.SYSDBSPACES catalog table indicates the second condition. Issuing the following SELECT indicates (by a count of 255) that all packages in a dbspace are used:
SELECT DBSPACENO,COUNT(*) FROM SYSTEM.SYSACCESS WHERE TNAME NOT LIKE '%AVAILABLE' GROUP BY DBSPACENO
Acquire a PUBLIC DBSPACE named SYSyyyy as follows:
ACQUIRE PUBLIC DBSPACE NAMED SYSyyyy (PAGES = xxx, PCTINDEX = 0, PCTFREE = 1)
where SYSyyyy is the name of the new package DBSPACE (yyyy being a value 0003-9999 that has not already been used) and xxx is the number of dbspace pages for the packages in this new dbspace. This size is installation dependent, as determined by the size of the programs at your installation. (The recommended size for the initial dbspace is 1024 pages.)
Refer to the DB2 Server for VM System Administration manual for exact instructions on acquiring dbspaces for packages.
-947 | This environment does not support string. |
Explanation: See each Format, below:
Format 1
If string is DATABASE SWITCHING, the Explanation, SQLSTATE value, System Action and User Response are as follows: This environment does not support database switching.
Environment may be:
You tried to connect to a database other than the default one while running in single user mode. Database Switching Support is only available in multiple user mode with DBMODE=L or DBMODE=G.
SQLSTATE 56038.
System Action: The statement is not executed.
User Response: If you were operating in single user mode, rerun the program in multiple user mode.
Format 2
If string is CMS WORK UNITS, the Explanation, SQLSTATE value, System Action and User Response are as follows:
Explanation:
You tried to switch to a new CMS work unit while running in single user mode. Support is only available in multiple user mode.
SQLSTATE 56038.
System Action: Processing of this SQL statement ends.
User Response: If you were operating in single user mode, rerun the program in multiple user mode.
|Format 3
|This format is not used in VM.
|Format 4
|If string is RESULT SET PROCESSING, the |Explanation, SQLSTATE value, System Action and User Response are as |follows:
|Explanation: You tried to process result sets over private protocol. The following |is a list of statements that are not supported when private protocol is in use |: |
System Action: Processing of this SQL statement ends.
|User Response: Preprocess and execute the program against the database application server and |do not use private protocol.
-948 | The current logical unit of work was rolled back, and the connection to the application server was severed because of operator action. |
Explanation: The DB2 Server for VM virtual machine operator entered the FORCE command to cause ROLLBACK of the current logical unit of work and to sever the connection to DB2 Server for VM The user ID, password, and database name are all reset to their default values.
SQLSTATE 57027.
System Action: When you enter the next DB2 Server for VM command, you are automatically connected as the default user ID. The default user ID is the VM user ID
User Response: You may continue to use DB2 Server for VM. Any explicit CONNECTs you have issued have been lost. DB2 Server for VM treats your DB2 Server for VM requests as originating with a user ID that is the same as that of your virtual machine ID. You must issue another explicit CONNECT request, using the same user ID, to re-establish your original connection to DB2 Server for VM.
-949 | A system error has occurred. Reason Code = reason-code. |
Explanation: The database manager has encountered an Operating System error. SQLERRD1 contains the return code from the Operating System if one exists. The possible Reason Codes are:
SQLSTATE 58024.
System Action: The statement is not executed.
User Response: Notify your system programmer.
System Programmer Response: Make a record of what went wrong. Ensure that both the Reason Code and the return code are included in this information. Contact the designated support group for your installation.
-963 | You cannot run this version of DB2 Server for VM in your present VM environment. |
Explanation: To execute, Version 5 Release 1 of the DB2 Server for VM product requires VM/ESA. However, if you are running a DB2 Server for VM system, the application program may have been link-edited with an incompatible resource adapter stub, ARIRVSTC.
SQLSTATE Spaces.
System Action: Processing terminates. The resource adapter returns to the application with SQLCA fields SQLWARN0 and SQLWARN6 both set to S, indicating a serious system error.
User Response: If the error occurs when you are running SQL/DS Version 3 under VM/SP 5, contact your system administrator to set up a VM/ESA environment and rerun your application.
If the error occurs when you are running a SQL/DS Version 2 Release 2, relink-edit your application with the SQL/DS Version 2 Release 2 version of ARIRVSTC, and rerun the application.
-965 | FORMAT 1
terminated abnormally. procedure proc-name for AUTHID |
Explanation: DB2 received an SQL CALL statement for a stored procedure. The stored procedure terminated abnormally while attempting to execute the statement.
SQLSTATE: 51021
System Action: The statement cannot be executed. If the procedure has exceeded the maximum abend count, which is determined by the startup parameter PROCMXAB, then the procedure proc-name is stopped and further requests to call it are rejected.
User Response: Correct the errors in the procedure, and then issue START PROC command to activate the stored procedure.
-993 | The file filename filetype cannot be found. |
Explanation: During Resource Adapter initialization, the file filename filetype that is required for CCSID support using the DRDA protocol cannot be found on the system production minidisk.
SQLSTATE 57044.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: Report this problem to your system programmer. After a severe error has occurred, only a CONNECT statement will be accepted.
System Programmer Response: Create the file filename filetype. Refer to the DB2 Server for VM System Administration manual for the steps to follow.
-994 | The row with charname = charname does not exist in the file file. |
Explanation: During Resource Adapter initialization, the character translation table for charname cannot be loaded because the required row does not exist in the file ARISSCR MACRO.
SQLSTATE 57045.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: Report this problem to your system programmer. After a severe error has occurred, only a CONNECT statement will be accepted.
System Programmer Response: Create the file ARISSCR MACRO to include the required translation table. Refer to the DB2 Server for VM System Administration manual for the steps to follow.|
-8001 | Product key validation failed. |
Explanation: A valid product license key is not found or is invalid. A valid key is |required to run DB2 Server for VSE. SQLERRD1 contains the return code |from the validation. The possible values are: |
|SQLSTATE 42968.
|System Action: Processing of the SQL statement ends and the logical unit of work (if any) is |rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal |that a severe error has occurred.
|User Response: Report this error to your system programmer.
|System Programmer Response: Obtain and install a valid key for the product. A valid key can be |obtained by contacting your IBM representative. Instructions for |installing the key are found in the DB2 Server for VSE |Program Directory.
-15000 | The object-type object-name must have a status of status, and not be in use, before it can be altered or dropped. |
Explanation: A stored procedure must have been stopped with the REJECT option, giving a status of STOP-REJ, |and not be running in a stored procedure server, before an ALTER or DROP of that procedure can be processed. |In addition, no agents can be running the procedure. A stored procedure server must have been stopped with IMPL=NO before an ALTER or DROP of that stored procedure server can be processed.
Note: | If the CREATE PROCEDURE or CREATE PSERVER statement is not yet committed, the PROCEDURE or PSERVER cannot be stopped since the entry is not put in the cache until the unit of work is committed. However, in this case, as ALTER or DROP is allowed if it is issued in the same unit of work as the CREATE statement. |
System Action: Processing of the SQL statement ends.
User Response: |Issue the appropriate STOP operator command. If the ALTER or |DROP PROCEDURE is rejected because an agent is running the procedure, the SHOW |PROC command can be used to monitor activity and determine when the agent(s) |have finished running the procedure. Once no agents are running the |procedure, issue the ALTER or DROP statement again.
-30000 | Execution failed because of a DRDA protocol error that does not affect the successful execution of subsequent commands or SQL statements. Reason Code = reason-code(sub-code). |
Explanation: The reason-code value is the 2-byte hexadecimal code point for the DDM reply message that reported the error and is one of the following:
When the error is reported at the application requester, the reason-code is the 2-byte hexadecimal code point of the reply message that most closely defines the error condition.
The sub-code is a 2-byte hexadecimal value represented as a hexadecimal string constant. The first byte of the sub-code is defined as:
The second byte of the sub-code should be X'00', unless the reply message has an error code defined. The error code value should be placed in the second byte. The reply messages with error codes defined are listed below:
Note: | This code will be reported for DRDA protocol when an insufficient storage condition is encountered. |
SQLSTATE 58008.
System Action: The SQL statement is not processed.
User Response: Discontinue further processing. Notify your system programmer.
-30020 | Execution failed because of a DRDA protocol error that caused deallocation of the conversation. Reason Code = reason-code(sub-code) |
Explanation: The reason-code value is the 2-byte hexadecimal code point for the DDM reply message that reported the error and is one of the following:
When the error is reported at the application requester, the reason-code is the 2-byte hexadecimal code point of the reply message that most closely defines the error condition.
The sub-code is a 2-byte hexadecimal value represented as a hexadecimal string constant. The first byte of the sub-code is defined as:
The second byte of the sub-code should be X'00', unless the reply message has an error code defined. The error code value should be placed in the second byte. The reply messages with error codes defined are listed below:
SQLSTATE 58009.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: After a severe error has occurred, only a CONNECT statement will be accepted.
System Programmer Response: This is a DRDA protocol error. Make a record of what went wrong and contact the designated support group.
-30021 | Execution failed because of a DRDA protocol error that will affect the successful execution of subsequent DDM commands or SQL statements. Manager manager at level level is not supported. |
Explanation: The manager value is the 2-byte hexadecimal code point for the DDM manager class identified as not supported in the EXCSATRD that reported the error. Refer to the DDM term MGRLVL in the IBM Distributed Data Management (DDM) Architecture, Architecture Reference, Level 4 manual for the 2-byte hexadecimal values.
The manager level is the decimal value for the manager class identified as not supported in the EXCSATRD that reported the error. Refer to the DDM term MGRLVL in the IBM Distributed Data Management (DDM) Architecture, Architecture Reference, Level 4 manual for more information.
SQLSTATE 58010.
System Action: The attempt to connect to the database is not successful. The resource adapter returns to the application with SQLCA fields SQLWARN0 and SQLWARN6 both set to S, indicating a serious system error.
User Response: Do not continue processing. Notify your system programmer.
Explanation: The application server has problems obtaining or freeing resources that are needed to process the current request before or after the request is executed by the target relational database manager.
server-name identifies the target application server.
resource-type indicates the type of resource involved, such as storage; reason-code may or may not contain product-specific information, depending on the product ID involved. The sub-code is a 2-byte hexadecimal value represented as a hexadecimal string constant. The first byte of the sub-code is defined as:
The second byte of the sub-code is X'00.
SQLSTATE 57012.
System Action: The SQL statement is not processed.
User Response: Resubmit the statement later. If the problem persists, notify your system programmer.
Explanation: The application server has problems obtaining or freeing resources that are needed to process the current request before or after the request is executed by the target relational database manager. The server-name identifies the target application server.
The resource-type indicates the type of resource involved, such as storage; reason-code may or may not contain product specific information, depending on the product-id involved. The sub-code is a 2-byte hexadecimal value represented as a hexadecimal string constant. The first byte of sub-code is defined as:
The second byte of the sub-code is X'00.
SQLSTATE 57013.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: After a severe error has occurred, only a CONNECT statement will be accepted.
System Programmer Response: Use a larger virtual storage size for the application server. If the problem persists, make a record of what went wrong and contact the designated support group.
-30050 | The ddm-command-codepoint command is invalid while the bind process is in progress. |
Explanation: An attempt was made to execute a specific DDM command that is invalid while a bind process is in progress. BNDSQLSTT, RDBCMM, RDBRLLBCK, and ENDBND are the only legal DDM commands that you can issue while a bind process is in progress. The ddm-command-codepoint command is a two byte hexadecimal codepoint.
SQLSTATE 58011.
System Action: The SQL statement is not processed. The resource adapter returns to the application with SQLCA fields SQLWARN0 and SQLWARN6 both set to S, indicating a serious system error.
User Response: Do not continue processing. Notify your system programmer of this DRDA protocol error.
-30051 | The bind process with specified package name and consistency token is not active. |
Explanation: An attempt was made to execute a DDM BNDSQLSTT or ENDBND command for a bind process that was not active.
SQLSTATE 58012.
System Action: The preprocessing of the program ends. No package is created. The resource adapter returns to the application with SQLCA fields SQLWARN0 and SQLWARN6 both set to S, indicating a serious system error.
User Response: Do not continue further processing. Notify your system programmer of this DRDA protocol error.
-30052 | Program preparation assumptions are incorrect. |
Explanation: An SQL statement that is incompletely understood by the preprocessor is sent to the target application server with the following assumptions:
At least one of these assumptions is incorrect according to the target application server.
SQLSTATE 42932.
System Action: The preprocessing of the program has ended. No package is created.
User Response: Do not continue processing. Notify your system programmer and database administrator of this DRDA protocol error.
-30053 | Owner pkgownid authorization failure. |
Explanation: An authorization error occurred associated with pkgownid when preprocessing a program. The following are some possible scenarios where this error may occur:
SQLSTATE 42506.
System Action: The SQL statement is not processed, or the preprocessing of the program has ended with no package created.
-30060 | Application Server server-name authorization failure. |
Explanation: The user is not authorized to access the application server server-name.
SQLSTATE 08004.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: After a severe error has occurred, only a CONNECT statement will be accepted.
-30061 | Application server server-name is not found. |
Explanation: The user attempted to connect to an application server server-name which cannot be found.
SQLSTATE 08004.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: After a severe error has occurred, only a CONNECT statement will be accepted.
Contact your system administrator to start up the desired application server and restart your application.
-30070 | ddm-command-codepoint DDM command is not supported. |
Explanation: The target does not support a particular DDM command. The error causes the command processing to end, but does not affect the processing of subsequent DDM commands and SQL statements issued by the application program. The ddm-command-codepoint command is a two byte hexadecimal codepoint.
SQLSTATE 58014.
System Action: The SQL statement is not processed.
User Response: Do not continue processing. Notify your system programmer and database administrator of this DRDA protocol error.
-30071 | There is no support for the DDM object ddm-object-type. |
Explanation: The application server does not support a particular DDM object. The error causes current DDM command processing to end, but does not affect the processing of subsequent DDM commands and SQL statements issued by the application program. The ddm-command-type command is a two byte hexadecimal codepoint.
SQLSTATE 58015.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: After a severe error has occurred, only a CONNECT statement will be accepted.
-30072 | There is no support for the DDM command parameter ddm-parameter. |
Explanation: The target does not support a particular DDM command parameter. The error causes command processing to end, but does not affect the processing of subsequent DRDA commands and SQL statements issued by the application program. The ddm-command-type command is a two byte hexadecimal codepoint.
SQLSTATE 58016.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
System Programmer Response: Make a record of what went wrong and contact the designated support group.
-30073 | Value not supported for ddm-parameter parameter. |
Explanation: The target does not support a particular DDM command parameter value. The error causes termination of processing, but does not affect the processing of subsequent DDM commands and SQL statements issued by the application program. The ddm-command-type command is a two byte hexadecimal codepoint.
SQLSTATE 58017.
System Action: The SQL statement is not processed.
User Response: Do not continue processing. Notify your system programmer and database administrator of this DRDA protocol error.
-30074 | There is no support for the reply message with a codepoint of codepoint(svrcod) |
Explanation: The application server has returned a reply message that is not known to the application requester. DDM architecture defines the valid codepoints and svrcod values for reply messages.
SQLSTATE 58018.
System Action: The SQL statement has produced unpredictable results.
User Response: Do not continue processing. Notify your system programmer and database administrator of this DRDA protocol error.
-30080 | Communication error occurred.
PROTOCOL: protocol FUNCTION: function REG15: X'reg15' CC: condition-code IPRCODE: X'iprcode' IPCODE: X'ipcode' IPWHATRC: X'ipwhatrc' IPAUDIT: X'ipaudit' |
Explanation: |This SQLCODE reports communications errors that are visible to an |application requester or application server.
One possible reason is that a FORCE command was issued by the DB2 Server for VM operator. See Chapter 22, Debugging Communication Errors for further information on determining the cause of the error.
SQLSTATE 08001.
System Action: Processing of the SQL statement ends and the logical unit of work (if any) is rolled back. SQLWARN0 and SQLWARN6 of the SQLCA are set to S to signal that a severe error has occurred.
User Response: After a severe error has occurred, only a CONNECT statement will be accepted.
System Programmer Response: Take corrective action based on the Explanation and the User Response.
-30090 | The remote operation is invalid for this application execution environment. |
Explanation: You are trying to update a read-only application server, or to dynamically prepare or execute a COMMIT or ROLLBACK statement against a read-only application server.
SQLSTATE 25000.
System Action: The SQL statement is not processed.
User Response: Issue other non-update SQL statements or notify your database
administrator.