简体   繁体   English

将数据从MS SQL Server复制到MySQL

[英]Copying the data from MS SQL server to MySQL

I need to copy all the data from MS SQL server to MySQL server. 我需要将所有数据从MS SQL服务器复制到MySQL服务器。 I am planning to use the Quartz scheduler to perform this. 我打算使用Quartz调度程序来执行此操作。 This scheduler will run every night and move the data from MS-SQL-Server to MySQL server. 该调度程序将每天晚上运行,并将数据从MS-SQL-Server移至MySQL服务器。 Can anyone please tell if this is fine or is there any other better way to do this? 谁能告诉我这是否还好,或者还有其他更好的方法吗?

Update: 更新:
I need to transfer only one table with 40 columns (from MS SQL server to MySQL) 我只需要传输一张包含40列的表(从MS SQL Server到MySQL)

I wouldn't involve java unless I absolutely had to: java would be adding no value but would be adding extra complexity. 除非绝对必要,否则我不会涉及Java:Java不会增加任何价值,但会增加额外的复杂性。

This is a "DBA" type task that belongs in a script scheduled with cron tab. 这是“ DBA”类型的任务,属于通过cron选项卡安排的脚本中。

If I was implementing it, I would export the source database as an SQL script then import it by running it on the target. 如果要实现它,则可以将源数据库导出为SQL脚本,然后通过在目标服务器上运行它来导入它。

I would recommend you to use http://www.talend.com for tasks like that. 我建议您使用http://www.talend.com执行类似的任务。

UPDATE 更新

Talend Open Studio for Data Integration is Opensource, there are some other features which are propietary details here Talend Open Studio for Data Integration是开源的,还有一些其他功能, 此处是专有详细信息

SQL Server Management Studio's "Import Data" task (right-click on the DB name, then tasks) will do most of this for you. SQL Server Management Studio的“导入数据”任务(右键单击数据库名称,然后单击任务)将为您完成大部分任务。 Run it from the database you want to copy the data into. 从您要将数据复制到的数据库中运行它。

If the tables don't exist it will create them for you, but you'll probably have to recreate any indexes and such. 如果这些表不存在,它将为您创建它们,但是您可能必须重新创建任何索引等。 If the tables do exist, it will append the new data by default but you can adjust that (edit mappings) so it will delete all existing data. 如果这些表确实存在,则默认情况下它将添加新数据,但是您可以对其进行调整(编辑映射),以便删除所有现有数据。

I use this all the time and it works fairly well. 我一直在使用它,并且效果很好。

by- david 大卫

正如PbxMan所说,我将使用ETL,但我建议使用Pentaho( http://wiki.pentaho.com/display/EAI/Spoon+User+Guide ),对于这样的简单工作,我认为它要容易得多

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM