views:

63

answers:

3

i have sql server 2005 installed in my local machine. when i installed it, i was able to connect to the local server which is named "MNTCON016". After restarting the machine, I found out that i was not able to connect to the local server "MNTCON016". it gave me the following error.

A network related or instance specified error occured while establishing a connection to SQLServer. 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)(Microsoft SQL Server, Errorv 2)

After a lot of troubleshooting, I installed the same setup again and named the instance "MNTCON016\SQLEXPRESS", and then again it allowed me to connect properly.


But When I restart the machine, it gives me the same error.
On the other hand, it allows me to connect to remote database servers on the network. The only problem is with my local server..

Please advice

A: 

Goto Run from start menu. Type services.msc there. This gives you a list of all runnig services on your local machine.

Be sure that services for your SQL Server instance is running. These services should be set to automatic if you want them to start when windows starts.

Aykut
it is running. the thing is that i can connect to the servers on the network.its just my local server
reggie
A: 

The section in this Microsoft support article describing Windows firewall exceptions might help.

Darth Continent
TRIED THAT.DID NOT HELP..SAME ERROR
reggie
firewall setting are unlickly to effect connecting to a sql server running on the same machine as the client
Ian Ringrose
+2  A: 

Try to open Start/Programs/Microsoft SQL Server 2005/Configuration Tools/SQL Server Configuration Manager. Open node SQL Server Network Configuration and click Protocols for MSSQLSERVER. Verify which protocols are enabled. For example, I have named pipes disabled on my machine. Also open SQL Native Client Configuration and click Client Protocols and check wchich protocols are enabled.

Regards

Piotr

Piotr Rodak