Abnormal Errors After ORA-1013 Received in Application
Abnormal Errors After ORA-1013 Received in Application
In this Document
Symptoms
Changes
Cause
Solution
References
APPLIES TO:
SYMPTOMS
setQueryTimeout is being used to cancel long running Statements, also Statement Caching is enabled.
After this error, the Application sometimes gets abnormal errors when trying to execute a new (reused) PreparedStatement:
ORA-01461: can bind a LONG value only for insert into a LONG column
or
ORA-1008: not all variables bounded
or
ORA-1006: bind variable does not exist
or
ORA-00600: internal error code, arguments: [12259], [], [], [], [], [], [], [], [], [], [], []
..
CHANGES
possible changes:
- activation of Statement Caching
- activation of setQueryTimeout
- maybe higher load or longer running queries resulting in QueryTimeout being hit
CAUSE
Unpublished Bug 8334954: INTERMITTENT ORA-1008 AND ORA-1006 AFTER ORA-1013 FROM QUERY TIMEOUT
"DB sometimes returned a wrong cursorID when there is an ORA-1013 error (user requested cancel of current operation). And that cursorID is
already pointing to an existing query which has a different number of bind variables. Because of that, JDBC uses the same cursorID for 2 different
queries"
SOLUTION
A temporary fix was initially done in JDBC via Bug 8334954 to allow patches to be provided until the database could be fixed to return a null cursor id
in these scenarios.
The final fix, that will be included in future Patches and Releases, is 2 folded:
- RDBMS has to send the null cursor id with the ORA-1013 (Unpublished Bug 9373370)
- JDBC has to be able to handle the null cursor id. (Unpublished Bug 9967872)
Hence to resolve this issue the fix for Bug 9373370 must be applied to the database and the fix for Bug 9967872 to the JDBC driver.
Possible Solutions
1. Final fix:
1.1. Apply the following patch, or make sure this fix is included in your RDBMS version:
Patch 9373370: DATA BASE RETURNS WRONG CURSORID WHEN THERE IS AN ORA-01013
This patch has to be applied on RDBMS.
This patch is included in later RDBMS versions and PSU. See the following note for details:
Bug 9373370 - The wrong cursor may be executed by JDBC thin following a query timeout / ORA-3137 [12333] (Doc ID 9373370.8)
AND
1.2. Apply the following patch, or make sure this fix is included in your JDBC version:
Patch 9967872: NEED CORRESPONDING JDBC FIX FOR SERVER SIDE BUG 9373370
This patch has to be applied on JDBC.
This patch is also included in later JDBC versions. See the following note for details:
Bug 9967872 - The wrong cursor may be executed by JDBC thin following a query timeout (Doc ID 9967872.8)
OR
Note that on support.oracle.com this patch has a wrong bug description, it will be corrected in the near future, currently this patch has the following
description:
Patch 8334954: REQUESTING LOW VOLUME JDBC DIAGNOSTICS SPECIFIC TO ORA-1008 AND ORA-1006
OR
3. Workarounds
OR
REFERENCES
NOTE:9373370.8 - Bug 9373370 - The wrong cursor may be executed by JDBC thin following a query timeout / ORA-3137 [12333]
NOTE:9967872.8 - Bug 9967872 - The wrong cursor may be executed by JDBC thin following a query timeout