grassbl8d
grassbl8d

Reputation: 2139

Database Schema To Another Database Schema Converter

Is there anyway that I could generate database from one schema to another?

For example, I would like to run my application from oracle to sql server or from sql server to postgresql?

I'm looking for something that's free....

Also I would like to know if there's a schema initializer to go with it

thanks a lot

Upvotes: 0

Views: 698

Answers (2)

grassbl8d
grassbl8d

Reputation: 2139

The best tool I found so far is to use Squirrel's DBCOPY plugin. It really does the job

Upvotes: 1

Mark Wilkins
Mark Wilkins

Reputation: 41222

This doesn't really fall under the "free" category, but if you already have the tools (Microsoft Visual Studio and appropriate .NET providers), it might be a possibility.

The idea is to generate a data model from one database in Visual Studio and then use the Model First functionality to go from the conceptual model to another database. The steps would be something like this:

  • In a VS2010 application, add a new item to the project: ADO.NET Entity Data Model
  • Choose your existing database the source for this new model and select the desired tables and click through the wizard.
  • After the model is created, make sure the conceptual model is visible (.edmx file). In the properties for the model, there should be a DDL Generation Template option. Change this to the desired target type. This is the really iffy part; I don't know how many providers support this, but a quick search seemed to turn up at least one for Postgres.
  • Right click on the model and choose Generate Database from Model. This should produce the DDL for the new database.

This certainly would not lend itself well to an automated process, but for a one-time process, it might be okay.

Upvotes: 0

Related Questions