Visual Studio 2012中数据库资源管理器中缺少Diagram文件夹

时间:2023-01-16 22:05:16

I was in a middle of designing a website when suddenly Database Diagram folder just disappeared from the Database Explorer. I have no idea what happened and what to do right now, as I desperately need it to continue my work - adding tables to database manually are not an option for me.

当数据库图表文件夹突然从数据库资源管理器中消失时,我正在设计一个网站。我不知道发生了什么以及现在该做什么,因为我迫切需要它继续我的工作 - 手动向数据库添加表不是我的选择。

I've been seeking for the solution for a whole day, and I even re-installed the Visual Studio and local IIS server, but it wasn't helpfull at all.

我一直在寻找解决方案一整天,我甚至重新安装了Visual Studio和本地IIS服务器,但它根本没有帮助。

Is there any way to bring the feature back or at least is there any free tool that would work on Windows 8 x64 and has diagram-based database designer for MSSQL 2008?

是否有任何方法可以恢复该功能,或者至少是否有任何可用于Windows 8 x64并且具有基于图表的MSSQL 2008数据库设计器的免费工具?

EDIT

It seems that Microsoft removed the diagramming for purpose. Which is pretty logical in a business logic - why would somebody buy Server Management Studio if they have basic tool (diagramming) built in Visual Studio?

2 个解决方案

#1


3  

1) Database Diagram is a feature of SQL Server, not Visual Studio. I am not sure what VS uses to display that folder but you might want to verify with your DBA or check the configuration of the database to see if someone has not just disabled the ability to use diagrams. Have you tried refreshing your connection to the database server as well?

1)数据库图是SQL Server的一个特性,而不是Visual Studio。我不确定VS使用什么来显示该文件夹,但您可能希望与DBA进行验证或检查数据库的配置以查看是否有人刚刚禁用了使用图表的功能。您是否尝试过刷新与数据库服务器的连接?

2) How is adding tables to a database manually not an option? If you get yourself dependent on doing things one way and only that one way you are setting yourself up for disaster in future projects, as you are in your current one. There are other ways from within VS to create a table, it just may not be a graphical picture that diagrams offers.

2)如何手动向数据库添加表而不是选项?如果你让自己依赖于以某种方式做事,而只是在未来的项目中让你自己为灾难做好准备,就像你现在的那样。 VS中还有其他方法可以创建表格,它可能不是图表提供的图形图片。

3) Have you looked at the database through SSMS to see if the diagrams folder shows up there?

3)您是否通过SSMS查看了数据库以查看图表文件夹是否显示在那里?

#2


1  

Hello this has been my solution that worked for me and enabled me to use database diagram ide in visual studio 2012!!

您好,这是我的解决方案,对我有用,使我能够在visual studio 2012中使用数据库图表ide!

First i installed SQL Server Management Studio. I then noticed that i still did not have SQLEXPRESS Service or SQL Agent Browser in my computer services either.. This was why i assume i couldn't login to any of the SSMS which was annoying. I then downloaded SQL Server Express R2 which then ran me though another setup which was fine. I did also choose to put a sql server password for SQL Server Express.

首先我安装了SQL Server Management Studio。然后我注意到我的计算机服务中仍然没有SQLEXPRESS服务或SQL Agent浏览器。这就是为什么我认为我无法登录任何烦人的SSMS。然后我下载了SQL Server Express R2,然后通过另一个设置运行我很好。我也选择为SQL Server Express安装一个sql server密码。

Once installed I double checked to make sure the services where running by right clicking MY COMPUTER / MANAGE / SERVICES -- scroll down till you see "SQL Server (SQLEXPRESS)" and make sure that the service has started and also "SQL Server Agent (SQLEXPRESS)" (this one was turned off when i checked) .. i was then able to login to SSMS without a problem.

安装完成后,我仔细检查以确保运行的服务通过右键单击MY COMPUTER / MANAGE / SERVICES - 向下滚动直到看到“SQL Server(SQLEXPRESS)”并确保服务已启动并且还“SQL Server Agent( SQLEXPRESS)“(当我检查时,这个被关闭了)..然后我能够毫无问题地登录SSMS。

I then created a new database, right clicked diagram like we always do in VS and created a diagram with two tables, created their relationships blah blah..

然后我创建了一个新的数据库,右键单击图表,就像我们在VS中一直做的那样,创建了一个带有两个表的图表,创建了他们的关系等等等等等等。

i then created a new website in vs 2012, i clicked "Connect To Database" in the SERVER EXPLORER"

