通过windows服务同步MySQL和MSSQL数据库 [英] Sync MySQL and MSSQL databases through windows service

查看:21
本文介绍了通过windows服务同步MySQL和MSSQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须同步两个数据库的 2 个表,其中一个是 MSSQL,另一个是 MySQL.我必须通过 Windows 服务来做到这一点.我目前已经创建了一个 Windows 服务,我目前添加到该服务中的是:从 MySQL 数据库中获取数据并将其插入到数据适配器中,我计划使用通过事务插入将数据移动到 MSSQL 数据库中.你能告诉我解决这个问题的最佳方法是什么吗?如果我现在做的事情是在正确的轨道上,我第一次做这样的事情.

I must sync 2 tables of two databases one of which is a MSSQL and the other one MySQL. I have to do this through a Windows Service. I currently have created a Windows Service, and what I currently have added to the service is : getting the data from the MySQL database and inserting it into a Data Adapter from which I plan to move the data to the MSSQL database using an insertion through transaction.Can you tell me what is the best approach to this problem and if what I'm doing right now is on the right track, first time I'm doing such a thing.

推荐答案

对于此类工作,SQL Server Integration Services 是最佳选择.

For this kind of job, SQL Server Integration Services is the way to go.

SSIS 用于提取、转换和加载数据.(ETL流程)

SSIS is made to Extract, transform, and load data. (ETL process)

您针对数据的每个转换步骤(从 MySQL 到 MSSQL)设计一个工作流程.

You design a worklow with each transformation step of your data, from MySQL to MSSQL.

然后您创建一个作业并配置其计划,它将由 SQL Server 执行.

You then create a job and configure its schedule, and it will be executed by SQL Server.

无需从头开发且难以维护.

No need to develop something from scratch and hard to maintain.

这篇关于通过windows服务同步MySQL和MSSQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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