比较两个 SQL 数据库

发布于 2024-10-09 01:43:58 字数 1539 浏览 0 评论 0原文

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

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

发布评论

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

评论(9

万水千山粽是情ミ 2024-10-16 01:43:58

简而言之,没有现成的脚本可以告诉您两个数据库之间的差异。它可以使用信息模式视图创建,但如果您确实想要比较所有内容,它可能会非常复杂。

我建议您尝试此处提到的第三方工具之一来完成工作。

我在 ApexSQL Diff 方面取得了巨大成功,尤其是在大型数据库上,但使用任何工具都不会出错这里提到。

Short answer is that there is no out of the box script that will tell you the differences between two databases. It can be created using information schema views but it can be quite complex if you really want to compare everything.

I’d recommend you try one of the third party tools mentioned here to get the job done.

I’ve had good success with ApexSQL Diff, especially on large databases but you can’t go wrong with any of the tools mentioned here.

岁月打碎记忆 2024-10-16 01:43:58

SQL Compare 不是免费的,但有 14 天的免费期审判。

Visual Studio 也有一个架构比较工具(自 2005 年起)。

SQL Compare is not free, but has a 14 day free trial.

Visual Studio has a schema comparison tool too (since 2005).

夜吻♂芭芘 2024-10-16 01:43:58

那么,谷歌搜索你得到了什么?

查看 Microsoft SQL Server 比较工具

So, googling got you what?

Have a look at Microsoft SQL Server Compare Tools

箹锭⒈辈孓 2024-10-16 01:43:58

以下是比较工具的列表:
http://www.mssqltips.com/sqlservertip/1069/sql- server-comparison-tools/

顺便说一句,对于那些想要将Azure数据库与SqlServer数据库进行比较的人来说,Visual studio 2010无法做到这一点。不支持2008R2之前的数据库。
同样此时,VS2012还没有比较工具。
可以进行数据比较/模式比较的最佳工具是红门工具。
希望这有帮助。

Here is a list of comparison tools:
http://www.mssqltips.com/sqlservertip/1069/sql-server-comparison-tools/

By the way, for those who want to compare Azure databases with SqlServer databases, the Visual studio 2010 cannot do it. It does not support databases earlier than 2008R2.
Also at this moment, VS2012 does not have a comparaison tool.
The best tools that can do a data compare/schema compare are the red-gate tools.
Hope this helps.

原谅我要高飞 2024-10-16 01:43:58

以下是我用来比较两个 SQL 数据库的三种不同方法。

1)。您可以使用 Visual Studio 来比较两个数据库,如下所示。
进入 Visual Studio 并单击“工具”、“SQL Server”。您可以看到有两个选项,名为“新数据比较”和“新模式比较”。你可以做你想做的事。

2)。另一种是使用 RedGate 插件,但这不是免费的。您可以使用 30 天免费试用,并且您将拥有两个数据库,一个上传到 Visual Studio 目录,另一个数据库位于您的计算机中。它就像视觉工作室 TFS。

3)。您应该为 Visual Studio Team Foundation 服务器安装 MSSCCI(Microsoft 源代码控制接口)。使用本文并按照说明进行操作。

https://www.mssqltips .com/sqlservertip/5049/getting-started-with-source-control-for-sql-server/

Following are the three different ways that i have used to compare two SQL databases.

1). You can use visual studio to compare two databases as follows.
Got to visual studio and click tools, sql server. you can see there are two options named New data comparison and New schema comparison. You can do what you want.

2). Another one is use RedGate plugin but this is not free. You can use 30 days free trial and you can will be having two databases one is uploaded to the visual studio directory while local DB in your computer. Its like visual studio TFS.

3). You should install MSSCCI(Microsoft Source Code Control Interface) for visual studio team foundation server. Use this article and follow the instructions.

https://www.mssqltips.com/sqlservertip/5049/getting-started-with-source-control-for-sql-server/

旧伤慢歌 2024-10-16 01:43:58

迟到了答案区域,但 OpenDBDiff 对我有用。

OpenDBDiff - Microsoft SQL Server 2005+ 的数据库比较工具,可报告架构差异并创建同步脚本。

github 链接 - https://github.com/OpenDBDiff/OpenDBDiff

便携式 exe - https://github。 com/OpenDBDiff/OpenDBDiff/releases

Late to the answer area but OpenDBDiff worked for me .

OpenDBDiff - A database comparison tool for Microsoft SQL Server 2005+ that reports schema differences and creates a synchronization script.

github link -https://github.com/OpenDBDiff/OpenDBDiff

portable exe here - https://github.com/OpenDBDiff/OpenDBDiff/releases

滿滿的愛 2024-10-16 01:43:58

免费版本的 MssqlMerge 可以显示表定义中所做的更改,视图、存储过程和函数(我是这个工具的作者)。

Free version of MssqlMerge can show changes made in table definitions, views, stored procedures and functions (I am the author of this tool).

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