views:

1167

answers:

3

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.

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.

So does anyone have any thoughts as to how to resolve this?

A: 

Are you using the same instance name in both SSMS and your web application?

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).

Aaron Alton
A: 

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).

Richard Hein
A: 

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.

I suspect the fact that it uses dynamic ports is another issue with windows 7.

related questions