Visual Studio 2017中的SQL Server比较架构 [英] SQL Server Compare Schema in Visual Studio 2017

查看:133
本文介绍了Visual Studio 2017中的SQL Server比较架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试比较同一服务器上的两个数据库的架构。



这两个数据库被命名为 benchmarkdb benchmarkdb_dev



在Visual Studio 2017中,我转到工具> SQL Server>新架构比较。



从标记为选择源和选择目标的两个下拉菜单中(如下图所示),我要选择 Benchmarkdb 作为源, bencmarkdb_dev 作为目标。





单击选择源后,将弹出选择源模式,然后单击选择连接...按钮,另一个弹出窗口。最新的弹出窗口(下图右侧的窗口)显示了我要比较的两个数据库。





但是,在我为其中一个选择了一个源或目标,所有弹出窗口均关闭,但选择源...或选择目标...下拉菜单中没有任何内容。实际上,它只是返回到第一张图片。



是否有解决方案,所以我可以比较数据库之间的架构?



更新:



我已经在VS 2012、2015和2017上尝试过此方法。同样的问题。 VS软件和系统软件是最新的。下面是一些我正在使用的软件版本,如果有帮助的话。



Windows 7 Enterprise SP1



VS 2012、2015和2017



SQL Server 2014



.NET Framework v4.7.02053

解决方案

好,所以我设法解决了这个问题。
首先,您需要从Microsoft页面安装SSDT。只是谷歌它。
确保在启动Installer时(在Modify上)在各个组件中也列出了它。只需SQL Server数据库(我可以从Integration Services中选择3个或更多)。选择。



这时我关闭了VS,以确保该连接不再存在。
下次启动VS时,历史上应该不会出现有问题的连接。



重新创建连接(我检查了记住密码)并确认。模式比较工作。



不确定,但无奈中我还安装了 Redgate ReadyRoll Core, Redgate SQL Prompt Core和 Redgate SQL Search。
我不认为这很重要,但是如果其他所有方法都失败了……



编辑:这在2台机器上都有效,但似乎没有连接到VS版本。


I am attempting to compare schemas of two databases on the same server.

The two databases are named benchmarkdb and benchmarkdb_dev.

In Visual Studio 2017, I go to Tools > SQL Server > New Schema Compare...

From both drop down menus labeled "Select Source" and "Select Target" (as seen in the picture below), I want to select benchmarkdb as source and bencmarkdb_dev as target.

After clicking to select a source, the "Select Source Schema" pops up, and I clicked the "Select Connection..." button, which brought another popup. The newest popup (the one on the right in the picture below) shows both databases I am trying to compare.

However, after I choose one for either the source or the target, all pop ups close, but nothing populates the "Select Source..." or "Select Target..." drop down menus. In fact, it just goes back to looking like the first picture.

Is there a solution to this so I can compare the schemas between the databases?

Update:

I have tried this on VS 2012, 2015, and 2017. All are facing the same issue. VS software and system software are up to date. Below are some versions of software that I am using, if it is any help.

Windows 7 Enterprise SP1

VS 2012, 2015, and 2017

SQL Server 2014

.NET Framework v4.7.02053

解决方案

OK, so I managed to fix it. First off, you need to install SSDT from Microsoft pages. Just google it. Make sure that you also have it listed in individual components when starting Installer (on Modify). Only SQL Server Database is required (I could choose from Integration Services and 3 more).

Next, you need to "Remove connection from history" in Schema Compare modal for connection selection.

I closed VS at this point, to make sure that the connection is not in history anymore. Starting VS the next time, you should not have the problematic connection in history.

Recreate the connection (I checked "remember password") and voila. Schema compare works.

Not really sure, but in desperation I also installed "Redgate ReadyRoll Core", "Redgate SQL Prompt Core" and "Redgate SQL Search". I don't think it matters, but if all else fails...

Edit: This worked on 2 machines and it doesn't seem to be connected to VS version.

这篇关于Visual Studio 2017中的SQL Server比较架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