List:General Discussion« Previous MessageNext Message »
From:(Hal Date:January 30 2012 6:11pm
Subject:Re: Converting Microsoft SQL database to MySQL
View as plain text  
>>>> 2012/01/30 15:06 +0800, James >>>>
I am involved in a project to migrate our entire database from Microsoft
SQL to MySQL.

I would appreciate the help if anyone could share what tools will you
recommend of converting SQL database to MySQL.
<<<<<<<<
If it is SQL server, maybe dumping in character form (CSV) will work, noting that MySQL
does not really support CSV: one can set all switches in "LOAD DATA" to real CSV except
for NULL. If there are NULLs in your data you have to ensure that the word NULL, not
quoted, appears between separators. (The natural convention that nothing between
separators is NULL and empty string is a pair of quote-marks is not used.) On my machine
there are the command-line programs "bcp" and "sqlcmd".

There are also the table and view descriptions to be dumped; note that SQL Server quotes
identifiers with square brackets, but MySQL in ANSI mode with double quotes, outside ANSI
mode with the character that "a" follows (`). There are also type-differences: for one,
MySQL has no type smalldatetime. In SQL Server type-names, too, are identifiers:
[varchar], [smallint], [bit], [smalldatetime], .... Setting QUOTED_IDENTIFIER OFF would
help. To SQL SERVER "NOT NULL" is a named constraint, but to MySQL not. It goes on.

I do not know ODBC; maybe that is more helpful.

Thread
Converting Microsoft SQL database to MySQLJames30 Jan
  • Re: Converting Microsoft SQL database to MySQLCarl Kabbe30 Jan
    • Re: Converting Microsoft SQL database to MySQLJames30 Jan
  • Re: Converting Microsoft SQL database to MySQLhsv30 Jan
    • Re: Converting Microsoft SQL database to MySQLJohan De Meersman31 Jan
      • Re: MySQL-kind CSV; Converting Microsoft SQL database to MySQLhsv31 Jan
  • Re: Converting Microsoft SQL database to MySQLSQL Maestro Group31 Jan