将 Microsoft SQL Server 数据库复制到 Linux 上的 MySQL/PostgreSQL 的选项
我需要将数据从 Microsoft SQL Server 复制到 MySQL 或 PostgreSQL。 数据包括存储在 BLOB 列中的图像。
您能否评论一下您使用以下策略的经验并建议我可能遗漏的其他策略?
- 用 Java 编写的自定义脚本
- 使用带有 Perl 脚本的 JDBC linux odbc 驱动程序
- 设置我自己的 Windows 盒子并使用带有 Postgres ODBC 驱动程序的 SSIS 或 DTS
- 编写 .net 程序并安排在 Windows 计算机上的执行
- FreeTDS
I need to replicate data from Microsoft SQL Server to MySQL or PostgreSQL. The data includes images stored in BLOB columns.
Could you please comment on your experiences with the following strategies and suggest others I may have missing?
- custom script written in Java using JDBC
- linux odbc driver with perl script
- Setup my own windows box and use SSIS or DTS w/Postgres ODBC driver
- write .net program and schedule execution on Windows machine
- FreeTDS
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查看 SQL Server 复制技术,您可以使用非 SQL Server 订阅服务器,尽管目前仅正式支持 Oracle 和 DB2,但自定义解决方案已成功实施。
http://msdn.microsoft.com/en-us/library/ms151835。 aspx
在我看来,使用 SQL Server Integration Services 将是一个很好的方法。 如有必要,您可以轻松创建自定义组件来与非 SQL Server 订阅服务器交互。
Looking at SQL Server Replication Technologies you can use Non-SQL Server Subscribers although only Oracle and DB2 are officially supported at this time, custom solutions have been implemented successfully.
http://msdn.microsoft.com/en-us/library/ms151835.aspx
Using SQL Server Integration Services would be a good approach in my opinion. You could easily create custom components to interface with Non-SQL Server Subscribers if necessary.
Python 为所有三个数据库提供了良好的库,并且 SQLAlchemy 使编写数据库内容变得容易。 我对 SQL Server 使用 freetds 和 unixodbc。
如果您确实想要相同的表结构,SQLAlchemy 使这变得特别容易,因为您可以以通用方式定义一次结构,并让它在三个数据库中的每一个中创建该结构。
Python has good libraries for all three databases, and SQLAlchemy makes writing db stuff easy. I use freetds and unixodbc for SQL Server.
If you actually want the same table structure, SQLAlchemy makes this particularly easy, as you can define the structure once in a generic way and have it create the structure in each of the three databases.
您还可以按照以下说明进行操作
http://blog.hagander。 net/archives/103-Replicating-from-MS-SQL-Server-to-PostgreSQL.html
我必须重新创建表 msrepl7,将字段 indagent 和子类型更改为整数类型(字符 = 整数查询存在一些问题) Postgres 8.3)
祝你好运。
You can also follow instructions from
http://blog.hagander.net/archives/103-Replicating-from-MS-SQL-Server-to-PostgreSQL.html
I had to re-create table msrepl7 changing fields indagent and subtype to type integer (some problem with character = integer query on Postgres 8.3)
Good luck.