Two DbContexts with corresponding DataInitializers - "ORA-00955: name is already used by an existing object

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
borya09
Posts: 1
Joined: Mon 20 Oct 2014 21:57

Two DbContexts with corresponding DataInitializers - "ORA-00955: name is already used by an existing object

Post by borya09 » Mon 20 Oct 2014 22:16

Hello,

I'm using dotConnect for Oracle, EF6, and CodeFirst approach with two DbContexts, each one with its own DatabaseInitializer.

With the startup of the app, both DatabaseInitializers are fired, but with the second one, I always get an error, and data of this initializer is not inserted in the database, neither the corresponding registry in table '__MigrationHistory':

The error I get is:

Code: Select all

"ORA-00955: name is already used by an existing object"
If I remove recently created table '__MigrationHistory', and I force a request to the app so the second DatabaseInitializer is fired again, the initilization works well.

My question is: Is it posible to use Code Fist approach with more than one DbContext with corresponding DatabaseInitializer?


Thanks,
Borja

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

Re: Two DbContexts with corresponding DataInitializers - "ORA-00955: name is already used by an existing object

Post by Shalex » Tue 21 Oct 2014 12:39

Please connect to a separate database schema with each of your DbContexts.

Post Reply