This content has been marked as final. Show 9 replies
Please send the generated query to alex.keh(at)oracle.com.
He is the PM of this product.
In your email, please indicate this is for OTN link:
ORA-01790 in query generated by ODAC1120250 (Oracle Server 11.1)
Edited by: Alex Keh - Oracle Product Manager on Jan 13, 2012 1:20 AM
Hi, we haven't debugged the application or traced the query against the production server (it's in our customer's office) buy I think there's no difference since the query itself has been tested using sqldeveloper against both servers (XE 11.2 and Enterprise 11.1) and the behavior is consistent. By consistent I mean:
- The query executed via sqldeveloper against Oracle XE 11.2 runs ok and so does the application.
- The query executed via sqldeveloper against Oracle Enterprise 11.1 fails with an ORA-01790 error, and so does the application (exceptions are being logged in the Event Log).
To sum up: the same query runs ok in Oracle XE 11.2 and fails in Oracle Enterprise 11.1.
Additional information: we have tried explicit casting the NULL literals to the corresponding data types (in the UNION ALLs) and the query works fine in both versions. ¿Is there an option in ODAC to tell the query generator to write this explicit castings?
Regarding the DB schema and the LINQ query, I'll be sending them asap.
It looks like this is 11.1 issue and it has been fixed in 11.2.
There is no option in ODAC to tell the query generator to write explicit castings.
It's driven by the command tree, which is from the LINQ query.
Would you please tell us more about the following? An example would help a lot.
"we have tried explicit casting the NULL literals to the corresponding data types (in the UNION ALLs)
and the query works fine in both versions."
I think you meant those NULL columns in the SELECT list, such as
NULL AS "C2",
So you did
CAST(NULL as <datatype>) as C2,
Edited by: shsu on Dec 28, 2011 7:22 PM
I don't think this thread ever concluded what the exact bug number was. The problem appears specific to the DB server, not ODP.NET. Certainly, the guaranteed solution is to use DB 11.2.
If your application is not prepared to move to 11.2 server, you may want to find what this particular bug is to see if it's been fixed in 10.2. Or you can upgrade to the latest Oracle 10.2 patch if that's an easier way to verify. It would be helpful to know what the bug number is so that if patching doesn't solve the issue, you'll know what bug fix to ask Oracle to backport to 10.2.