EF - Error migrating from SQL Server to Oracle

EF - Error migrating from SQL Server to Oracle

Postby NicolasP » Thu 11 Aug 2016 20:21

I tried to migrate database schema from SQL Server to Oracle using EF, I followed the steps of this post:

https://vagifabilov.wordpress.com/2010/10/26/migrating-database-schema-from-microsoft-sql-server-to-oracle-using-entity-framework-and-devart-dotconnect/

Everything went well but when I selected "Generate Database from Model" I got this error:

Encountered the following errors while processing the template 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen\Devart SSDLToOracle.tt: line 0, column 0: 'An exception was thrown while trying to compile the transformation code. The following Exception was thrown: System.IO.FileNotFoundException: Could not find file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Devart.Data.Oracle.Entity.dll, Version=9.1.67.6, Culture=neutral, PublicKeyToken=09af7300eec23701'. File name: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Devart.Data.Oracle.Entity.dll, Version=9.1.67.6, Culture=neutral, PublicKeyToken=09af7300eec23701' ...

I went to that path and there is no any dll of Devart there. when I went to the Devart folder in Program Files I didn't find the file Devart.Data.Oracle.Entity.dll, I just find Devart.Data.Oracle.Entity.EF*.dll.

How can I resolve this issue?

Thanks!
NicolasP
 
Posts: 2
Joined: Thu 11 Aug 2016 13:59

Re: EF - Error migrating from SQL Server to Oracle

Postby Shalex » Fri 12 Aug 2016 11:28

Assuming that dotConnect for Oracle Professional (Trial) is already installed on your workstation, here is a recommended way of converting *.edmx (System.Data.SqlClient) to *.edml (Devart.Data.Oracle):
1) install Entity Developer Professional Trial for migrating (you can uninstall it after the migration is done, it is needed because it supports System.Data.SqlClient your model was originally created for)
2) create a new user (schema) in your Oracle server
3) open your existing *.edmx model in Entity Developer
4) change provider to Devart.Data.Oracle via Database Explorer and set the connection string to Oracle server
5) right click on designer surface > Regenerate Storage and Mapping
6) right click on designer surface > Update Database From Model
7) right click on the Templates node in Model Explorer > New template and choose EntityObject
8) save model (as *.edml). Entity Developer allows only to import *.edmx but the output would be *.edml. Output can not be *.edmx because Entity Developer uses extra tags and attributes, additional features which are not supported by EDM Designer. This question was discussed at http://forums.devart.com/viewtopic.php?f=32&t=24766.
JIC: Devart designer (*.edml) offers a wider range of functionality comparing to the standard designer (http://www.devart.com/entitydeveloper/ed-vs-edm.html).

That's all. Now you can uninstall Entity Developer as a separate tool. dotConnect for Oracle Professional includes its own Entity Developer which can be used only with Devart.Data.Oracle.
Shalex
Devart Team
 
Posts: 7699
Joined: Thu 14 Aug 2008 12:44

Re: EF - Error migrating from SQL Server to Oracle

Postby NicolasP » Fri 12 Aug 2016 13:40

It worked perfectly, thanks!
NicolasP
 
Posts: 2
Joined: Thu 11 Aug 2016 13:59


Return to dotConnect for Oracle