将 Microsoft SQL Server 数据库复制到 Linux 上的 MySQL/PostgreSQL 的选项

发布于 2024-07-19 06:06:41 字数 326 浏览 3 评论 0原文

我需要将数据从 Microsoft SQL Server 复制到 MySQL 或 PostgreSQL。 数据包括存储在 BLOB 列中的图像。

您能否评论一下您使用以下策略的经验并建议我可能遗漏的其他策略?

  1. 用 Java 编写的自定义脚本
  2. 使用带有 Perl 脚本的 JDBC linux odbc 驱动程序
  3. 设置我自己的 Windows 盒子并使用带有 Postgres ODBC 驱动程序的 SSIS 或 DTS
  4. 编写 .net 程序并安排在 Windows 计算机上的执行
  5. 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?

  1. custom script written in Java using JDBC
  2. linux odbc driver with perl script
  3. Setup my own windows box and use SSIS or DTS w/Postgres ODBC driver
  4. write .net program and schedule execution on Windows machine
  5. FreeTDS

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

陌路终见情 2024-07-26 06:06:41

查看 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.

救赎№ 2024-07-26 06:06:41

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.

恰似旧人归 2024-07-26 06:06:41

您还可以按照以下说明进行操作
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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文