Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Mysterious ORA-00933 on startup when using ODAC unmanaged/managed

Greg BachratySep 24 2014 — edited Nov 18 2014

I've been chasing this issue for a while now with no success. Whenever my app starts there's a chance that the first query hitting the database will cause an ORA-00933. This always happens at the very first query hitting the database. I've traced the command text with TraceLevel, the following command is issued:

SELECT 1 AS "C1", "Extent1"."SOME_FIELD"
FROM "SOME"."TABLE" "Extent1"
WHERE ("Extent1"."SOME_FIELD" IS NOT NULL)
WHERE (ROWNUM <= (1) )

which is obviously malformed. My linq query does not contain any FirstOrDefault() or similar calls, it's a simple db.Table.Where(...) query. The last WHERE clause should not be there at all. What really puzzles me is this behavior is non-deterministic. The very same application with the very same binaries and configuration in the very same environment sometimes produces the correct query sometimes not. This always happens at app startup, it is consistent for the lifetime of the app (which is usually restarted every morning due to the inactivity timeout). If the malfunction occurs an app pool restart usually does not but a full IIS restart (without OS restart) usually does fix the issue even if only temporarily. The app runs in its own private app pool so despite having multiple ODAC versions on the system I have verified that only the specific provider gets loaded into the app process (either Oracle.Managed or the unmanaged Instant Client). Sometimes there's no error for days, sometimes I have to take action every morning, and I haven't been able to find a reliable repro. I'm having the same issue with both the managed and the unmanaged provider. Do you have any advice on how to proceed from here?

Comments

2796195

Hello,

I have exactly the same problem on my project (EF 5 / EDMX / ODAC 11 / ASP.NET MVC 5 / IIS)

Do you have the same configuration ?


We use 2 different databases. Sometime the problem happens on the first, sometime on the second.

Because we use always first database before second one, when queries for the second database are malformed, that means queries on the first one are wellformed. So the problem seems attached to EDMX schema.

Because LINQ query plan is cached by EF5, when the problem happens, it generates a lot of exceptions until the application pool will be recycled

Greg Bachraty

Hi!

More or less the same setup except no MVC and using ODAC 12cR2. The app uses a single database though other apps on the same IIS (all in different dedicated pools) use others. Even though this test server has ODAC11 installed - some use this, some use instant 12c, some managed 12c - I've also verified that the affected apps always get the correct dll version loaded into their address space.

My dev setup has only one ODAC version (always the latest) and it still bugs out although less frequently. I've tried full installation, instant client, managed client, eventually all produce the problem.

I'm not sure if this is an edmx problem since some of my affected apps haven't changed for more than a year and were working fine back then.

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 16 2014
Added on Sep 24 2014
2 comments
1,906 views