I've installed sql2008 express sp1 on my laptop that's running the beta 1 of windows 7. The problem that I'm experiencing is a combination of dynamic ports/firewall/windows 7.
我已经在运行Windows 7测试版1的笔记本电脑上安装了sql2008 express sp1。我遇到的问题是动态端口/防火墙/ Windows 7的组合。
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I was first experiencing this problem when I was trying to connect to sql with the management tools, but as soon as I enabled Sql Server Management Tools as a program to go through the firewall it worked out fine. Now the problem is when I launch my web site it gives me that error. I've also positive that sql browser is running and I've enabled tcp/ip and named pipes in the sql express service.
当我尝试使用管理工具连接到sql时,我第一次遇到此问题,但是只要我启用Sql Server管理工具作为程序通过防火墙就可以了。现在的问题是,当我启动我的网站时,它给了我这个错误。我也肯定sql浏览器正在运行,我在sql express服务中启用了tcp / ip和命名管道。
So does anyone have any thoughts as to how to resolve this?
那么有没有人想过如何解决这个问题?
3 个解决方案
#1
Are you using the same instance name in both SSMS and your web application?
您是否在SSMS和Web应用程序中使用相同的实例名称?
Commonly, people will try to connect based upon the machine name exclusively, for instance "MySQLServer". SQL Server Express installs a named instance by default, whose default name is SQLExpress. If this is the case, try connecting to "MySQLServer\SQLExpress" instead (omitting the quotes, of course).
通常,人们将尝试仅基于机器名称进行连接,例如“MySQLServer”。 SQL Server Express默认安装命名实例,其默认名称为SQLExpress。如果是这种情况,请尝试连接到“MySQLServer \ SQLExpress”(当然,省略引号)。
#2
Go into SQL Server Configuration Manager - under Programs - Microsoft SQL Server 2008 - Configuration Tools - and make sure that under SQL Server Network Configuration - Protocols for SQLExpress, that Named Pipes is enabled (by default it is not).
进入SQL Server配置管理器 - 在程序 - Microsoft SQL Server 2008 - 配置工具下 - 并确保在SQL Server网络配置 - SQLExpress的协议下,启用了命名管道(默认情况下不是)。
#3
Yes, I'm aware of both scenarios. I've setup as a named instance and as a default instance as well, and adjusted the connection strings, neither worked.
是的,我知道这两种情况。我已经设置为命名实例和默认实例,并调整连接字符串,但都没有工作。
I've also enabled named pipes and no go. It has everything to do with windows 7 firewall, but couldn't figure it out so I just installed server 2008 standard edition and voila.
我也启用了命名管道,没有去。它与Windows 7防火墙有关,但无法弄明白所以我只是安装了服务器2008标准版和瞧。
I suspect the fact that it uses dynamic ports is another issue with windows 7.
我怀疑它使用动态端口是Windows 7的另一个问题。
#1
Are you using the same instance name in both SSMS and your web application?
您是否在SSMS和Web应用程序中使用相同的实例名称?
Commonly, people will try to connect based upon the machine name exclusively, for instance "MySQLServer". SQL Server Express installs a named instance by default, whose default name is SQLExpress. If this is the case, try connecting to "MySQLServer\SQLExpress" instead (omitting the quotes, of course).
通常,人们将尝试仅基于机器名称进行连接,例如“MySQLServer”。 SQL Server Express默认安装命名实例,其默认名称为SQLExpress。如果是这种情况,请尝试连接到“MySQLServer \ SQLExpress”(当然,省略引号)。
#2
Go into SQL Server Configuration Manager - under Programs - Microsoft SQL Server 2008 - Configuration Tools - and make sure that under SQL Server Network Configuration - Protocols for SQLExpress, that Named Pipes is enabled (by default it is not).
进入SQL Server配置管理器 - 在程序 - Microsoft SQL Server 2008 - 配置工具下 - 并确保在SQL Server网络配置 - SQLExpress的协议下,启用了命名管道(默认情况下不是)。
#3
Yes, I'm aware of both scenarios. I've setup as a named instance and as a default instance as well, and adjusted the connection strings, neither worked.
是的,我知道这两种情况。我已经设置为命名实例和默认实例,并调整连接字符串,但都没有工作。
I've also enabled named pipes and no go. It has everything to do with windows 7 firewall, but couldn't figure it out so I just installed server 2008 standard edition and voila.
我也启用了命名管道,没有去。它与Windows 7防火墙有关,但无法弄明白所以我只是安装了服务器2008标准版和瞧。
I suspect the fact that it uses dynamic ports is another issue with windows 7.
我怀疑它使用动态端口是Windows 7的另一个问题。