database 使用 SQL Server 2008 在 Visio 中进行数据库图表的逆向工程

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/92811/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 06:56:48  来源:igfitidea点击:

Reverse Engineering for Database Diagramming in Visio with SQL Server 2008

databasesql-server-2008odbcvisio

提问by Matthias Meid

I need to reverse engineer a Microsoft SQL Server 2008 in order to create a Microsoft Visio 2007 Database Model Diagram. So I choose "Reverse Engineer" from the Database menu to connect to the DB.

我需要对 Microsoft SQL Server 2008 进行逆向工程以创建 Microsoft Visio 2007 数据库模型图。所以我从数据库菜单中选择“逆向工程师”来连接到数据库。

I configured the Microsoft SQL Server Visio driver so that is uses SQL Server Native Client 10.0 as the ODBC driver. Afterwards I created a User DSN which connects to my DB. This DSN works (at least the provided test is successful). After clicking next in the Reverse Engineer Wizard, Visio kindly asks for my credentials which I properly provide, but after clicking OK I receive the following message:

我配置了 Microsoft SQL Server Visio 驱动程序,以便使用 SQL Server Native Client 10.0 作为 ODBC 驱动程序。之后我创建了一个连接到我的数据库的用户 DSN。此 DSN 有效(至少提供的测试是成功的)。在逆向工程师向导中单击下一步后,Visio 会询问我正确提供的凭据,但单击确定后,我收到以下消息:

The currently selected Visio driver is not compatible with the data source.

当前选择的 Visio 驱动程序与数据源不兼容。

I tried using the old SQL Server ODBC driver, by also reconfiguring the Visio driver of course. It does not work too.

我尝试使用旧的 SQL Server ODBC 驱动程序,当然还要重新配置 Visio 驱动程序。它也不起作用。

采纳答案by Paul Hargreaves

From Microsoft supportvia the Microsoft forums:

微软支持通过Microsoft论坛:

Further investigation reveals that this is expected behavior for Visio 2007. When Visio opens a connection using the Visio SQL Server Driver it checks the server version and since SQL Server 2008 shipped after Visio 2007 it doesn't recognise SQL Server 2008 as a supported version and closes the connection. You can wait for a future version of Visio to ship which does recognise SQL Server 2008 or use the Visio Generic ODBC driver which can successfully open connections to SQL Server 2008. A third option is to use a copy of SQL Server 2005 for initial reverse engineering. The Visio team is aware of this issue.

进一步调查表明,这是 Visio 2007 的预期行为。当 Visio 使用 Visio SQL Server 驱动程序打开连接时,它会检查服务器版本,并且由于 SQL Server 2008 在 Visio 2007 之后发布,它不会将 SQL Server 2008 识别为受支持的版本,并且关闭连接。您可以等待未来版本的 Visio 能够识别 SQL Server 2008 或使用 Visio 通用 ODBC 驱动程序,该驱动程序可以成功打开与 SQL Server 2008 的连接。第三种选择是使用 SQL Server 2005 的副本进行初始逆向工程. Visio 团队已意识到此问题。

回答by Matthias Meid

To connect Visio 2007 to a SQL Server 2008 database run the Reverse Engineer Wizard (Database/Reverse Engineer. . . ) in Visio 2007 select the ODBC Generic driver from the "Installed Visio drivers" drop-down. Then create a new data source using the SQL Native Client (2005.90.4035, 2005 SP3). You'll get a warning stating that some information retrieved may be incomplete. Click OK and continue. It's not the most intuitive solution (but not difficult), but at least this will allow you to use Visio 2007 to connect to SQL 2008.

要将 Visio 2007 连接到 SQL Server 2008 数据库,请在 Visio 2007 中运行反向工程向导(数据库/反向工程...),从“已安装的 Visio 驱动程序”下拉列表中选择 ODBC 通用驱动程序。然后使用 SQL Native Client (2005.90.4035, 2005 SP3) 创建一个新的数据源。您将收到一条警告,指出检索到的某些信息可能不完整。单击确定并继续。这不是最直观的解决方案(但不难),但至少这将允许您使用 Visio 2007 连接到 SQL 2008。

Chip Lambert, Slalom Consulting

Chip Lambert,Slalom 咨询公司

回答by Ed Graham

An old thread but still a current problem ... I found that although using the ODBC Generic Driver worked, the reverse engineering tool then misses out Triggers, Check Clauses, Views and Stored Procedures. By specifying the Access Visio Driver instead, at least we recover the Check Clauses and Views.

