MSSQL-> MySQL 或 PostgreSQL 数据库复制
我发现自己处于一种其他人在某个时候一定也陷入过的境地。
我们公司运行一个基于 MSSQL 的内部数据库,我们的网站则位于外部服务器上,目前运行 MySQL。问题是两个数据库需要越来越频繁地相互通信。
我们当前的解决方案涉及 SSIS 包,但它们不稳定且通常很慢。我们最终经常不得不将表删除到我们的实时生产服务器上,然后再从内部服务器重建它们。当然,这会导致数据不一致,因此我们尝试在高峰时间之外执行这些操作。但是,这会导致某些数据从 MySQL 传输到 MSSQL 时出现 24 小时的延迟,然后将数据传回 MySQL 时又出现 24 小时的延迟。这一切都不理想。
我正在寻找一种解决方案,允许在我们的内部 MSSQL 服务器和任何可以安装在 Linux 机器上并与 PHP 良好配合的数据库之间进行复制。正如我所说,我们目前运行 MySQL,因此我们优先考虑包含该解决方案的任何解决方案,但所有其他建议都会得到热烈欢迎。
我在某处读到过 PostgreSQL 是一个 vialbe 解决方案,但我现在很难找到我在哪里读到的。我遇到过一些可能有帮助的工具,例如 DBMoto 和 Slony-I,有人在这种情况下有任何经验吗?
或者,我们是否只是完全搞错了树,我们是否应该尝试将 MSSQL 集成到我们的 PHP 环境中?
任何想法或建议将不胜感激。
非常感谢
罗布
I find myself in a situation that someone else must have got stuck in at some point.
Our company runs an in house MSSQL based database, our website then sits on an external server and currently runs MySQL. The problem comes that both databases need to communicate with each other increasingly often.
Our current solution involves SSIS packages but they are tempromental and often slow. We end up very often having to drop tables on our live production server before then rebuilding them from the in house server. Of course this is leading to data inconsistencies so we try and perform these operations outside of peak hours. However, this leads to 24hr delays in some data being transferred from MySQL to MSSQL and then an additional 24hr delay in getting it back to MySQL. None of this is ideal.
What I am looking for is a solution that will allow replication between our in-house MSSQL server and any database that can sit upon a linux box and play nicely with PHP. As I said, we currently run MySQL so we have a preference to any solution that would include that but all other suggestions would be greatfully received.
I've read somewhere that PostgreSQL is a vialbe solution but I am now struggling to find where I read that. I've come accross a few tools that might help such as DBMoto and Slony-I, does anyone have any experience of either in such a situation?
Alternatively, are we simply barking up the wrong tree altogether and should we be trying to integrate MSSQL into our PHP environment?
Any thoughts or suggestions would be gratefully recieved.
Many thanks
Rob
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我所知道的和我用于此类工作的最佳解决方案是 SymmetricDS 。
The best solution that i know and i have used for this kind of job is SymmetricDS .
您可以使用 FreeTDS 和 mssql_* 系列函数(或在其上构建的类,或使用 freetds 的替代扩展)从 PHP 访问 MSSQL 服务器。我们将其用于我们的管理应用程序,其中 Linux/PHP 网站与 MSSQL 数据库进行通信。
You can access MSSQL servers from PHP using FreeTDS and the mssql_* family of functions (or classes built thereon, or alternative freetds-using extensions). We use this for our admin application, with a Linux/PHP website talking to a MSSQL database.