Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I convert database from Mysql to SqlServer 2005?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
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 2 '09 at 9:44
    
That's because MSDASQL is the OLE DB provider for MSSQL - you need to use the MySQL client. –  Richard Gadsden Sep 2 '09 at 9:59
    
Thanks.I think my problem was in symbol differences. –  x2. Sep 2 '09 at 10:50

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.

share|improve this answer
    
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 2 '09 at 7:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.