Example of Migrating From MSSQL

MSSQL JDBC Driver Information

To access MSSQL you should download and install one of the supported drivers below.

Supported Drivers

Class Name

For Microsoft: com.microsoft.sqlserver.jdbc.SQLServerDriver
For jTDS: net.sourceforge.jtds.jdbc.Driver

JDBC URL

jdbc:jtds:sqlserver://host:port/dbname

Migration Commands

schema

This sample command generates a NuoDB schema using MSSQL dbo schema from cat1 catalog to /tmp/schema.sql:

$ nuodb-migrator schema                                         \
        --source.driver=net.sourceforge.jtds.jdbc.Driver        \
        --source.url=jdbc:jtds:sqlserver://localhost:1433/db1   \
        --source.username=user                                  \
        --source.password=pass                                  \
        --source.catalog=cat1                                   \
        --source.schema=dbo                                     \
        --output.path=/tmp/schema.sql

Run schema.sql in nuosql to load the source schema into NuoDB.

$ nuosql db2@localhost --user cloud --password user --file /tmp/schema.sql

dump

The following command creates a dump of all tables from the MSSQL dbo schema, which is in the cat1 catalog, in CSV format. The dump will be created in /tmp/dump directory:

$ nuodb-migrator dump                                           \
        --source.driver=net.sourceforge.jtds.jdbc.Driver        \
        --source.url=jdbc:jtds:sqlserver://localhost:1433/db1   \
        --source.username=user                                  \
        --source.password=pass                                  \
        --source.catalog=cat1                                   \
        --source.schema=dbo                                     \
        --output.type=csv                                       \
        --output.path=/tmp/dump

load

Loading MSSQL dump from /tmp/dump to a NuoDB database test2 is performed using the load command:

$ nuodb-migrator load         \
        --target.url=jdbc:com.nuodb://localhost/db2     \
        --target.schema=test2                           \
        --target.username=cloud                         \
        --target.password=user                          \
        --input.path=/tmp/dump