About openDBcopy

openDBcopy is an open-source project by Anthony Smith, published under the terms of the GNU General Public License, see GPL License.



openDBcopy core component can be seen as an application framework providing everything required to run a plugin. Configure a database migration project using the openDBcopy graphical user interface.



Special Thanks to

I would like to specially thank Mr Blatter (Swiss Department for Defence, Civil Protection, Sports) for allowing me to publish openDBcopy as open-source software @sourceforge.

Thanks to all taking the time to test, use and improve openDBcopy.

Why did I develop another database migration utility?

If there is not a need, you normally do not find any software for it.



In summer 2003 I was asked to plan and migrate the database of the Swiss Sports Management System (National Database for Youth and Sports). The source database was IBM's DB2, running on a host, OS390. The destination platform was AIX5.2, Oracle 9i.



A database migration is normally required when systems are going to be changed. The former system was running completely on the host, using DB2 and Websphere 3. The new system is built up using Webserver and Application Server Clusters, all running on Linux. The database itself on AIX5.2.



I hope you can see what I want to show you. A database migration is normally not just copying tables. This includes changes of the application ... and therewith changes of the database schemas.



So I began looking for a database migration utility which was able to fulfill my special requirements. It became obvious that I either have to develop a lot of PL/SQL transformation scripts or develop a new utility - openDBcopy.



I first tried to use Oracle's Migration Workbench, which, at first glance, looks brilliant. But, but, but ... soon I got an answer from their staff that this migration workbench does not support DB2 on OS390. I tried out several other ways ... such as migrating into MS SQL first and then into Oracle ... and a lot of other nightmare scenarios. However, none of these ways solved my migration requirements elegantly enough.



Even if you have a migration tool that can copy data from DB2 to Oracle, you still need to modify your data according to the new requirements.



So the idea of openDBcopy began on a Saturday afternoon, when I was waiting for a tram... and 17 hours later I had my first implementation of openDBcopy. No GUI, just running from a shell.



Two weeks later a front end and further features were implemented, so that I was a able to make a first successful database migration.



At the end of 2003 we made the final migration. I was quite happy that I had developed openDBcopy to avoid too much repeated work. Think about how much manpower you need if you choose the conventional way ... extracting data into files, convert the files, write loading and transformation scripts.



Since then I have used openDBcopy on several other projects. Some of them were again DB2 to Oracle. Others were MySQL to PostgreSQL, MySQL to MySQL, MS Access to MS Access (using jdbc:odbc bridge).



openDBcopy comes with a handful of plugins which can be configured with a comfortable graphical user interface.



Special requirements can easily be developed. See the developer manual for more details.



Conventional Way versus Online Migration using Java

By conventional way I understand dumping data from the old database, transfer, convert and prepare the data for the new database and last but not least, load the new data into the new database. Taking our projects as a reference this would have involved three people to do that job.

  • Dumping data from DB2 requires several utilities and programs ... and a DB2 DBA
  • A PL/SQL Programmer to provide data loader scripts, converters and verification scripts
  • An Oracle DBA to load the data into the new database
  • Repeat above steps whenever you need a further test migration ...




So far I have said nothing about generating the new database DDL. In my eyes this is something which requires interaction. openDBcopy provides a schema migration utility which can generate Hibernate Mapping Files. Hibernate is a Object/Relational Mapping Framework. Its structure to store a database model using XML files is very sophisticated. Based upon these XML mapping files Java source code and also the appropriate DDL can be generated and executed. Using Hibernate as "universal" database model has the advantage that the generated XML files and Java code can be used for one owns projects. Hibernate is well known and documented. Using the schema migration utility of openDBcopy allows to migrate tables, primary keys, compound keys, foreign keys and indexes.



About the openDBcopy logo

An "open" tin is a silent protest against these commercial database symbols looking like "closed" oil barrels ;-)