ORA-00911: invalid character after upgrade to 6.80, EF 4.3

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Hegg
Posts: 14
Joined: Thu 26 Apr 2012 21:14

ORA-00911: invalid character after upgrade to 6.80, EF 4.3

Post by Hegg » Tue 22 May 2012 02:58

Hello,

We have made several attempts to upgrade from EF 4.2 to EF 4.3, and also dotConnect 6.60 to 6.80. After performing the new install of dotConnect and making one change to the code (ColumnTypeCasingConventionCompatability = true), we are now ending up at this error:

Code: Select all

ORA-00911: invalid character
If a stacktrace is useful:

Code: Select all

[OracleException (0x80004005): ORA-00911: invalid character]
   Devart.Data.Oracle.at.d() +875
   Devart.Data.Oracle.ar.h() +95
   Devart.Data.Oracle.ar.c() +2873
   Devart.Data.Oracle.aa.a(Int32 A_0, bw A_1) +4299
   Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery) +4075
   Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery) +1138
   Devart.Data.Oracle.OracleCommand.ExecuteNonQuery() +58
   System.Data.Objects.ObjectContext.ExecuteStoreCommand(String commandText, Object[] parameters) +99
   System.Data.Entity.Database.ExecuteSqlCommand(String sql, Object[] parameters) +107
   System.Data.Entity.Migrations.History.HistoryRepository.BootstrapUsingEFProviderDdl(XDocument model) +182
   System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +47
   System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext, Func`3 createMigrator, ObjectContext objectContext) +168
   System.Data.Entity.Database.Create() +147
   System.Data.Entity.DropCreateDatabaseAlways`1.InitializeDatabase(TContext context) +145
   System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +64
   System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +224
   System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +193
   System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +235
   System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes() +68
   System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext() +32
   GoldSystemsTools.EntityFrameworkUtility.Impl.BaseEntityContext`1.SaveChanges() in E:\projects\vita\AZ\Trunk\GoldSystemsTools.EntityFrameworkUtility\Impl\BaseEntityContext.cs:122
   GoldSystemsTools.EntityFrameworkUtility.Impl.EntityFrameworkUnitOfWork.CommitTransaction() in E:\projects\vita\AZ\Trunk\GoldSystemsTools.EntityFrameworkUtility\Impl\EntityFrameworkUnitOfWork.cs:27
Nothing else has changed other than the one line. The stacktrace appears to be related to the new migrations stuff in 4.3 which, as I understand it, is disabled by default. We won't use it, so I would just assume keep it disabled (or force it to be disabled). As you can see from the stacktrace, this is from EF triggering database creation.

Either way, we can't figure out what the invalid character is. And, if so, what control do we have over what dotConnect generates?

We can't find a way to find out what SQL statement dotConnect is trying to send to Oracle. What can we do to troubleshoot this? We're anxious to update to 4.3, but have been unable to do so for several months now.

Thank you in advance for any clues.

Hegg
Posts: 14
Joined: Thu 26 Apr 2012 21:14

Re: ORA-00911: invalid character after upgrade to 6.80, EF

Post by Hegg » Wed 23 May 2012 19:20

After a bit of work, we've been able to get the Oracle trace mechanism "working" to try to give us a clue as to what's going on. Unfortunately, it seems relatively useless:

Raw .trc output:

Code: Select all

PARSE ERROR #6:len=430 dep=0 uid=92 oct=0 lid=92 tim=838291644441 err=911


-- --------------- ...
=====================
PARSING IN CURSOR #8 len=168 dep=1 uid=57 oct=47 lid=57 tim=838291644683 hv=337957580 ad='7ff602de990' sqlid='a6u3yjca29nqc'
declare
  m_stmt  varchar2(512);
begin
   m_stmt:='delete from sdo_geor_ddl__table$$';
   EXECUTE IMMEDIATE m_stmt;
   EXCEPTION
     WHEN OTHERS THEN
       NULL;
end;
END OF STMT
PARSE #8:c=0,e=69,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=0,tim=838291644682
Trace output from TKPROF:

Code: Select all

The following statements encountered a error during parse:



-- --------------- ...
=====================
PARSING IN CURSOR #4 len=168 dep=1 uid=57 oct=47 lid=57 tim=838243433762 hv=337957580 ad='7ff602de990' sqlid='a6u3yjca29nqc'
declare
  m_stmt  varchar2(512);
begin
   m_stmt:='delete from sdo_geor_ddl__table$$';
   EXECUTE IMMEDIATE m_stmt;
   EXCEPTION
     WHEN OTHERS THEN
       NULL;
end;

Error encountered: ORA-00911
Of course, running that statement directly against the database works fine. Does that even look like something coming from dotConnect in the first place?

We're really grasping at straws trying to figure out why the dotConnect product is failing. I'm sure it's something like a column name or whatever that we can change, but there is not even the slightest clue as to what could be wrong.

DevArt, do your binaries have any kind of logging/tracing available? We searched and could not find that you use any standard logging mechanisms that we could tap into, such as log4net or something.

What steps can we take next?

Hegg
Posts: 14
Joined: Thu 26 Apr 2012 21:14

Re: ORA-00911: invalid character after upgrade to 6.80, EF

Post by Hegg » Wed 23 May 2012 20:22

I have just read that Migrations can't really be "disabled". Is it possible that this is failing when trying to create the __MigrationHistory table? All of the other tables in our database appear to be created correctly, but __MigrationHistory is not there, leading me to believe that it is failing near that point.

But even if that's true, how can we tell the dotConnect driver to name it something else or to not create it?

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

Re: ORA-00911: invalid character after upgrade to 6.80, EF

Post by Shalex » Thu 24 May 2012 15:19

Hegg wrote:DevArt, do your binaries have any kind of logging/tracing available?
We recommend you using the dbMonitor tool that performs per-component tracing of database events such as commit, rollback, SQL statement execute etc.
Download link: http://www.devart.com/dbmonitor/dbmon3.exe
Documentation: http://www.devart.com/dotconnect/oracle ... nitor.html
(ColumnTypeCasingConventionCompatability = true) leads to (ORA-00911: invalid character)
Are you using the DisableQuoting configuration option? If yes, be aware that EF v4.3 has a similar problem (ORA-00911) with DisableQuoting which is caused by HistoryTable. We will fix the issue till the next public build of dotConnect for Oracle and post here about this.
Current workarounds:
- downgrade to EF v4.2 by using older verion of EntityFramework.dll
- use EF v4.3 but turn off database initialization strategy: Database.SetInitializer<MyContext>(null);

Hegg
Posts: 14
Joined: Thu 26 Apr 2012 21:14

Re: ORA-00911: invalid character after upgrade to 6.80, EF

Post by Hegg » Thu 24 May 2012 15:27

Thank you for the reply. We are indeed setting DisableQuoting = true.

We are appreciative that you have discovered an issue with 4.3 and will be releasing an update. We will watch for that and give it another try.

Do you have a rough ETA on this next update?

We will also try out the DB Monitor and see if it is something we are willing to purchase.

Thanks again.

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

Re: ORA-00911: invalid character after upgrade to 6.80, EF

Post by Shalex » Fri 25 May 2012 12:52

Hegg wrote:Do you have a rough ETA on this next update?
The fix will be included in the nearest public build of dotConnect for Oracle. We release new builds every 2-4 weeks.
Hegg wrote:We will also try out the DB Monitor and see if it is something we are willing to purchase.
dbMonitor is a free tool.

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

Re: ORA-00911: invalid character after upgrade to 6.80, EF

Post by Shalex » Tue 29 May 2012 08:13

The bug with HistoryTable in Code-First Migrations when using the DisableQuoting option is fixed. We will post here when the corresponding build of dotConnect for Oracle is available for download.

Hegg
Posts: 14
Joined: Thu 26 Apr 2012 21:14

Re: ORA-00911: invalid character after upgrade to 6.80, EF

Post by Hegg » Tue 29 May 2012 13:39

Thank you for the update.

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

Re: ORA-00911: invalid character after upgrade to 6.80, EF 4.3

Post by Shalex » Fri 08 Jun 2012 15:48

New build of dotConnect for Oracle 7.0.17 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=24290 .

Hegg
Posts: 14
Joined: Thu 26 Apr 2012 21:14

Re: ORA-00911: invalid character after upgrade to 6.80, EF 4.3

Post by Hegg » Fri 08 Jun 2012 15:51

Thanks again for the update. We will give this a try.

Post Reply