然后我在vs 2012中创建了一个新网站,我点击了“SERVER EXPLORER”中的“连接数据库”

I choose my server name, used windows authenication and selected the database i just created in SSMS.

我选择我的服务器名称,使用Windows身份验证并选择我刚刚在SSMS中创建的数据库。

Then to my suprise i now have database diagram designing in Visual Studio 2012.. Finally!

然后我很惊讶我现在在Visual Studio 2012中有数据库图表设计..最后!

Thankyou microsoft for removing such a cool feature which now gives us developers a few things to do.

Thankyou microsoft删除了这么酷的功能,现在给我们的开发人员做了一些事情。

Hope this helps.

希望这可以帮助。

#1


3  

1) Database Diagram is a feature of SQL Server, not Visual Studio. I am not sure what VS uses to display that folder but you might want to verify with your DBA or check the configuration of the database to see if someone has not just disabled the ability to use diagrams. Have you tried refreshing your connection to the database server as well?

1)数据库图是SQL Server的一个特性,而不是Visual Studio。我不确定VS使用什么来显示该文件夹,但您可能希望与DBA进行验证或检查数据库的配置以查看是否有人刚刚禁用了使用图表的功能。您是否尝试过刷新与数据库服务器的连接?

2) How is adding tables to a database manually not an option? If you get yourself dependent on doing things one way and only that one way you are setting yourself up for disaster in future projects, as you are in your current one. There are other ways from within VS to create a table, it just may not be a graphical picture that diagrams offers.

2)如何手动向数据库添加表而不是选项?如果你让自己依赖于以某种方式做事,而只是在未来的项目中让你自己为灾难做好准备,就像你现在的那样。 VS中还有其他方法可以创建表格,它可能不是图表提供的图形图片。

3) Have you looked at the database through SSMS to see if the diagrams folder shows up there?

3)您是否通过SSMS查看了数据库以查看图表文件夹是否显示在那里?

#2


1  

Hello this has been my solution that worked for me and enabled me to use database diagram ide in visual studio 2012!!

您好,这是我的解决方案,对我有用,使我能够在visual studio 2012中使用数据库图表ide!

First i installed SQL Server Management Studio. I then noticed that i still did not have SQLEXPRESS Service or SQL Agent Browser in my computer services either.. This was why i assume i couldn't login to any of the SSMS which was annoying. I then downloaded SQL Server Express R2 which then ran me though another setup which was fine. I did also choose to put a sql server password for SQL Server Express.

首先我安装了SQL Server Management Studio。然后我注意到我的计算机服务中仍然没有SQLEXPRESS服务或SQL Agent浏览器。这就是为什么我认为我无法登录任何烦人的SSMS。然后我下载了SQL Server Express R2,然后通过另一个设置运行我很好。我也选择为SQL Server Express安装一个sql server密码。

Once installed I double checked to make sure the services where running by right clicking MY COMPUTER / MANAGE / SERVICES -- scroll down till you see "SQL Server (SQLEXPRESS)" and make sure that the service has started and also "SQL Server Agent (SQLEXPRESS)" (this one was turned off when i checked) .. i was then able to login to SSMS without a problem.

安装完成后,我仔细检查以确保运行的服务通过右键单击MY COMPUTER / MANAGE / SERVICES - 向下滚动直到看到“SQL Server(SQLEXPRESS)”并确保服务已启动并且还“SQL Server Agent( SQLEXPRESS)“(当我检查时,这个被关闭了)..然后我能够毫无问题地登录SSMS。

I then created a new database, right clicked diagram like we always do in VS and created a diagram with two tables, created their relationships blah blah..

然后我创建了一个新的数据库,右键单击图表,就像我们在VS中一直做的那样,创建了一个带有两个表的图表,创建了他们的关系等等等等等等。

i then created a new website in vs 2012, i clicked "Connect To Database" in the SERVER EXPLORER"

然后我在vs 2012中创建了一个新网站,我点击了“SERVER EXPLORER”中的“连接数据库”

I choose my server name, used windows authenication and selected the database i just created in SSMS.

我选择我的服务器名称,使用Windows身份验证并选择我刚刚在SSMS中创建的数据库。

Then to my suprise i now have database diagram designing in Visual Studio 2012.. Finally!

然后我很惊讶我现在在Visual Studio 2012中有数据库图表设计..最后!

Thankyou microsoft for removing such a cool feature which now gives us developers a few things to do.

Thankyou microsoft删除了这么酷的功能,现在给我们的开发人员做了一些事情。

Hope this helps.

希望这可以帮助。