从 SQL Server 迁移到 MySQL

发布于 2024-10-15 04:07:11 字数 73 浏览 5 评论 0原文

我需要将数据从SQL Server 2000迁移到MySQL。目前我正在使用 MySQL 工作台。任何人都可以告诉如何做到这一点吗?

I need to migrate data from SQL Server 2000 to MySQL. Currently I am using MySQL workbench. Can any one tell how to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

水溶 2024-10-22 04:07:11

如果您正在寻找工具,MySQL 有一个名为“MySQL Migration Toolkit”的工具,可用于将数据从 SQL 迁移到 mysql。但正如上面提到的,首先要做的就是进行备份。接下来要检查的是是否存在无法转换的数据类型?

If you are searching for a tool MySQL has a tool called "MySQL Migration Toolkit" that can be used to migrate the data from SQL to mysql. But the first thing as mentioned above is to do a backup. The next thing to check would be whether there are any datatypes that cannot be converted?

染火枫林 2024-10-22 04:07:11

确切地说,你尝试过什么?如果数据采用以下任何数据文件格式,您可以快速将数据从 MSSQL 迁移到 MySQL:

Paradox (.db)
数据库 (
.dbf)
分隔文本 (.txt)
Excel (
.xls)
XML (.xml)
MS Access 数据库 (
.mdb)
ODBC

如果新服务器和旧服务器上都是一对一、完全相同的数据库体系结构,您可能需要尝试使用数据库工具,这对于基于 GUI 的管理员来说是一个更简单的过程。只需访问 download.com 并找到一些可以帮助您进行迁移的软件,Navicat 就是一个不错的软件。最重要的是始终备份!支持它!支持它!在没有镜像驱动器并尽一切努力确保不破坏任何数据的情况下,切勿做任何事情,但如果这样做,您将拥有它的备份副本。此外,在迁移非常大的数据库时,机器的速度将是一个相当大的因素。

总而言之,您有很多选择可供选择,但最重要的是支持它!无论如何强调这一点都不过分,是的,这似乎是毫无意义的额外工作,尤其是在庞大的数据库系统上,但相信我,安全总比后悔好。另外,我总是喜欢在对机器进行数据库更改之前重新启动机器,切断与外界的任何连接或依赖或更新其数据的任何进程。关闭 ODBC 也可以在 Windows 上为您做很多事情,但总是安全总比后悔好。通过简单地启动计算机并在备份或追加到活动数据库之前将内存中的所有数据最终确定到活动数据库上,可以避免许多损坏。

Exactly, what have you tried? You can quickly migrate data from MSSQL to MySQL if they are in any of the following data file formats:

Paradox (.db)
DBase (
.dbf)
Delimited Text (.txt)
Excel (
.xls)
XML (.xml)
MS Access Database (
.mdb)
ODBC

If its a one-to-one, exact same database architecture on both the new and the old servers, you might want to try using database tools meant to make this an easier process for GUI based administrators. Just go to download.com and find some software that may assist you in that migration, Navicat is a good one. The most important thing is to always BACK IT UP! BACK IT UP! BACK IT UP! Never do anything without mirroring drives and doing whatever it takes to make sure if you don't destroy any data, but if you do you'll have backup copies of it. Also how fast your machines are will be a sizable factor when it comes to migrating very large databases.

All in all you have many options to choose from, yet the most important thing is to back it up! Can't stress that enough, yeah it might seem like meaningless extra work especially on humongous database systems, but trust me, its better to be safe than sorry. Also, I always like rebooting machines prior to making database changes to them, cutting off any connection to the outside world or any processes depending or updating its data. Turning off the ODBC will do much of that for you on Windows as well, but as always better safe than sorry. Many a corruption can be avoided by simply booting the machine and having all data in memory finalized on the active database, before backing it up or appending to it.

疾风者 2024-10-22 04:07:11

查看 etlalchemy。它是一个免费的开源 Python 工具,能够在以下任何 SQL 数据库之间迁移:PostgreSQL、MySQL、Oracle、SQL Server 和 SQLite。

安装:pip install etlalchemy

运行:

from etlalchemy import ETLAlchemySource, ETLAlchemyTarget
# Migrate from SQL Server onto MySQL
src = ETLAlchemySource("mssql+pyodbc://user:passwd@DSN_NAME")
tgt = ETLAlchemyTarget("mysql://user:passwd@hostname/dbname",
                          drop_database=True)
tgt.addSource(src)
tgt.migrate()

Check out etlalchemy. It is a free, open-sourced Python tool capable of migrating between any of the following SQL databases: PostgreSQL, MySQL, Oracle, SQL Server, and SQLite.

To install: pip install etlalchemy

To run:

from etlalchemy import ETLAlchemySource, ETLAlchemyTarget
# Migrate from SQL Server onto MySQL
src = ETLAlchemySource("mssql+pyodbc://user:passwd@DSN_NAME")
tgt = ETLAlchemyTarget("mysql://user:passwd@hostname/dbname",
                          drop_database=True)
tgt.addSource(src)
tgt.migrate()
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文