是否有一个开源的SQL Server DB比较工具?

时间:2022-02-12 04:39:30

I'm working on an open source project that uses SQL Server 2005 as the data store. We need a DB compare tool to generate diff scripts to be able to upgrade a DB from one version to another.

我正在开发一个开源项目,该项目使用SQL Server 2005作为数据存储。我们需要一个DB比较工具来生成diff脚本,以便能够将DB从一个版本升级到另一个版本。

Is there an open source or free SQL Server DB diff tool out there that generates a convert script?

是否有一个开源或免费的SQL Server DB diff工具生成一个转换脚本?

12 个解决方案

#1


16  

I think that Open DBiff does a good job. It's simple and I works with SQL Server 2005/2008.

我认为Open DBiff做得很好。它很简单,我使用SQL Server 2005/2008。

But only generate the change script. Nothing more and nothing less.

但是只生成修改脚本。不多也不少。

#2


12  

On CodePlex I noticed yesterday DbDiff (http://www.codeplex.com/OpenDBiff) that you could try. Supports Sql2005 and 2008, I did not try it.

在CodePlex上,我昨天注意到你可以试试DbDiff (http://www.codeplex.com/OpenDBiff)。支持Sql2005和2008,我没有尝试过。

#3


6  

I'd recommend spending some cash and getting Red Gate's SQL Compare tool which does an excellent job, and can even compare databases to Visual Studio database projects to generate upgrade scripts. It's fast and easy to use, and works well. The upgrade scripts are also of decent quality.

我建议您花些钱,使用Red Gate的SQL Compare工具,它的工作非常出色,甚至可以将数据库与Visual Studio数据库项目进行比较,以生成升级脚本。它快速、易于使用,并且工作良好。升级脚本的质量也不错。

It's not that expensive. Probably less expensive than your time. Just think about how much your hourly rate is, and how many hours it might take to investigate an open-source tool and get it working (and how many you have already spent), then multiply them together. That's how much a 'free' tool is really costing you, which is often significantly more than a commercial tool.

这并不是说贵。可能比你的时间更便宜。想一想你的每小时工资是多少,花多少时间去调查一个开源工具并让它工作(你已经花了多少钱),然后把它们相乘。这就是“免费”工具真正让你付出的代价,这通常比商业工具要多得多。

#4


5  

It's not open source, but is free (as in beer): Sql Effects Accord (aka Clarity) Community Edition

它不是开源的,但是是免费的(就像啤酒一样):Sql效果协议(又称清晰)社区版

#5


4  

AdeptSQL Diff and DataDiff are wonderful products, much cheaper than RedGate's and a much more simplified UI, and I have yet to run into a scenario it cannot handle.

AdeptSQL Diff和DataDiff是很棒的产品,比RedGate的要便宜得多,UI也更简单,我还没有遇到过它无法处理的场景。

#6


3  

Aloha

阿罗哈

You might want to try SqlDbDiff. It can generate change scripts. The free edition does a good enough job.

您可能想尝试SqlDbDiff。它可以生成更改脚本。免费版做的很好。

#7


1  

Anyone try xSQL Bundle (xSQL Data Compare and xSQL Object Compare)? Our place only uses for DB diffs, no syncs, so can't say for syncing but the diff and reports are not bad.

有人尝试过xSQL Bundle (xSQL数据比较和xSQL对象比较)吗?我们的地方只用于DB扩频,没有同步,所以不能说同步,但是diff和报告还不错。

Also, OpenDBDiff has a spin off, not sure which is better - http://code.google.com/p/sql-dbdiff/

同样,OpenDBDiff也有一个分支,不确定哪个更好——http://code.google.com/p/sql-dbdiff/

Anyone know if any of the free/open source DB diff tools mentioned here offer scriptable / command line interface to automate the diffs and synching?

有人知道这里提到的任何免费/开放源码的DB diff工具是否提供可脚本/命令行接口来自动进行扩展和同步吗?

I looked into xSQL tools, they offer command line access but unfortunately, no scriptable command to export diff results to (report) file.

我研究了xSQL工具,它们提供命令行访问,但不幸的是,没有可脚本的命令将diff结果导出到(报表)文件。

#8


1  

While it's not exactly what you want, I found this for postgres:

虽然这并不是你想要的,但我为postgres找到了:

http://mbk.projects.postgresql.org/

http://mbk.projects.postgresql.org/

It doesn't generate a diff to apply, but rather allows you to merge a full dump of the new version of the table with the previous version.

它不生成要应用的差异,而是允许您将新版本的表与旧版本合并成一个完整的转储。

#9


0  

Hmm, none that I know of. You can always retrieve the definitions as SQL and then run a diff tool on them, but it's a bit of a pain in the rear.

嗯,我不知道。您总是可以以SQL的形式检索这些定义,然后在它们上运行diff工具,但是后面有点麻烦。

Probably the best solution for this is using some kind of "Migrations" tool, so you can keep your database definitions together with your code, and version them, etc.

也许最好的解决方案是使用某种“迁移”工具,这样您就可以将数据库定义与代码放在一起,并对它们进行版本化等等。

#10


0  

Update

更新

On Sourceforge I found Whiz SQL Structure Compare with this description: Whiz is a database diff utility which will be useful to find difference between two MS-SQL Server databases. It also able to generate SQL script to update the changes from one database to another database.

在Sourceforge上,我发现Whiz SQL结构与下面的描述进行了比较:Whiz是一个数据库diff实用工具,它将有助于发现两个MS-SQL服务器数据库之间的差异。它还可以生成SQL脚本,以更新从一个数据库到另一个数据库的更改。

However, I've been unsuccessful in getting it to work so far...

然而,到目前为止,我一直没能让它发挥作用。

#11


0  

We have both SQL Delta and SQL Compare. Each has strengths, but each also have weaknesses that make them quite a pain.

我们有SQL增量和SQL比较。每个人都有优点,但也有缺点,这让他们很痛苦。

SQL Delta will miss some triggers in its comparison, and it will take actions not found in the action list, and it will sometimes take actions you did not want it to take. That was discovered at quite a cost in time.

SQL Delta在比较中会漏掉一些触发器,它会采取行动列表中没有的行动,有时它会采取你不希望它采取的行动。那是花了不少时间才发现的。

SQL Compare will catch the triggers, but they are embedded within the table listings. On a large database, that means going through each table and sifting them out. Something the tool should have isolated for us. Again, quite a cost in time.

SQL Compare将捕获触发器,但它们嵌入到表清单中。在大型数据库中,这意味着要遍历每个表并筛选它们。这是工具应该隔离的。再说一遍,在时间上花了不少钱。

#12


0  

Its is a little late, but I just relased a real simple project on code plex:

虽然有点晚了,但我只是重新介绍了一个关于代码丛的简单项目:

http://dbcompare.codeplex.com

http://dbcompare.codeplex.com

Enter (or build) two connection strings and it will compare all Tables, Views and Stored Procedures.

输入(或构建)两个连接字符串,它将比较所有表、视图和存储过程。

#1


16  

I think that Open DBiff does a good job. It's simple and I works with SQL Server 2005/2008.

我认为Open DBiff做得很好。它很简单,我使用SQL Server 2005/2008。

But only generate the change script. Nothing more and nothing less.

但是只生成修改脚本。不多也不少。

#2


12  

On CodePlex I noticed yesterday DbDiff (http://www.codeplex.com/OpenDBiff) that you could try. Supports Sql2005 and 2008, I did not try it.

在CodePlex上,我昨天注意到你可以试试DbDiff (http://www.codeplex.com/OpenDBiff)。支持Sql2005和2008,我没有尝试过。

#3


6  

I'd recommend spending some cash and getting Red Gate's SQL Compare tool which does an excellent job, and can even compare databases to Visual Studio database projects to generate upgrade scripts. It's fast and easy to use, and works well. The upgrade scripts are also of decent quality.

我建议您花些钱,使用Red Gate的SQL Compare工具,它的工作非常出色,甚至可以将数据库与Visual Studio数据库项目进行比较,以生成升级脚本。它快速、易于使用,并且工作良好。升级脚本的质量也不错。

It's not that expensive. Probably less expensive than your time. Just think about how much your hourly rate is, and how many hours it might take to investigate an open-source tool and get it working (and how many you have already spent), then multiply them together. That's how much a 'free' tool is really costing you, which is often significantly more than a commercial tool.

这并不是说贵。可能比你的时间更便宜。想一想你的每小时工资是多少,花多少时间去调查一个开源工具并让它工作(你已经花了多少钱),然后把它们相乘。这就是“免费”工具真正让你付出的代价,这通常比商业工具要多得多。

#4


5  

It's not open source, but is free (as in beer): Sql Effects Accord (aka Clarity) Community Edition

它不是开源的,但是是免费的(就像啤酒一样):Sql效果协议(又称清晰)社区版

#5


4  

AdeptSQL Diff and DataDiff are wonderful products, much cheaper than RedGate's and a much more simplified UI, and I have yet to run into a scenario it cannot handle.

AdeptSQL Diff和DataDiff是很棒的产品,比RedGate的要便宜得多,UI也更简单,我还没有遇到过它无法处理的场景。

#6


3  

Aloha

阿罗哈

You might want to try SqlDbDiff. It can generate change scripts. The free edition does a good enough job.

您可能想尝试SqlDbDiff。它可以生成更改脚本。免费版做的很好。

#7


1  

Anyone try xSQL Bundle (xSQL Data Compare and xSQL Object Compare)? Our place only uses for DB diffs, no syncs, so can't say for syncing but the diff and reports are not bad.

有人尝试过xSQL Bundle (xSQL数据比较和xSQL对象比较)吗?我们的地方只用于DB扩频,没有同步,所以不能说同步,但是diff和报告还不错。

Also, OpenDBDiff has a spin off, not sure which is better - http://code.google.com/p/sql-dbdiff/

同样,OpenDBDiff也有一个分支,不确定哪个更好——http://code.google.com/p/sql-dbdiff/

Anyone know if any of the free/open source DB diff tools mentioned here offer scriptable / command line interface to automate the diffs and synching?

有人知道这里提到的任何免费/开放源码的DB diff工具是否提供可脚本/命令行接口来自动进行扩展和同步吗?

I looked into xSQL tools, they offer command line access but unfortunately, no scriptable command to export diff results to (report) file.

我研究了xSQL工具,它们提供命令行访问,但不幸的是,没有可脚本的命令将diff结果导出到(报表)文件。

#8


1  

While it's not exactly what you want, I found this for postgres:

虽然这并不是你想要的,但我为postgres找到了:

http://mbk.projects.postgresql.org/

http://mbk.projects.postgresql.org/

It doesn't generate a diff to apply, but rather allows you to merge a full dump of the new version of the table with the previous version.

它不生成要应用的差异,而是允许您将新版本的表与旧版本合并成一个完整的转储。

#9


0  

Hmm, none that I know of. You can always retrieve the definitions as SQL and then run a diff tool on them, but it's a bit of a pain in the rear.

嗯,我不知道。您总是可以以SQL的形式检索这些定义,然后在它们上运行diff工具,但是后面有点麻烦。

Probably the best solution for this is using some kind of "Migrations" tool, so you can keep your database definitions together with your code, and version them, etc.

也许最好的解决方案是使用某种“迁移”工具,这样您就可以将数据库定义与代码放在一起,并对它们进行版本化等等。

#10


0  

Update

更新

On Sourceforge I found Whiz SQL Structure Compare with this description: Whiz is a database diff utility which will be useful to find difference between two MS-SQL Server databases. It also able to generate SQL script to update the changes from one database to another database.

在Sourceforge上,我发现Whiz SQL结构与下面的描述进行了比较:Whiz是一个数据库diff实用工具,它将有助于发现两个MS-SQL服务器数据库之间的差异。它还可以生成SQL脚本,以更新从一个数据库到另一个数据库的更改。

However, I've been unsuccessful in getting it to work so far...

然而,到目前为止,我一直没能让它发挥作用。

#11


0  

We have both SQL Delta and SQL Compare. Each has strengths, but each also have weaknesses that make them quite a pain.

我们有SQL增量和SQL比较。每个人都有优点,但也有缺点,这让他们很痛苦。

SQL Delta will miss some triggers in its comparison, and it will take actions not found in the action list, and it will sometimes take actions you did not want it to take. That was discovered at quite a cost in time.

SQL Delta在比较中会漏掉一些触发器,它会采取行动列表中没有的行动,有时它会采取你不希望它采取的行动。那是花了不少时间才发现的。

SQL Compare will catch the triggers, but they are embedded within the table listings. On a large database, that means going through each table and sifting them out. Something the tool should have isolated for us. Again, quite a cost in time.

SQL Compare将捕获触发器,但它们嵌入到表清单中。在大型数据库中,这意味着要遍历每个表并筛选它们。这是工具应该隔离的。再说一遍,在时间上花了不少钱。

#12


0  

Its is a little late, but I just relased a real simple project on code plex:

虽然有点晚了,但我只是重新介绍了一个关于代码丛的简单项目:

http://dbcompare.codeplex.com

http://dbcompare.codeplex.com

Enter (or build) two connection strings and it will compare all Tables, Views and Stored Procedures.

输入(或构建)两个连接字符串,它将比较所有表、视图和存储过程。