cannot connect to local server
I have SQL Server 2005 installed in my local machine开发者_如何学JAVA. 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":
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 as before. On the other hand, it allows me to connect to remote database servers on the network. The only problem is with my local server.
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
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.
精彩评论