Page 1 of 1

Extracting script for Oracle's timesten

Posted: Wed 19 Feb 2014 17:49
by arthernan
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?

Re: Extracting script for Oracle's timesten

Posted: Mon 24 Feb 2014 14:02
by Shalex
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

Re: Extracting script for Oracle's timesten

Posted: Mon 24 Feb 2014 17:29
by arthernan
Option number one did it for me.

Thank you!

Re: Extracting script for Oracle's timesten

Posted: Wed 25 Jun 2014 14:17
by Shalex
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.

Re: Extracting script for Oracle's timesten

Posted: Thu 26 Jun 2014 12:05
by Shalex
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.