Error ORA-00932 Raised Intermitently From A JDBC Call When Using The "ALTER SESSION SET CURRENT_SCHEMA={schemaname}" Statement And The "prepared-statement-cache-size" Parameter In The JDBC Datasource
(Doc ID 977455.1)
Last updated on APRIL 10, 2024
Applies to:
JDBC - Version 10.1.0.2 and laterInformation in this document applies to any platform.
Symptoms
On : 11.1.0.6 version, JDBC for Java
The following exception is raised intermittently when querying a table with a lob column:
java.sql.SQLException: ORA-00932: inconsistent datatypes: expected NUMBER got BLOB
The error is raised upon execute (before fetch) and it is intermittent.
Several possible significant facts include the following.
- There are multiple schemas having a table with the same name.
- These tables have a column with the same name but different datatypes (BLOB and VARCHAR2).
- The blob column has not been converted from a long raw - it was initially created as a blob.
- A single login is used and the command 'ALTER SESSION SET CURRENT_SCHEMA=<SCHEMA NAME>" is used to set the current schema.
- It is possible that, within the context of one connection, the current schema may be set to one with the column of one datatype (BLOB or VARCHAR2) and subsequently to a schema with the column of the other datatype ((BLOB or VARCHAR2)
ERROR
-----------------------
java.sql.SQLException: ORA-00932: inconsistent datatypes: expected NUMBER got BLOB
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |