SQL Server 和 MySQL 服务器之间的复制
我想在SQL Server和MySQL之间设置复制,其中SQL Server是主数据库服务器,MySQL是从服务器(在Linux上)。
有没有办法设置这样的场景?帮我 。
I want to setup replication between SQL Server and MySQL, in which SQL Server is the primary database server and MySQL is the slave server (on linux).
Is there a way to setup such scenario? Help me .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我的回答可能来得太晚了,但仍可供将来参考......
您可以使用异构复制解决方案之一,例如 SymmetricDS:http://www.symmetricds.org/。它可以在任何 SQL 数据库之间复制数据,尽管开销比使用本机复制解决方案更高。
My answer might be coming too late, but still for future reference ...
You can use one of the heterogeneous replication solutions like SymmetricDS: http://www.symmetricds.org/. It can replicate data between any SQL database to any SQL database, altough the overhead is higher than using a native replication solution.
当然,您可以
为此,您需要下载 ODBC 驱动程序。您可以进一步搜索如何在 SQL SERVER 上创建链接服务器。
这个选项非常简单并且完全免费。您可以为此使用 OPEN QUERY。
通过使用 SSIS 包。
为此,您需要 SQL SERVER 的商业智能服务。您可以在 Visual Studio 上创建 SSIS 包并运行它们以进行复制。
of course you can replicate MSSQL database to MYSQL
By using Linked Server in MSSQL.
for that you need to download ODBC drivers. and you can further search regarding how to create Linked server on SQL SERVER.
This option is very easy and Totally free. You can use OPEN QUERY FOR THIS.
By using SSIS Packages.
for that you need the Business Intelligence service of SQL SERVER. you can create SSIS Packages on Visual Studio and run them for replication.
不,至少没有做很多肮脏、坏事。 MSSQL 和 MySQL 使用不同的复制协议,因此您无法在本机进行设置(这是您想要的处理方式)。充其量,您可以将某种代理组合在一起,将插入/更新/删除/创建/更改等查询从一个代理转发到另一个代理。这是一个糟糕的想法,因为除了最常见的情况之外,它们不使用相同的 SQL。即使不是真正复制的数据库转储在供应商之间通常也是不兼容的。
不要这样做。如果您必须在服务器上使用不同的操作系统,请将数据库标准化为可以在这两种操作系统上运行的数据库。
No. At least not without doing a lot of dirty, bad things. MSSQL and MySQL speak different replication protocols, so you won't be able to set it up natively (which is the way you'd want to handle it). At best, you could hack together some sort of proxy that forwards insert/update/delete/create/alter, etc. queries from one to the other. This is a terrible idea as they don't speak the same SQL except in the most common case. Even database dumps which wouldn't really be replication are generally incompatible between vendors.
Don't do it. If you must use different OSes on your servers, standardize the database to something that runs on both.
这两个数据库来自两个不同的供应商。虽然我不能肯定地说,微软不太可能有兴趣允许复制到不同供应商的数据库服务器。
我使用 Informix 和 MySQL。这两个数据库都有将整个数据库转储为 ascii 文件格式的命令。您需要了解如何在 MS SQL Server 上完成此操作;将转储文件通过 ftp 传输到托管 MySQL 服务器的服务器;然后将转储转换为 MySQL 可以导入的内容。
These two databases are from two different vendors. While I cannot say for sure, it is unlikely Microsoft has any interest in allowing replication to a different vendor's database server.
I work with Informix and MySQL. Both those databases have commands that dump the entire database to an ascii file format. You would need to see how that is done on MS SQL Server; ftp the dump to the server hosting the MySQL server; and then convert the dump into something MySQL can import.