Search code examples
.netsql-serverdatabasesql-server-2012ssms

Unable to connect to SQL Server using IP address


I am unable to connect(using my ASP.NET web forms application or SSMS) to my database server that has a public IP. I am successfully connecting to that server using Remote Desktop Protocol but SSMS on my machine is unable to connect to that Server. I tried following things:

  1. Added an inbound firewall rule for port 1433.
  2. In SQL Server Configuration Manager I added my public IP address:

enter image description here

I don't know what to try next. Please tell me what else can cause this?

Also, sometimes SSMS shows that Network path not found or sometimes it shows Server didn't reponded in time.


Solution

  • Finally, I solved it myself. I don't know why but Firewall rule was not being applied. But then I found that my Google cloud console also provides an option to add Firewall rule. So, instead of adding the rule directly to Windows Firewall, I added it in Google Cloud Firewall settings. And it worked like a charm. Don't know why this solved my problem. It will be great if anyone can explain the reason.