dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
John Liu
Posts: 61
Joined: Wed 14 Nov 2012 20:58

dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue

Post by John Liu » Thu 15 Jan 2015 00:12

I have a code first database migration application using dotConnect for Oracle 8.2 + EF6.0.2 that works great with Oracle 11g but fails with Oracle 10gR2. The problem is on inserting records into "__MigrationHistoryTable" using the script generated by dotConnect for oracle. Is there a work around for this issue?

INSERT INTO "__MigrationHistory" ("MigrationId", "ContextKey", "Model", "ProductVersion") VALUES ('201308141958137_V20130200', 'CW.DataAccess.Configuration', BINARY_VALUE, '6.0.2-21211');


ORA-06550: line 1, column 1:
PLS-00103: Encountered the symbol "" when expecting one of the following:

begin case declare exit for function goto if loop mod null
package pragma procedure raise return select separate type
update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
form table call close current define delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
library OPERATOR_ pipe

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue

Post by Shalex » Fri 16 Jan 2015 15:03

We cannot reproduce the error with the latest (8.4.333) build of dotConnect for Oracle. Please upgrade. If this doesn't help, specify the exact (xx.x.x.x.x) version of your Oracle server.

John Liu
Posts: 61
Joined: Wed 14 Nov 2012 20:58

Re: dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue

Post by John Liu » Wed 21 Jan 2015 00:39

My Oracle 10g version
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
"CORE 10.2.0.4.0 Production"
TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

I've resolved the previous problem by adding a trim() to the sqlCommand. but i'm having another problem
context.Database.ExecuteSqlCommand(sqlCommand);

If the sqlCommand is a command to create a function/packages/procedure, it make the function/packages/procedure in invalid status. but run the command directly in sqlplus works great.
Exception ORA-06575: Package or function ISNULL is in an invalid state

please help!!!
thanks
JL

John Liu
Posts: 61
Joined: Wed 14 Nov 2012 20:58

Re: dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue

Post by John Liu » Wed 21 Jan 2015 00:49

It seems like all the commands start with 'CREATE OR REPLACE' having problems. but running the same command in sqlplus or sql developer works great.

John Liu
Posts: 61
Joined: Wed 14 Nov 2012 20:58

Re: dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue

Post by John Liu » Fri 23 Jan 2015 15:42

I have resolved the problem. The problem is on these line breaks used in the scripts. Windows uses 'CRLF' and Unix uses 'LF'. Oracle 10gR2 only takes 'LF'. Everything works great after I replaced 'CRLF' with 'LF'.

sqlCommand = sqlCommand.Replace("\r\n", "\n");

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue

Post by Shalex » Fri 23 Jan 2015 18:42

context.Database.ExecuteSqlCommand(sqlCommand) executes the command via Devart.Data.Oracle.OracleCommand which has some limitations. So avoid using '/r' in the text of your SQL and do not put ';' in the end of the command.

If this doesn't help, please send us a small test project for reproducing.

Post Reply