简体   繁体   English

找不到或无法访问Asp.net SQL Server实例

[英]Asp.net SQL server instance not found or not accessible

I'm working on a web project, when I was using the vs2008 everything works fine. 我正在开发一个Web项目,当我使用vs2008时,一切正常。 But after I use another machine and work under vs2012 using the same way setting up the project, exception always saying instance not found or not accessible. 但是,当我使用另一台计算机并在vs2012下以相同的方式设置项目后,总是出现异常,提示找不到实例或无法访问实例。

I have google the solution but they're using the SQL server management tool to solve it. 我有谷歌的解决方案,但他们正在使用SQL Server管理工具来解决它。

I just installed the vs2012, do I need to install a new SQL server 2012 to get those tools o configure it? 我刚刚安装了vs2012,是否需要安装新的SQL Server 2012来获取这些工具或对其进行配置?

Thanks very much 非常感谢

Finally, i got the simple solution in my case. 最终,我得到了一个简单的解决方案。 what I've done is just 我所做的只是

  1. install SQL SERVER 2012 EXPRESS 安装SQL SERVER 2012 EXPRESS

  2. open the SQL SERVER CONFIGURATION MANAGER 打开SQL SERVER CONFIGURATION MANAGER

  3. go to SQL SERVER NETWORK CONFIGURATION on the left panel 转到左侧面板上的“ SQL SERVER网络配置”

  4. expand it and select the protocol for particular SERVER 展开并为特定的SERVER选择协议

  5. on the right panel, enable the TCP/IP 在右侧面板上,启用TCP / IP

  6. restart the corresponding server 重新启动相应的服务器

after these steps, all done. 完成这些步骤后,一切都完成了。

since some of the SQL SERVER setting would disable the TCP/IP by default. 因为某些SQL SERVER设置在默认情况下会禁用TCP / IP。

so even when we install Visual Studio, we still couldn't ensure the server is able to be used. 因此,即使我们安装Visual Studio,也仍然无法确保服务器能够使用。

Then what we have to do is to download and Install SQL Server Express at least in order to get the configuration tool. 然后,我们要做的就是至少下载并安装SQL Server Express,以获取配置工具。

Honestly this is my first time encountering this kind of problem which is all because of Visual Studio 2012. 老实说,这是我第一次遇到此类问题,这完全是因为Visual Studio 2012。

hopefully this could help those who have the same problem. 希望这可以帮助那些有同样问题的人。

您需要确保SQL连接字符串有效,例如IP地址/主机名,用户名,密码。

我也遇到这种类型的错误,但现在我正在使用新的Microsoft SQL Server 2017,并且已在我的计算机上成功运行,我建议尝试此新版本,这是链接https://www.microsoft.com / en-us / sql-server / sql-server-2017 ,希望您喜欢它。尝试一次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM