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
dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue
Re: dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue
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.
Re: dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue
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
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
Re: dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue
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.
Re: dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue
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");
sqlCommand = sqlCommand.Replace("\r\n", "\n");
Re: dotConnect for Oracle 8.2 + EF6.0.2 Oracle 10gR2 Migration issue
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.
If this doesn't help, please send us a small test project for reproducing.