Trying to migrate SQL Server to MySQL using MySQL Workbench. Error: "[Microsoft][ODBC Driver Manager] Invalid argument value" when migrating data

David J Eddy picture David J Eddy · Aug 3, 2012 · Viewed 10.9k times · Source

Long time lurker, first time poster; hoping anyone can help me out.

Im using MySQL Workbench 5.2.41 to migrate a database from SQL Server to MySQL 5.0.8

The entire process goes smoothly: both SQL and MySQL connection Tests are good, the skemea and table create as expected, everything checks out until the 'Bulk Data Transfer' step. At that point I receive this error:

...
Migrating data...
wbcopytables.exe --odbc-source=DSN=SQL Server 11;DATABASE=;UID=sa [email protected]:3306 --progress --passwords-from-stdin --thread-count=1 --table [GSAClosers_v2] [dbo].[AccountBase] `dbo` `AccountBase`
`dbo`.`AccountBase`:Copying 84 columns of 169530 rows from table [GSAClosers_v2].[dbo].[AccountBase]

ERROR: `dbo`.`AccountBase`:SQLGetData: HY009:10:[Microsoft][ODBC Driver Manager] Invalid argument value `dbo`.`AccountBase`:

Finished copying 0 rows in 0m00s
Copy helper has finished
...

For connectors I'm using Microsoft SQL Server / ODBC Data Source / DSN: SQL Server and for MySQL the IP and port(3306).

SQL Server 2012 Management Studio connects and all operations work as expected.

O, side not: both are on the same localhost machine.

If anyone can shed some light on this I would be forever indebted. Thanks in advance

Answer

Man_k picture Man_k · Aug 3, 2012

From here:

[Microsoft][ODBC Driver Manager] Invalid argument value. Regarding to the error message and code you provided, which seems is database is invalid or cannot be accessed. That means either the database does not exist or the user does not have permission to access the database.

It turns out you need specify the instance after the server name, so in the server name in the dialog box for creating the ODBC Data Source, you must enter it as either: MyServer\SQLEXPRESS or .\SQLEXPRESS