Skip to main content
Version: 0.14

MySQL Examples

Examples for transferring data from and to MySQL databases.

Connection Types

MySQL transfers support:

  • mysql: Standard MySQL protocol for reading
  • mysqlbulk: MySQL bulk loader for high-performance target loading

MySQL to MSSQL - Single-threaded Transfer

Simple transfer without parallelization.

.\FastTransfer.exe `
--sourceconnectiontype "mysql" `
--sourceserver "localhost" `
--sourcedatabase "tpch" `
--sourceuser "FastUser" `
--sourcepassword "FastPassword" `
--targetconnectiontype "msbulk" `
--targetserver "localhost" `
--targetdatabase "tpch_test" `
--query "select * from tpch.orders" `
--targettrusted `
--targetschema "dbo" `
--targettable "orders" `
--parallelmethod "None" `
--loadmode Truncate

MySQL to MSSQL - Parallel Transfer with Random Method

Transfer using Random distribution based on a key column.

.\FastTransfer.exe `
--sourceconnectiontype "mysql" `
--sourceserver "localhost" `
--sourcedatabase "tpch" `
--sourceuser "FastUser" `
--sourcepassword "FastPassword" `
--targetconnectiontype "msbulk" `
--targetserver "localhost" `
--targetdatabase "tpch_test" `
--query "select * from tpch.orders" `
--targettrusted `
--targetschema "dbo" `
--targettable "orders" `
--parallelmethod "Random" `
--distributeKeyColumn "o_orderkey" `
--degree 10 `
--loadmode Truncate

MySQL to MSSQL - Parallel Transfer with DataDriven Method

Transfer using DataDriven distribution based on distinct values.

Using year function:

.\FastTransfer.exe `
--sourceconnectiontype "mysql" `
--sourceserver "localhost" `
--sourcedatabase "tpch" `
--sourceuser "FastUser" `
--sourcepassword "FastPassword" `
--targetconnectiontype "msbulk" `
--targetserver "localhost" `
--targetdatabase "tpch_test" `
--query "select * from tpch.orders" `
--targettrusted `
--targetschema "dbo" `
--targettable "orders" `
--parallelmethod "DataDriven" `
--distributeKeyColumn "year(o_orderdate)" `
--degree 10 `
--loadmode Truncate

Using partitioned table with year column:

.\FastTransfer.exe `
--sourceconnectiontype "mysql" `
--sourceserver "localhost" `
--sourcedatabase "tpch" `
--sourceuser "FastUser" `
--sourcepassword "FastPassword" `
--targetconnectiontype "msbulk" `
--targetserver "localhost" `
--targetdatabase "tpch_test" `
--query "select * from tpch.orders_part" `
--targettrusted `
--targetschema "dbo" `
--targettable "orders_part" `
--parallelmethod "DataDriven" `
--distributeKeyColumn "o_orderdate_year" `
--degree 10 `
--loadmode Truncate

MySQL to Oracle - Using oradirect

Transfer data from MySQL to Oracle using direct path loading.

.\FastTransfer.exe `
--sourceconnectiontype "mysql" `
--sourceserver "localhost" `
--sourcedatabase "tpch" `
--sourceuser "FastUser" `
--sourcepassword "FastPassword" `
--targetconnectiontype "oradirect" `
--targetserver "localhost:1521/ORCLPDB" `
--targetdatabase "FREEPDB1" `
--query "select * from tpch.orders_part" `
--targetuser "TPCH_IN" `
--targetpassword "TPCH_IN" `
--targetschema "TPCH_IN" `
--targettable "ORDERS_PART" `
--parallelmethod "DataDriven" `
--distributeKeyColumn "o_orderdate_year" `
--degree 10 `
--batchsize 10000 `
--loadmode Truncate

MSSQL to MySQL - Single-threaded Transfer

Transfer data from SQL Server to MySQL.

.\FastTransfer.exe `
--sourceconnectiontype "mssql" `
--sourceserver "localhost" `
--sourcedatabase "tpch_test" `
--sourcetrusted `
--targetconnectiontype "mysqlbulk" `
--targetserver "localhost" `
--targetdatabase "tpch" `
--query "select * from dbo.orders" `
--targetuser "FastUser" `
--targetpassword "FastPassword" `
--targetschema "tpch" `
--targettable "orders" `
--parallelmethod "None" `
--loadmode "Truncate"

MSSQL to MySQL - Parallel Transfer with Random Method

Transfer with Random distribution.

.\FastTransfer.exe `
--sourceconnectiontype "mssql" `
--sourceserver "localhost" `
--sourcedatabase "tpch_test" `
--sourcetrusted `
--targetconnectiontype "mysqlbulk" `
--targetserver "localhost" `
--targetdatabase "tpch" `
--query "select * from dbo.orders" `
--targetuser "FastUser" `
--targetpassword "FastPassword" `
--targetschema "tpch" `
--targettable "orders" `
--parallelmethod "Random" `
--distributeKeyColumn "o_orderkey" `
--degree 6 `
--loadmode "Truncate"

MSSQL to MySQL - Using Partition Function

Transfer with DataDriven method using SQL Server partition function.

.\FastTransfer.exe `
--sourceconnectiontype "mssql" `
--sourceserver "localhost" `
--sourcedatabase "tpch_test" `
--sourcetrusted `
--targetconnectiontype "mysqlbulk" `
--targetserver "localhost" `
--targetdatabase "tpch" `
--query "select * from dbo.orders_part" `
--targetuser "FastUser" `
--targetpassword "FastPassword" `
--targetschema "tpch" `
--targettable "orders" `
--parallelmethod "DataDriven" `
--distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" `
--degree 7 `
--loadmode "Truncate"

MSSQL to MySQL - Adding Computed Column

Transfer with additional computed column and DataDriven method.

.\FastTransfer.exe `
--sourceconnectiontype "mssql" `
--sourceserver "localhost" `
--sourcedatabase "tpch_test" `
--sourcetrusted `
--targetconnectiontype "mysqlbulk" `
--targetserver "localhost" `
--targetdatabase "tpch" `
--query "select *,null as o_orderdate_year from dbo.orders" `
--targetuser "FastUser" `
--targetpassword "FastPassword" `
--targetschema "tpch" `
--targettable "orders_part" `
--parallelmethod "DataDriven" `
--distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" `
--degree -4 `
--loadmode "Truncate"
info

A negative degree value (e.g., -4) multiplies the absolute value by the number of CPU cores to determine the actual degree of parallelism.

Using ODBC Connection to MySQL

Transfer using ODBC DSN for MySQL connection.

.\FastTransfer.exe `
--sourceconnectiontype "odbc" `
--sourcename "DSNMySQLTPCH" `
--sourcedatabase "tpch" `
--query "select * from tpch.orders_part LIMIT 10" `
--sourceuser "FastUser" `
--sourcepassword "FastPassword" `
--targetconnectiontype "msbulk" `
--targetserver "localhost" `
--targetdatabase "tpch_test" `
--targettrusted `
--targetschema "dbo" `
--targettable "orders_part" `
--parallelmethod "None" `
--loadmode "Append"
tip

Build your command with the Wizard

Copyright © 2026 Architecture & Performance.