Aishwarya Shiva
Aishwarya Shiva

Reputation: 3416

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.

Upvotes: -1

Views: 4058

Answers (3)

vinnyjames
vinnyjames

Reputation: 2068

I was not able to connect until I changed the IPAll TCP Port. Previously I had set it for the LAN ip and 127.0.0.1

enter image description here

Upvotes: 0

Aishwarya Shiva
Aishwarya Shiva

Reputation: 3416

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.

Upvotes: 1

Nathan Dobie
Nathan Dobie

Reputation: 71

I've had the same problem since my work computer is attached to a large network where computers cannot see one another. The strangest part about this is I can see other computers in my building in windows explorer.

Anyway, the stuff I've done is try UTP, which is port 1434; set up SQL login credentials; Restarting the service after changing the port settings (It's important); The very bottom of the page you have screenshotted contains a generic TCP dynamic port and TCP Port setting, I've changed those. In SSMS right click on a database and say "allow remote connections." here you can also set the timeout and such

What's really weird to me is that another computer can see the database, but cannot connect.

If you've tried all that I've tried as above then you're at the same place I am. I am also using SQL-2012, but on windows 7 enterprise. I'd test some more things but I'm not at work. Also I would have just commented but I can't ):

Upvotes: 1

Related Questions