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: |
JDBC URL |
|
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