views:

397

answers:

2

I am unable to connect to my local instance of SQL Server 2008 Express using SQL Server Management Studio.

I believe the problem is related to a change I made to the connection protocols. Before the error occurred, I had Shared Memory enabled and Named Pipes and TCP/IP disabled. I then enabled both Named Pipes and TCP/IP, and this is when I started experiencing the problem.

When I try to connect to the server with SSMS (with either my SQL server sysadmin login or with windows authentication), I get the following error message:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)

Why is it returning a Named Pipes error? Why would it not just use Shared Memory, as this has a higher priority order in the list of connection protocols? It seems like it is not listening on Shared Memory for some reason?

When I set Named Pipes to enabled and try to connect, I get the same error message.

My windows account is does not have administrator priviliges on my computer - perhaps this is making a difference in some way (as some of the discussions in this post about an "SuperSocketNetLib\Lpc" registry key seems to suggest).

A: 

Since now you cannot connect to SQL Server to disable named pipes, you have to force a TCPIP connection.

Here's how:

click on START / RUN then run the cliconfg.exe utility. In this, create an alias for your server (you can use the same name) and put the default for TCPIP

That should force TCPIP over Named Pipes and maybe get you connected.

Try connecting to the alias name that you used in CliConfg and it will now connect using TCPIP.

Raj More
I created a new alias as you suggested, with TCPIP as selected "network library", but still no luck. I get an error that suggests it can't even find the server:"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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)"
Proposition Joe
By the way, when using the cliconfg tool, I noticed that the existing alias for the server, which I have been using successfully before these errors appeared, had network library set to "Named Pipes". However, before I enabled Named Pipes (and set off the problems), I was using Shared Memory only. Very strange, but perhaps this explains why the initial error message is focused on Named Pipes.
Proposition Joe
A: 

I had this exact same problem. I'd try connecting as ASHWHVM004\SQLEXPRESS and I'd get a connection failed message. If I explicitly requested Shared Memory, it'd work fine. Shared Memory, Named Pipes, and TCP/IP were all enabled.

I seemingly "fixed" it by doing the following:

  1. I opened up Sql Server Configuration Manager and drilled down to SQL Server Network Configuration > Protocols for SQLEXPRESS.
  2. I disabled everything except Shared Memory.
  3. I restarted the SQLEXPRESS service instance and tried connecting as before. It worked fine.
  4. I enabled TCP/IP and Named Pipes and restarted the SQLEXPRESS service instance and tried connecting as before. It worked fine.

Either I did something else during this process to fix it that I don't recall, or the act of disabling and re-enabling caused some twiddly bit to get flipped back the right way.

Good luck!

Nicholas Piasecki