3

I'm trying to migrate a SQL Server db to MySQL, and I'm having a tough time. I've tried:

  • MySQLWorkbench -- migration tool fails because my login only shows views in SQL Server, not the tables themselves, and so I can't get past the "Schemata Selection" screen.

  • sqlcmd and bcp -- both fail because they can't export csv properly. They don't quote strings with commas in them. Plus, they don't create table schemas in MySQL.

  • SQLyog -- just fails. Creates a MySQL table from a MS SQL view ok, but doesn't import the data. Also takes a really long time on small tables, and I have to import millions of rows.

Anyone have suggestions?

Aaron Bertrand
  • 175,645
  • 25
  • 380
  • 589
ccleve
  • 193
  • 1
  • 2
  • 5
  • 1
    There is a related topic here with quite a bit of activity. http://dba.stackexchange.com/questions/3153/need-to-migrate-sql-server-to-mysql?rq=1 Perhaps you could use some type of schema comparison tool to generate a script file and then make it mysql compliant if it is not generated that way? – Robert Gannon Mar 29 '13 at 18:00
  • Regarding your first point (getting past the schemata selection screen) i had a similar problem - you have to login as `sa` http://stackoverflow.com/questions/22570252/migrating-from-sql-server-express-2012-to-mysql-no-schemata-listed – Peter Mar 26 '14 at 10:31

3 Answers3

3

If you want to quickly migrate your data from MS SQL Server to MySQL, I suggest using the Migration tool from Oracle. This can really save you some time and effort.

This article can help you get started:

http://www.infoq.com/news/2012/08/MySQL-Migration

JdMR
  • 131
  • 3
  • 1
    Thanks. The Oracle migration tool is integrated into MySQLWorkbench, and it doesn't work for the reason in my first bullet point above. – ccleve Jun 28 '13 at 17:32
0

There is another approach although it might have limitations regarding size. Use MS Access as an intermediary. It contains a Table export option that you can use with and ODBC connection to send the table to MySQL.

Also, even if sqlcmd/bcp do not produce proper csv, can you not filter the csv files?

koriander
  • 101
0

If mysql is visible as an ado data source, use SSIS , part of SQL Server: http://msdn.microsoft.com/en-us/library/ms141209.aspx