-3

I'm trying to connect to a remote SQL Server 2014 for development purposes. To simplify i'm testing inside SQL Server Management Studio using Windows authentication, but i get the error below :

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance> Specified) (Microsoft SQL Server, Error: -1)

I already enabled TCP/IP on SQL Server Configuration Manager. Firewall is disabled. I can ping the remote hostname. Property 'Allow remote connections to this server' is checked.

Anything more to check ?

Thanks

delphirules
  • 5,815
  • 14
  • 51
  • 95
  • 2
    Did you search for the error? I mean, there are only [1,863 search results *just on this site*](https://stackoverflow.com/search?tab=votes&q=%22A%20network-related%20or%20instance-specific%20error%20occurred%20while%20establishing%20a%20connection%20to%20SQL%20Server.%20%22&mixed=1). Maybe start with [this answer](https://stackoverflow.com/a/18060818/61305). – Aaron Bertrand Oct 17 '18 at 18:26

1 Answers1

4

Check if your server allows connections via "Allow remote connections to this server" in the database properties page -> Connections. Make sure you can ping the server from the machine you are trying to connect from to ensure the SQL Server is reachable. Make sure that port 1433 is open on your SQL Server.

slaphshot33324
  • 590
  • 1
  • 7
  • 21
  • Everything you said is Ok except the port 443 i don't know how to check, where can i check this ? – delphirules Oct 17 '18 at 18:22
  • 1
    I think he means 1433. Not sure why one would assume SSL here. – S3S Oct 17 '18 at 18:25
  • Sorry, meant 1433 and updated my answer. – slaphshot33324 Oct 17 '18 at 18:48
  • 1
    This solved my issue : Today I spent a lot of time on this, finally what worked for me is: Open Sql Server Configuration Manager --> Protocols for --> TCP/IP --> IP Addresses(Tab). Go to the last entry IP All and mention TCP Port 1433. Now restart SQL Server () using services.msc. After this, the problem got resolved! – delphirules Oct 17 '18 at 18:50
  • 1
    For context, that is from [this comment](https://stackoverflow.com/questions/18060667/why-am-i-getting-cannot-connect-to-server-a-network-related-or-instance-speci#comment45684188_18060818). – Aaron Bertrand Oct 17 '18 at 19:22