Visual Studio 2012 and MS Sql Server 2012 - connect with Server Explorer

拈花ヽ惹草 提交于 2019-12-11 16:22:21

问题


I have a problem establishing connection with Server Explorer in Visual Studio 2012 Ultimate with MS SQL server 2012 Express. Everything is on local machine.

You can see screen shot here - http://s16.postimage.org/4gvo7r5id/se_prob_ss1.png

With System.Data.SqlClient and SqlConnection.Open() everything work fine I'm able to connect and execute SQL scripts (with and without Windows Authentication).

What I tried so far:

  • I checked in MS SQL Management Studio in Conncetions "Allow remote connections to this server" (Checked)
  • In SQL Server Configuration Manager on my SQL server TCP/IP protocol is enabled
  • I tried to connect with turned off firewall and antivirus protection
  • I tried with new Logins (with System.Data.SqlClient.SqlConnection it work)

回答1:


In the picture, the server name you are connecting to appears wrong. You indicated you installed SQL Express; it has a default instance name of SQLEXPRESS. So the server you are connecting to should be:

MILLENIUM\SQLEXPRESS

instead of just MILLENIUM.



来源:https://stackoverflow.com/questions/12437480/visual-studio-2012-and-ms-sql-server-2012-connect-with-server-explorer

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