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

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

Postby 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
borya09
 
Posts: 1
Joined: Mon 20 Oct 2014 21:57

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

Postby Shalex » Tue 21 Oct 2014 12:39

Please connect to a separate database schema with each of your DbContexts.
Shalex
Devart Team
 
Posts: 7659
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle