NuoDB Migrator
NuoDB Migrator is a command line Java program that helps database administrators migrate schemas and existing data to a NuoDB database. It interfaces with a source database over a JDBC-compliant driver and is designed to support all major RDBMSs. It also interfaces with the NuoDB target database using the NuoDB JDBC driver. You can also use NuoDB Migrator as a NuoDB backup/restore utility when both the source and target databases are NuoDB databases.
NuoDB Migrator is part of the Client-only
package.
To execute NuoDB Migrator after it has been installed, ensure that the location of the NuoDB JDBC driver jar (nuodbjdbc.jar
) has been added to your CLASSPATH.
For example:
export CLASSPATH=nuodbjdbc.jar:${CLASSPATH}
For more information on the Client-only package, see Product Distribution Package Files in Physical or VMware Environments (NuoDB Admin).
Released binary versions of NuoDB Migrator can be download from GitHub.
Databases Supported by NuoDB Migrator
NuoDB Migrator supports migration of data from the following databases:
Database | Version |
---|---|
MySQL |
5.5 |
PostgreSQL |
9.2 |
Oracle |
11.2, 12.2.0.1 |
SQL Server |
11.0 |
DB2 |
10 (DSN10015) |
Database Sequences
If there are database sequences used in the source schema, NuoDB Migrator will migrate them with the correct starting value if the dump/load method is used to also create the target schema. This dumps the data and the DDL to create the sequence in one step, which makes sure the sequence will start with a value that is greater than the data.
If the schema objects and data are not migrated in one step (i.e. the schema command is used to generate the DDL SQL object create statements, and the dump/load commands are used to load the data) then it is possible data can be inserted into the target database (outside of the data migration process) once the target schema is created.
This can result in the sequence "start with value" stored in the migrator dump file to be lower than the current target database value when the data is loaded.
This will cause an error during the migrator load step if an attempt to add a row with a the sequence value that already exists.
|
Foreign Keys or Referential Integrity Constraints
For source schemas that use Foreign Keys or referential integrity constraints, either:
-
Defer index creation in the target NuoDB schema until after the migrator
load
step has completed. This can be done by generating the table and index create statements separately during the migratorschema
step. Only execute the table create statements prior to the migratorload
step. For more information on using this method, see the NuoDB Migrator Schema Command section and the use of the--meta.data.value
switch. -
Create both table and indexes during the NuoDB target schema create process (the default). However, when running the migrator
load
step, change the database isolation level toREAD_COMMITTED
. For this option, changing the default isolation level is required to process the table and index create statements correctly. You can set this option by including the following--target.properties
switch when running thenuodb-migrator load
command.
--target.properties="isolation=read_committed"
Known Limitations
-
For Oracle, since sequences and tables are not associated, NuoDB Migrator will migrate the sequence and set its start value to the current value in the source Oracle database.
-
Database VIEW objects are not migrated. The recommendation is to create your VIEWs in NuoDB using the
CREATE VIEW view-name AS SELECT query
command based on the view syntax from your source database.