SQL Server和MySQL同步 [英] SQL Server and MySQL Syncing

查看:166
本文介绍了SQL Server和MySQL同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与一个包含完全相同的架构和数据的客户端在SQL Server和MySQL之间进行同步.我们希望将这些数据集中到一个数据库中.除了性能和可维护性问题外,原始设计还有什么不好的地方?

I am working with a client who is syncing between SQL Server and MySQL containing the exact same schema and data. We want to centralize that data into one database. Other then performance and maintainability issues, what else is bad about the original design?

推荐答案

您可以在SQL Server中使用MySQL实例创建链接服务器实例.

You can create a linked server instance in SQL Server, with the MySQL instance.

尽管是完全专有的,但SQL Server提供的出色连接功能之一是能够通过链接服务器查询其他服务器的功能.本质上,链接服务器是一种直接查询另一个RDBMS的方法.这通常是通过使用服务器上安装的ODBC驱动程序来实现的.

Despite being completely proprietary, one of the nice connectivity features offered in SQL Server is the ability to query other servers through a Linked Server. Essentially, a linked server is a method of directly querying another RDBMS; this often happens through the use of an ODBC driver installed on the server.

请参阅本文:逐步将SQL Server Linked Server链接到MySQL .

假设您授予连接的MySQL用户适当的权限,则可以根据需要写入MySQL实例.因此,您可以更新存储过程,以执行其他步骤以将记录插入MySQL.

Providing you grant the MySQL user you connect on behalf of proper permissions, you can write to the MySQL instance accouding to you. So you can update stored procedures to do an additional step to insert records into MySQL.

更简单的解决方案是使用商业应用程序-来自Spectral Core的Omega Sync Omega Sync可以比较和同步数据库模式和表数据.您甚至可以同步异构数据库的数据(例如,将本地SQL Server数据库与网站上的MySQL副本进行比较-并在几分钟之内同步所有差异).

Much easier solution is to use commercial application - Omega Sync from Spectral Core Omega Sync can compare and synchronize both database schema and table data. You can even synchronize data of heterogeneous databases (for example, compare your local SQL Server database with a MySQL replica on your web site - and synchronize all the differences in just a few minutes).

这篇关于SQL Server和MySQL同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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