一个旧线程,但仍然是当前问题......我发现尽管使用 ODBC 通用驱动程序工作,逆向工程工具然后错过了触发器、检查子句、视图和存储过程。通过指定 Access Visio 驱动程序,至少我们可以恢复检查子句和视图。

In general, though, I have to say I think this shows an appalling lack of regard for their customers on behalf of the relevant teams at Microsoft. I had a very similar experience last year when upgrading to Visual Studio 2010 only to discover that my SSIS projects no longer opened ... as can be seen from this thread, MS could not care less.

不过,总的来说,我不得不说,我认为这表明微软相关团队对客户的漠视令人震惊。去年我有一次非常相似的经历,当升级到 Visual Studio 2010 时才发现我的 SSIS 项目不再打开......从这个线程可以看出,MS 不在乎。

回答by Marlon

You could create a User DSN in the ODBC Data Source Administrator utility and then connect to your instance of MSSQL 2008 through Visio 2007 by using the selecting the ODBC Generic Driver instead of the Microsoft SQL Server driver.

您可以在 ODBC 数据源管理器实用程序中创建一个用户 DSN,然后通过选择 ODBC 通用驱动程序而不是 Microsoft SQL Server 驱动程序,通过 Visio 2007 连接到您的 MSSQL 2008 实例。

You could also try the SQL Server 2008 Data Mining Addins for Office 2007.

您还可以尝试使用适用于 Office 2007 的 SQL Server 2008 数据挖掘插件。

Grab them here: http://www.microsoft.com/downloads/details.aspx?FamilyId=896A493A-2502-4795-94AE-E00632BA6DE7&displaylang=en

在此处获取它们:http: //www.microsoft.com/downloads/details.aspx?FamilyId=896A493A-2502-4795-94AE-E00632BA6DE7&displaylang=en

I hope this helps!

我希望这有帮助!

Cheers

干杯

回答by Jeremy Thomas

I ended up using the Generic OLE Db Provider instead of the ODBC Generic driver to connect to SQL Server 2008 - datatypes seemed to come through OK.

我最终使用通用 OLE Db 提供程序而不是 ODBC 通用驱动程序连接到 SQL Server 2008 - 数据类型似乎可以通过。

回答by user5820

I also had this problem as above what i found worked

我也遇到了这个问题,我发现我发现它有效

  1. was using the Reverse engineer wizard
  2. using the Generic OLE Db provider in the first step
  3. then setting the connection provider in the next step to the highest SQL native driver shown ( I am using SQL2016 with SQL native 11.0 on a windows 10 surface pro 4 for reference )
  4. then entering the correct destination and credentials in the connection tab ( testing the connection if you aren`t sure)

    and that seemed to work for me,( I then had the ability to bring through tables indexes views primary and foreign keys and stored procedures).

  1. 正在使用逆向工程向导
  2. 在第一步中使用通用 OLE Db 提供程序
  3. 然后将下一步中的连接提供程序设置为所示的最高 SQL 本机驱动程序(我在 Windows 10 Surface pro 4 上使用 SQL2016 和 SQL native 11.0 以供参考)
  4. 然后在连接选项卡中输入正确的目标和凭据(如果不确定,请测试连接)

    这似乎对我有用,(然后我有能力通过表索引视图主键和外键以及存储过程)。

I also found that visio kept locking up on me ... apparently this is common ( and there I was feeling special) after finally getting sick of it i looked at these links

我还发现 visio 一直锁定我......显然这是很常见的(我感觉很特别)在终于厌倦了之后我看了这些链接

https://dhondiyals.wordpress.com/2011/07/29/microsoft-visio-2010-crashes-very-frequently-resolved/

https://dhondiyals.wordpress.com/2011/07/29/microsoft-visio-2010-crashes-very-frequently-resolved/

https://answers.microsoft.com/en-us/msoffice/forum/msoffice_visio-mso_windows8/visio-2010-frozen-on-surface-pro/df1df27a-6585-4b0c-8442-a4363c541e08

https://answers.microsoft.com/en-us/msoffice/forum/msoffice_visio-mso_windows8/visio-2010-frozen-on-surface-pro/df1df27a-6585-4b0c-8442-a4363c541e08

I found my problem to be in the later, ( the touchscreen and handwriting running application) .So ended it, and now I have the experience I was expecting

我发现我的问题出在后面,(触摸屏和手写运行的应用程序)。所以结束了,现在我有了我期待的体验