0

I am getting "A network-related or instance-specific error .... " when I try to connect to any external SQL server. I can connect to local server only external servers gives the error.

I am using SQL server 2017 and SSMS 14.

I have read the topic in

Why am I getting "Cannot Connect to Server - A network-related or instance-specific error"?

and tried the following solution mentioned their without any success:

  • enable TCP/ip from SQL Server configuration Manager.
  • try different internet providers.
  • Upgrade SQL server to 2017.18.1
  • Make sure all services are enabled and running.
  • Restart services and the machine.
  • Create azure SQL DB to use name instead of IP.
  • turn off firewall.

Could you please help me or explain why that happen.

Ibrahim
  • 41
  • 1
  • 8
  • 1
    have you added Port exception in firewall? – maulik kansara Jul 30 '18 at 09:46
  • 1
    What do you mean with "external"? The SQL Server [must be properly configured](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/troubleshoot-connecting-to-the-sql-server-database-engine?view=sql-server-2017) to be accessible from outside the actual machine where it is installed. One of the steps mentioned in the docs but that you didn't try is opening the TCP port in Firewall. Give it a try :) – Rigerta Jul 30 '18 at 09:48
  • Actually, I've turn firewall off without any success. I've added sqlserver.exe and the port 1433 to firewall exceptions. but I am getting the same error. – Ibrahim Jul 30 '18 at 09:58
  • 1
    @Ibrahim `Create azure SQL DB` are you trying to connect to *Azure SQL*? In that case a) you should have specified it and b) the firewall you need to configure is *Azure's*. Most likely you need to configure VPN access to the server as well – Panagiotis Kanavos Jul 30 '18 at 10:14
  • @Ibrahim in any case that error message is pretty accurate. It explains all the cases that could lead to it - wrong address, network (firewall, VPN, ports) or service down. Reinstalling or upgrading won't fix anything. – Panagiotis Kanavos Jul 30 '18 at 10:15
  • 2
    Possible duplicate of [Why am I getting "Cannot Connect to Server - A network-related or instance-specific error"?](https://stackoverflow.com/questions/18060667/why-am-i-getting-cannot-connect-to-server-a-network-related-or-instance-speci) – Richardissimo Jul 30 '18 at 10:15
  • @PanagiotisKanavos No I am not trying to connect azure , I am just saying that I thought may be the problem is using IPs so, I created temp DB on azure to use SQL Name instead of IPs. – Ibrahim Jul 30 '18 at 10:30
  • @Ibrahim if you aren't using Azure, why involve it at all? In any case, that's a *very* clear-cut error. The duplicate question explains how to check for connectivity issues. BTW you didn't show the connection string. Perhaps you are trying to connect to a SQL Server Express instance and forgot to use the correct instance name? – Panagiotis Kanavos Jul 30 '18 at 10:37
  • I figured out the root of problem. I am in Qatar and I am using Ooredoo operator as internet provider. I can connect normally when I change to another provider. but with this operator I can not. – Ibrahim Jul 31 '18 at 06:40

0 Answers0