pmoth81
pmoth81

Reputation: 39

Converting SQL Server to MySQL

is it possible to convert a SQL Server database file to a MySQL Database file and if so what would be the best way to go about doing this. Thanks.

Upvotes: 1

Views: 417

Answers (7)

Marcelo Luz
Marcelo Luz

Reputation: 540

In my case, this nice tool did the job very well: http://www.easyfrom.net/ (but my tables were empty. When tables have data, the tool will append a letter in each text field... You'll have to buy the tool to avoid this).

Upvotes: 1

p.campbell
p.campbell

Reputation: 100637

Consider installing SQL Server Express to help get the job done. It's free, and in a pinch, you can install it in a VM if you don't have a dedicated Windows machine to get the job done.

  • attach the .mdf into SQL Server Express.
  • generate CREATE scripts for the tables, views and stored procedures, and any/all objects you need.
  • generate the data insert scripts if you want to keep the data.
  • parse through any stored procedure scripts to remove any TSQL specific implementation, and replace with MySQL equivalents. This could be a small or large amount of work, depending on how many sprocs are required to move over.
  • publish the CREATE and INSERT scripts to the target MySQL database.

Here are some screenshots on generating those scripts in SQL Server.

alt text alt text

Upvotes: 1

Kibbee
Kibbee

Reputation: 66152

I did this recently. Tried the migration tool kit, and it didn't end up working too well for me. Ended up writing a lot of my own code to get the job done. Depending on the complexity of the database, it could take a lot of work. Took us a year to get the whole migration done. Oh, and once you get the table schemas and data transfered, that's when the real fun starts. Hope you don't use too many stored procedures. You'll have to rewrite all of those.

If you have a really simple schema, with a simple application, it might not be too difficult. Or if you knew you might want to migrate ahead of time, and designed for it, you might be ok. But if you have a big existing application, and there was no initial plan to migrate, it could be a huge job.

Upvotes: 0

Abe Miessler
Abe Miessler

Reputation: 85126

Have you looked at MySqls migration tool kit?

http://dev.mysql.com/doc/migration-toolkit/en/mysql-migration-toolkit-indepth-sourcedb-mssql.html

This is where I would recommend starting.

Upvotes: 0

renick
renick

Reputation: 3891

Take a look at the Migration Toolkit if your MySQL is 5.0 or later Of course you cannot expect 100% perfect transition as the other answers suggested.

Upvotes: 1

del.ave
del.ave

Reputation: 1948

There are some programs out there that supposed to help migrate MS SQL databases to MySQL and vise versa (though such programs won't be able to convert complex databases or won't do a good job). I can't recommend one because I've never used one before.

This link might be helpful http://dev.mysql.com/tech-resources/articles/migrating-from-microsoft.html

Upvotes: 1

loxxy
loxxy

Reputation: 13151

I do not know of other tools but this is what I have : Visual studio 2008 express (SQL Kit installed along with) MySQL full Install + Administrator toolkits (Available at their website)

Migration using these workd like a charm. So you will have no problems.

Upvotes: 0

Related Questions