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

11,561

Solution 1

Ok, got it figured out: un-install java. install java 1.6, use MySQL Migration Tool. change all data types to varchar, ints and bits. run migrations....eat data.

Solution 2

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

Solution 3

I think you may have a problem connecting to your database from wbcopytables.exe. Keep in mind that this is a separate tool so the fact that you can connect from the rest of the Migration Wizard doesn't imply that you will connect in wbcopytables.exe.

The thing that worries me the most is that your DSN has whitespace characters. This might be interpreted by the Windows terminal as independent command line parameters. One thing you can do is to edit your DSN name removing the whitespaces and try again.

You may also want to connect without a DSN by putting all your connection parameters explicitely as explained in my blog post: How-To: Guide to Database Migration from Microsoft SQL Server using MySQL Workbench.

And, by the way, since MySQL Workbench 5.2.42 is out you should go and get it. The Migration Wizard is pretty new so important bug fixes are likely launched in each recent Workbench release.

In either case I think you should file a bug with your issues with a detailed explanation about how to reproduce it, possible solutions, etc.

Hope this helps.

Share:
11,561
David J Eddy
Author by

David J Eddy

AWS Certified (x4), Automated Testing / Continuous Integration / Delivery /Deployment (CI/CDs), Cloud, Containers, Dev(Sec)Ops, Software Engineer.

Updated on June 05, 2022

Comments

  • David J Eddy
    David J Eddy about 2 years

    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