0% found this document useful (0 votes)
63 views

Abnormal Errors After ORA-1013 Received in Application

Abnormal Errors after ORA-1013 received in Application

Uploaded by

ejgonzalezp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

Abnormal Errors After ORA-1013 Received in Application

Abnormal Errors after ORA-1013 received in Application

Uploaded by

ejgonzalezp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Copyright (c) 2020, Oracle. All rights reserved. Oracle Confidential.

Abnormal Errors after ORA-1013 received in Application (Doc ID 1073213.1)

In this Document

Symptoms
Changes
Cause
Solution
References

APPLIES TO:

JDBC - Version 10.2.0.1 to 11.2.0.3.0 [Release 10.2 to 11.2]


Information in this document applies to any platform.
***Checked for relevance on 27-Aug-2013***
***Checked for relevance on 11-Feb-2016***

SYMPTOMS

setQueryTimeout is being used to cancel long running Statements, also Statement Caching is enabled.

A Query timeout results in the following Exception:


"ORA-01013: user requested cancel of current operation"

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

2. Apply the following temporary patch on JDBC side:


Patch 8334954: INTERMITTENT ORA-1008 AND ORA-1006 AFTER ORA-1013 FROM QUERY TIMEOUT

Currently this patch is available for JDBC 11.1.0.7 and 11.2.0.1

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

3.1. disable QueryTimeout


Note that this means that long running Statements will now not be canceled anymore by the client.

OR

3.2. disable Statement Caching


This means that no Statements will be cached and hence these will not be implicitly reused. This workaround will not work if the Application itself is
reusing Statements.

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

Didn't find what you are looking for?

You might also like