0

i am using Sql Server 2012 and i am trying to connect Sql using public ip. I read many post regarding this but none work so far.

What i have tried till now.

  • Foword Port through router

  • Allow Remote Connection In Sql

  • Configure Port in SQL Configuration Manager

  • Allow port in firewall also

Edit:

I can connect locally

Any help will be appreciated Thanks

King Max
  • 21
  • 1
  • 7
  • Connect through SSMS? What's the error message? – Aaron Dietz Sep 11 '17 at 20:52
  • A network-related or instance-specific erro occurred while establishing a connection to SQL Server – King Max Sep 11 '17 at 20:55
  • What version of SQL Server are you using (ie Sql Server Express or a Paid Version)? – Mark Kram Sep 11 '17 at 20:56
  • 1
    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) – Aaron Dietz Sep 11 '17 at 20:56
  • @Mark i am using sql express – King Max Sep 11 '17 at 21:11
  • @Aaron Thank you for the link but it doesn't help much – King Max Sep 11 '17 at 21:12
  • @KingMax The problem is... that question is such a close match to yours and has so many good answers that it is very unlikely for anyone to have anything more to add here. And there are so many other similar questions with great answers... It's simply a matter of trying them all. Your only other choice is to list out the exact steps you took to install, and the exact setup you have, and then maybe someone can give specific advice. – Aaron Dietz Sep 11 '17 at 21:33
  • @AaronDietz i already tried some of them before u gave this link. And now i tried all of them but none work – King Max Sep 11 '17 at 21:40
  • If none of them work then you should make sure your computer is turned on. Lets start with: can you connect locally? – Nick.Mc Sep 11 '17 at 23:12
  • @Nick.McDermaid yeah i can connect locally – King Max Sep 11 '17 at 23:24
  • Please edit your question and add this info. Now use this guide to work out what port the SQL Server is running on: https://www.mssqltips.com/sqlservertip/2495/identify-sql-server-tcp-ip-port-being-used/ Does it match the one you set in configuration manager, and does it match the one you opened in your firewall? What kind of network setup do you have? a computer and a router? Azure? AWS? How did you work out your public IP address? – Nick.Mc Sep 11 '17 at 23:43
  • What tool did you use to try and connect to the SQL Server? Can you add that and the exact error message to your question – Nick.Mc Sep 11 '17 at 23:44
  • @Nick.McDermaid I match my configuration with that link and that' same. I checked everything twice. the one port i open in firewall is same as I configured in manager. I a using computer and a router. I don't own any public ip address. its that temporary one which I can find through google. – King Max Sep 12 '17 at 12:32
  • @Nick.McDermaid I am using ssms directly . and this is the error ADDITIONAL INFORMATION: 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: TCP Provider, error: 0 - The wait operation timed out.) (Microsoft SQL Server, Error: 258) – King Max Sep 12 '17 at 12:40
  • What does " its that temporary one which I can find through google" mean? Is it the same as this one: http://whatsmyip.net/. So you've confirmed the port it runs on, you've opened that port in your router, you've confirmed your public IP. So first type `telnet localhost ` in a CMD window. Blank screen? Now type `telnet `. What do you get? It's possible that your ISP blocks this port. What about `tracert ` – Nick.Mc Sep 12 '17 at 23:02
  • @Nick.McDermaid Okay `telnet localhost ` giving me blank screen. and `telnet ` giving me error **Could not open connection to the host, on port 1433: connection failed** and `tracert ` giving this **Tracing route to over a maximum of 30 hops 1 4 ms 6 ms 5 ms Trace complete** – King Max Sep 13 '17 at 12:29
  • So for whatever reason the port is not open or hasn't been forwarded properly – Nick.Mc Sep 13 '17 at 12:42
  • @Nick.McDermaid btw I checked on this site [link](http://canyouseeme.org/) and it says "Your ISP is not blocking port 1433" – King Max Sep 13 '17 at 12:48
  • The second telnet says otherwise, although the telnet is going from your local computer to the internet and back to your computer. That implies the outgoing port is the issue, although that would be hard to believe. I suggest you turn off windows firewall altogether. Also maybe take a look in your router logs and see if there's anything in there. – Nick.Mc Sep 13 '17 at 13:55

0 Answers0