3

I've been migrating a system from MS SQL to Oracle and have been more or less without difficult snags until running into this issue.

The error message I wind up getting from oracle is:

ORA-06550: line 4, column 54: PL/SQL: ORA-00926: missing VALUES keyword ORA-06550: line 4, column 1: PL/SQL: SQL Statement ignored

It occurs only when I'm doing a complicated INSERT/UPDATE. That is, multiple new'd up nested entities all getting committed in a single .SaveChanges call. My simple INSERT statements for logging work just fine.

I'm quite unfamiliar with oracle and just learning the ropes but that error message seems to indicate that the SQL that's being generated by Entity Framework is malformed. I've searched 'round the web but have been unable to find anyone else who's run into this problem.

I'm running on VS2010, .NET4, and the latest 32-bit ODAC 11.2.0.2.50 Beta 3

Normally with MS SQL in this case I'd fire up the SQL profiler and have a look at what query my application was sending so I'd have a better indication of the problem, but my oracle dbas are telling me there is no such tool for oracle.

Has anyone run into something like this?

Regards, Chris

chrispy
  • 88
  • 1
  • 5
  • Managed to solve this in case anyone else comes across it- I was writing to two tables that contained only a single ID column. The generated P/SQL for this for some reason was writing out INSERT INTO "TABLE" default values which, as far as I can tell, isn't a valid oracle statement. To solve it for now, I just added a META column that so that my edmx would pick up a second column, and now it generates the statement properly. – chrispy Dec 15 '11 at 09:29
  • BTW your DBAs could have helped you by querying v$sql – A.B.Cade Dec 15 '11 at 09:33
  • @chrispy if you've found an answer, you should post it as an actual answer, not a comment! Answering one's own questions is not a problem. – JB. Dec 15 '11 at 10:41

1 Answers1

2

I managed to solve this in case anyone else comes across it- I was writing to two tables that contained only a single ID column. The generated P/SQL for this for some reason was writing out

INSERT INTO "TABLE" default values
which, as far as I can tell, isn't a valid oracle statement. To solve it for now, I just added a META column that so that my edmx would pick up a second column, and now it generates the statement properly.
chrispy
  • 88
  • 1
  • 5
  • We've updated to the new ODAC, but I haven't tried it without the workaround. Code is already stable and going live this weekend so better safe than sorry ;). – chrispy Feb 18 '12 at 07:16