9 Error Codes Support in Oracle Database Provider for DRDA
Oracle Database Provider for DRDA has error code support, and supports management of errors and warnings generated by applications developed for DB2 and DRDA.
9.1 Oracle Error Codes
In DRDA and DB2, certain types of operations may be successful but generate a warning. For example, when an operation generates an integer overflow situation, DB2 continues and returns the rest of the row data with an indicator set for the column value that contains the error. It will also issue the warning code +802
:
(EXCEPTION ERROR exceptioncode HAS OCCURRED DURING operationtype OPERATION ON datatype DATA, POSITION positionnumber)
In DB2 and DRDA, negative SQLCODE
s are errors, and positive SQLCODE
s are warnings. Oracle, unlike DRDA (and DB2), has no notion of a warning condition. In Oracle, call execution is either successful or generates an error. For example, Oracle treats an overflow situation as an error, and does not continue. Thus, Oracle Database Provider for DRDA cannot emulate DB2 behavior precisely.
However, most normal error conditions that are common to both Oracle and DRDA (and DB2) may be mapped.
“Error Code Mappings, from Oracle to DRDA” lists some common Oracle error codes and their equivalent SQL codes and SQL states.
Related Topics
9.1.1 Error Code Mapping, from Oracle to DRDA
Table 9-1 Error Code Mappings, from Oracle to DRDA
Oracle Error Code | SQLCODE | SQLSTATE | Error Code Description |
---|---|---|---|
|
|
|
Unique constraint violation |
|
|
|
Invalid SQL statement |
|
|
|
Invalid SQL statement |
|
|
|
Invalid |
|
|
|
Invalid datatype |
|
|
|
Invalid table name |
|
|
|
Invalid identifier |
|
|
|
Invalid identifier |
|
|
|
Misspelled keyword |
|
|
|
Missing left parenthesis |
|
|
|
Missing right parenthesis |
|
|
|
Missing |
|
|
|
Incorrect number of arguments |
|
|
|
Creating a |
|
|
|
Invalid character |
|
|
|
Too many values |
|
|
|
Missing coma |
|
|
|
Ambiguous column usage |
|
|
|
Invalid relational operator |
|
|
|
Invalid or missing option |
|
|
|
|
|
|
|
Missing |
|
|
|
Missing |
|
|
|
Missing = sign |
|
|
|
Missing |
|
|
|
Value not compatible with target column type |
|
|
|
SQL command not properly ended |
|
|
|
Group function not allowed |
|
|
|
Missing expression |
|
|
|
Not a single group function |
|
|
|
Table or view does not exist |
|
|
|
Not enough values |
|
|
|
Invalid |
|
|
|
Name is already used by an existing object |
|
|
|
Duplicate column name |
|
|
|
Ambiguous column naming in select list |
|
|
|
Missing |
|
|
|
Missing |
|
|
|
Identifier is too long |
|
|
|
Date + date not allowed |
|
|
|
Not a |
|
|
|
Invalid view name |
|
|
|
Maximum open cursors exceeded |
|
|
|
Fetch out of sequence |
|
|
|
Not all variables bound |
|
|
|
Insufficient privilege to perform operation on object |
|
|
|
Illegal variable name/number |
|
|
|
Cannot insert |
|
|
|
No data found |
|
|
|
Invalid |
|
|
|
Exact fetch returns more than requested number of rows |
|
|
|
Missing or illegal character following the escape character |
|
|
|
Escape character must
be string of length |
|
|
|
Single-row subquery returns more than one row |
|
|
|
User does not exist |
|
|
|
Value larger than specified precision allowed for this column |
|
|
|
Converting column overflows |
|
|
|
Divisor equal to zero |
|
|
|
Invalid |
|
|
|
Invalid number |
|
|
|
|
|
|
|
Invalid host/bind variable name |
|
|
|
Invalid table or column specification |
|
|
|
Missing quote for quoted string |
|
|
|
Operands of a set operator do not have the same number of columns |
|
|
|
Date format picture ends before converting entire input string |
|
|
|
(Full) year must be
between |
|
|
|
Bad month |
|
|
|
Bad year |
|
|
|
not numeric where numeric expected in date |
|
|
|
Literal does not match format string |
|
|
|
|
ORA-02291 |
-530 |
23503 |
Parent not found (insert/update/delete) |
ORA-02292 |
-531 |
23504 |
Child not found (insert/update) |
ORA-02292 |
-532 |
23504 |
Child not found (delete) |
|
|
|
Object not found |
|
|
|
Package body has errors |
|
|
|
Reports various PL/SQL errors, such as:
|
|
|
|
Not a valid function or procedure name |
|
|
|
Specified row no longer exists |
|
|
|
Value too large for column |
|
|
|
User does not have package privilege for operation |
|
|
|
Bind package failed |
|
|
|
User does not have package privilege for operation |
|
|
|
Package does not exist |
|
|
|
Invalid LOB locator specified |
|
|
|
Misspelled SQL statement |
|
|
|
array insert or merge reported some errors |
All other errors |
|
|