0

I have problem with my SQL Server 2008 R2 instance. I want to log in using windows authentication and server name "local", but error 2 is returned. I've tried to login with a server name of "IP address of my server" but again it failed. Does anybody know what should I do?

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)

  • What is the error message you receive? Are you sure your windows login has been added to the server? – LowlyDBA Dec 9 '14 at 17:15
  • yesterday I login to to my database in this way but today i cann't do it – dorix1990 Dec 9 '14 at 17:20
  • 1
    Can you verify the SQL Server service is running? – LowlyDBA Dec 9 '14 at 17:29
  • Are you sure the service is started? Might seem dumb, but that's a good place to start. – Kris Gruttemeyer Dec 9 '14 at 17:29
  • Don't forget you can always PING YOURSERVERNAME to check that the server is online. – jl01 Dec 9 '14 at 17:41
-1

Make sure you TCP/IP is enabled under SQL SErver Network Configuration enter image description here

If it is disabled than please enable it and restart services for that instance.

you will be able to log-in.

  • 1
    This might be the answer but there can be many reasons for the error mentioned by OP. Error simply says SQL Server was not detected by connecting string. If OP is giving incorrect name, Port is blocked, connecting to named instance and Browser service is not up, you can get such messages – Shanky Dec 9 '14 at 22:22

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.