将数据从 MS SQL 导入 MySQL
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/182784/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Importing data to MySQL from MS SQL
提问by
I want to import data from MS SQL Server, run it through some sort of regexp to filter out stuff, and import it into MySQL. I then, for each query, wish to display a relevant image from a third database. What would be the easiest way to do this, importing and linking wise?
我想从 MS SQL Server 导入数据,通过某种正则表达式运行它来过滤掉一些东西,然后将它导入 MySQL。然后,对于每个查询,我希望显示来自第三个数据库的相关图像。什么是最简单的方法来做到这一点,明智地导入和链接?
Thank you.
谢谢你。
Clarification: It is a php application to filter data from another database, and then for each record show an associated image from a 3rd database. It is from scratch...
说明:这是一个 php 应用程序,用于过滤来自另一个数据库的数据,然后为每个记录显示来自第三个数据库的关联图像。它是从零开始...
回答by Node
You can try the MySQL Migration Toolkit. http://dev.mysql.com/downloads/gui-tools/5.0.html
您可以尝试使用 MySQL 迁移工具包。 http://dev.mysql.com/downloads/gui-tools/5.0.html
Now archived at http://downloads.mysql.com/archives.php?p=mysql-migration-toolkit
现在存档在http://downloads.mysql.com/archives.php?p=mysql-migration-toolkit
回答by NotMe
use SQL Management Studio (or Enterprise Manager depending on version) with the SQL Server import wizerd to get it into MS SQL.
使用 SQL Management Studio(或企业管理器,具体取决于版本)和 SQL Server 导入向导将其导入 MS SQL。
From there you can export it to Mysql using the MySQL connector drivers.
从那里您可以使用 MySQL 连接器驱动程序将其导出到 Mysql。
As for as displaying an image from a third database, that is completely up to the code you have written in your application.
至于显示来自第三个数据库的图像,这完全取决于您在应用程序中编写的代码。
回答by Shawn
I would use the Microsoft SQL Server Data Publishing Wizard (free). You can use it to script your entire database (including insert statements.) You'll have to edit this script a little bit probably to get it to run in MySQL. Now you just have a regex problem. You can try:
我会使用 Microsoft SQL Server 数据发布向导(免费)。您可以使用它来编写整个数据库的脚本(包括插入语句)。您可能需要稍微编辑此脚本才能使其在 MySQL 中运行。现在你只是有一个正则表达式问题。你可以试试:
- Manipulating the data in MS SQL via a query, or from code (using regex) the transfer.
- Running your regexes on the script file itself, maybe try some macros, find and replace, etc.
- Manipulating the data in MySQL via a query, or from code (using regex) after the transfer.
- 通过查询或从代码(使用正则表达式)传输操作 MS SQL 中的数据。
- 在脚本文件本身上运行您的正则表达式,也许尝试一些宏,查找和替换等。
- 通过查询或传输后的代码(使用正则表达式)操作 MySQL 中的数据。