DbMigration

From SemanticLab

Jump to: navigation, search

Contents

Introduction

The dbMigation is a tool which enables an efficient migration between any data sources. First of all, the source schema is transformed in a standardized format. Based on this format a transformation to any target schema may happen. In the current version 1.0, MySQL and PostgreSQL are supported.


Features

  • Live Migration support
  • Migration of table structure and constraints
  • Migration of data
  • Support for MySql and PostgreSQL
  • Java API to support other database vendors

Not Supported Features

  • Migration of database views
  • Migration of stored procedures and functions
  • Graphical user interface

Configuration

Following list shows the command line parameters:

  • -h.........Help
  • -m........Enables the database migration mode
  • -a.........If set, changes in the source database during the migration are logged. After migration the changes are synchronized with the target database (optional)
  • -dim ... on/off --> Enable/Disable Delimited Identifier Mode --> Default: Off

  • -sd.......Source database: JDBC driver (for example: com.mysql.jdbc.Driver)
  • -sc.......Source database: JDBC connection string (for example: jdbc:postgresql://localhost:5432/employees)
  • -su.......Source database: user
  • -sp.......Source database: password

  • -td........Target Database: JDBC driver (for example: org.postgresql.Driver)
  • -tc........Target Database: JDBC connection string (for example jdbc:mysql://localhost:3306/employees)
  • -tu........Target Database: user
  • -tp........Target Database: password

Example

Migration from PostgresSQL to MySql:

migrate.jar -m 
-sc jdbc:postgresql://localhost:5432/employees 
-sd org.postgresql.Driver
-su postgres
-sp BlaBla
-tc jdbc:mysql://localhost:3306/employees 
-td com.mysql.jdbc.Driver  
-tu root
-tp #Blub#

Sources

You can checkout the complete source from subversion:

http://svn.semanticlab.net/svn/oss/thesis/migration/trunk


The executable Version (Jar-File) is available at:

http://svn.semanticlab.net/svn/oss/thesis/migration/trunk/output/migrate.jar
Personal tools