Extracting script for Oracle's timesten

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
arthernan
Posts: 4
Joined: Thu 13 Feb 2014 17:11

Extracting script for Oracle's timesten

Post by arthernan » Wed 19 Feb 2014 17:49

Hello,

I am using the CrmDemo.EFCodeFirst with TimesTen. I've figured out all the local configuration to be able to connect to TimesTen. Now I am trying to run the demo and the database regeneration code fails when issuing a PL/SQL block that tries to drop all constraints. I knew this could be an issue. So I am fine if I can just get the DDL script and I'll run it. I've tried several things but none seem to work.

Code: Select all

    internal sealed class Configuration : DbMigrationsConfiguration<MyDbContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
            MigrationsDirectory = @"sql";
        }

    }
With the code above. The DDL still gets executed against the database, rather than generating SQL in the "sql" folder. I tried Enable-Migrations, except that it does not support 64 bits.

Is there a solution that does not involve reinstalling my computer to run in 32 bits?

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

Re: Extracting script for Oracle's timesten

Post by Shalex » Mon 24 Feb 2014 14:02

Our EF-provider implementation doesn't target TimesTen. dotConnect for Oracle supports the Oracle TimesTen database only at the ADO.NET level.

If this helps you to move further with your approach, there are two ways to generate the DDL script basing on Code-First:

1) in runtime

Code: Select all

string sqlscript = (myDbContext as IObjectContextAdapter).ObjectContext.CreateDatabaseScript();
2) in Package Manager Console (after Code-First Migrations are enabled)

Code: Select all

Update-Database -Script -SourceMigration:0

arthernan
Posts: 4
Joined: Thu 13 Feb 2014 17:11

Re: Extracting script for Oracle's timesten

Post by arthernan » Mon 24 Feb 2014 17:29

Option number one did it for me.

Thank you!

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

Re: Extracting script for Oracle's timesten

Post by Shalex » Wed 25 Jun 2014 14:17

The DatabaseExists Code-First functionality when working with TimesTen 11g is implemented. We will notify you when the corresponding build of dotConnect for Oracle is available for download.

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

Re: Extracting script for Oracle's timesten

Post by Shalex » Thu 26 Jun 2014 12:05

New build of dotConnect for Oracle 8.4.191 is available for download now!
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=29869.

Post Reply