2

I have SQL Server 2005 which is installed on server machine.

I was working fine on SQL server before I change the server machine IP. I changed server machine IP to host the Web Service on it.

But now when I enter the Login and Password information SQL Server displays this error message:

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) (Microsoft SQL Server, Error: 2)

I also tried to remove Server machine IP, Still I can't able to access the SQL Server. My all database stucked in it. Or can I recover my SQL server database?

2
  1. Make sure SQL Server Service is running
  2. If a named instance, make sure SQL Server browser service is running
  3. Make sure SQL Server is configured to allow remote connections
  4. Examine the SQL Server error log for messages confirming that SQL is listening on the expected network interfaces and ports
  5. Test server connectivity with PING from the client machine
  6. Test port connectivity using TELNET or PowerShell to the server and port (from step 4) from the client machine. For example

    a. TELNET 1433

    b. PowerShell:

1433 | % { echo ((new-object Net.Sockets.TcpClient).Connect("YourServerName",$_)) "server listening on TCP port $_" }

  1. Check firewall settings if step 5 or 6 connectivity test fails

For further read below forum discussing the same which would be helpful to you for troubleshooting :

https://stackoverflow.com/questions/18060667/cannot-connect-to-server-a-network-related-or-instance-specific-error

0

If you do not suceeed in fixing your SQL Server instance, you can still move your databases to a newly installed SQL Server instance. Look for *.mdf and *.ldf files. Theese are database files that you can attach to a new SQL Server instance. Before copying those files make sure that your SQL Server service is stopped.

  • 2
    That you can attach... maybe. MDF/LDF files are not as reliable as proper backups. If the SQL Server service that can't be connected to is still running, you won't be able to move the files. And if it's running, they could be corrupt, depending on how SQL Server was brought down. – Aaron Bertrand Jan 29 '15 at 15:37
0
  1. Enable the TCP/IP protocol using the Surface Area Configuration Utility
  2. Make sure the TCP/IP protocol is enabled in the SQL Server Configuration Utility
  3. Make sure the SQL Server browser is started. Note this step is optional. It is possible to set the SQL Server instance to use a fixed IP address - but this is non-standard for named instances
  4. Make sure SQL Server and SQL Server Browser are exempted by the firewall on the server machine. This is done by putting sqlservr.exe and sqlbrowser.exe as an exception in the windows firewall.
  5. Note: In order to get things to work. You might need to completely reboot the server machine after making the changes.

http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.