如何将数据从SQL Server 2005导出到MySQL [英] How to export data from SQL Server 2005 to MySQL

查看:163
本文介绍了如何将数据从SQL Server 2005导出到MySQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在打击 SQL Server 2005 试图获取大量的数据。我已经给了一个数据库,其中有近300个表,我需要把它变成一个MySQL数据库。我第一次调用是使用bcp但不幸的是它不产生有效的CSV - 字符串没有封装,所以你不能处理任何具有逗号的字符串(或任何你用作分隔符)我仍然必须手写所有的create table语句,因为显然CSV不告诉你任何关于数据类型。



更好的是if有一些工具可以连接到SQL Server和MySQL,然后做一个副本。你失去了视图,存储过程,触发器等等,但是不难复制一个只使用基类型从一个数据库到另一个数据库的表...



<有人知道这样的工具吗?我不介意它做了多少假设或什么简化发生,只要它支持整数,浮点数,日期时间和字符串。我必须做很多修剪,正常化等反正所以我不在乎保持键,关系或任何类似的东西,但我需要快速的初始数据集!

解决方案

我找到的最好的方法是 MySQL Migration Toolkit 。我已经成功地用于一些大型迁移项目。


I've been banging my head against SQL Server 2005 trying to get a lot of data out. I've been given a database with nearly 300 tables in it and I need to turn this into a MySQL database. My first call was to use bcp but unfortunately it doesn't produce valid CSV - strings aren't encapsulated, so you can't deal with any row that has a string with a comma in it (or whatever you use as a delimiter) and I would still have to hand write all of the create table statements, as obviously CSV doesn't tell you anything about the data types.

What would be better is if there was some tool that could connect to both SQL Server and MySQL, then do a copy. You lose views, stored procedures, trigger, etc, but it isn't hard to copy a table that only uses base types from one DB to another... is it?

Does anybody know of such a tool? I don't mind how many assumptions it makes or what simplifications occur, as long as it supports integer, float, datetime and string. I have to do a lot of pruning, normalising, etc. anyway so I don't care about keeping keys, relationships or anything like that, but I need the initial set of data in fast!

解决方案

The best way that I have found is the MySQL Migration Toolkit provided by MySQL. I have used it successfully for some large migration projects.

这篇关于如何将数据从SQL Server 2005导出到MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