2

How can I convert database from Mysql to SqlServer 2005?

x2.
  • 73
  • 4

2 Answers2

2

You'll need to use something like SSIS to move the data, after you create the tables. You can probably script out the tables from MySQL using the MySQL tools and create them in SQL Server without much changing.

You can probably use the MySQL native tool to dump the data and schema to a script and run the script without to many changes.

mrdenny
  • 27,074
  • 4
  • 40
  • 68
  • Please, can you write it step-by-step? I get a *.sql dumpfile with mysqldump(it's more then 1 GB). How to run this script for my database now? – x2. Sep 02 '09 at 07:16
2

The recommended way is to setup a linked server to mysql from sql server and then use either an import/copy wizard or something as basic as select into to get the data across.

Here is a technet article that describes the process using sql server 2000, which is still relevant for 2005/2008.

Here is a codeproject article that describes the same process with less detail for sql server 2005.

Nick Kavadias
  • 10,758
  • 7
  • 36
  • 47
  • I tried this codproject article but on selecting data i have errors Msg 7399, Level 16, State 1, Line 1 The OLE DB provider "MSDASQL" for linked server "MYSQL" reported an error. The provider reported an unexpected catastrophic failure. Msg 7330, Level 16, State 2, Line 1 Cannot fetch a row from OLE DB provider "MSDASQL" for linked server "MYSQL". – x2. Sep 02 '09 at 09:44
  • That's because MSDASQL is the OLE DB provider for MSSQL - you need to use the MySQL client. – Richard Gadsden Sep 02 '09 at 09:59