Is there a way to visually display a View in a database diagram in SQL Server 2008?

狂风中的少年 提交于 2020-01-13 10:03:24

问题


I would like to create a database diagram in SQL Server 2008 and have a View in the diagram. is there a way to do this?


回答1:


I don't think so. SQL Server Management studio allows only Tables to be included in the database diagram. If you have Microsoft Visio, you can use that to include the Views in your database diagram.




回答2:


Download SQL Sentry Plan Explorer - this is a free app that significantly extends the built-in execution plan functionality in Management Studio. Also grab the Management Studio add-in (you'll have to re-start SSMS). Once installed, in SSMS, run the following query, with "Actual Execution Plan" turned on:

SELECT * FROM dbo.view;

Right-click the Execution Plan and choose "View with SQL Sentry Plan Explorer."

Once the plan is open in Plan Explorer, you can see the base tables that are referenced by the view (even if they are nested) on the Join Diagram tab in the lower pane.

Disclaimer: I work for SQL Sentry, but there are absolutely no strings attached.



来源:https://stackoverflow.com/questions/7194948/is-there-a-way-to-visually-display-a-view-in-a-database-diagram-in-sql-server-20

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!