Answered SQL Server Connectivity

  • Sunday, July 22, 2012 8:31 PM
     
     

    Hi,

    I am trying to connect to an instance of MS SQL server 2012. I can do it on the LAN here in the office - My client application connects with the server over the LAN, happily connects to the server, and happily views / manipulates the data on the server.

    Not so when I try to run my client on a machine outlside the LAN. When I try to 'get in' via the internet, connection fails.

    My LAN uses a router. My SQL server is on a machine on the LAN, that machine's IP address is not visible on the internet. Let us say that IP address is S.S.S.S.

    I have configured / verified the following so far:

    1. I can read the routers public IP address successfully. Let us say it is P.P.P.P.
    2. I know default TCP port number for SQL server is 1433.
    3. I have reconfigured the router to do port 1433 forwarding from IP address P.P.P.P to S.S.S.S.
    4. I have checked that TSQL Default TCP end point on the server exists and is running. I am ASSUMING that the endpoint expects port number 1433 (is this where I am wrong)?
    5. Using SQL Server Configuration tool I have enabled TCP protocol processing, and I have rebooted the machine.

    I then try to connect to the server using P.P.P.P:1433 (the rest of the connection string is the same as when I connect via the LAN), but my client does not connect. The error message says the sever can not be found.

    What am I missing? Any hint would be grately apreciated.

    Thanks in advance.

    Peter Battelino
    BTE Corporation


    PMBT

All Replies

  • Monday, July 23, 2012 2:36 PM
     
     
    Try to enable SQL Server Browser and allow connection on port UDP 1434.
  • Monday, July 23, 2012 2:55 PM
     
     

    Hi,

    Thank you for your response. Server browser is running - makes no difference. Besides, I am coming in on a TCP connection, so I am not sure what opening UDP port will do?

    Best regards,

    Peter Battelino
    BTE Corporation


    PMBT

  • Thursday, July 26, 2012 9:05 PM
     
     

    SQL Browser service use UDP port 1434. It not related with SQL server TCP port 1433. It will help system in locating SQL instance.

    Enable SQL Server Browser and allow connection on port UDP 1434 & try.


    Please click the Mark as Answer or Vote As Helpful if a post solves your problem or is helpful!

  • Thursday, July 26, 2012 9:24 PM
     
     

    Hi,

    Thank you for your help. Did that, but did not help. I have also tried a dozen other things posted elsewhere on the internet, to no avail. I am runningout of ideas.

    I am running SQL Server 2012 on a Windows 7 Pro OS, I am using Verizon FIOS router for testing. I have set up TCP port 1433 forwarding in the router, as well as UPD port 1434 forwarding. I have TURNED OFF windows firewall, and I have UNINSTALLED my Norton Internet Security on this machine to make sure there are no hidden kinks. All to no avail.

    I have triple chacked that SQL Server has remote connections enabled. Both client and server machines are running TCP, I am forcing port 1433 at this point - no avail.

    I can see my router's public IP address (P.P.P.P). On the client side I have tried
    Data Source=P.P.P.P,1433, as well as P.P.P.P\InstanceName,1433 - no success. By the way, I am trying to access named instance of SQL Server 2012, developer edition. Could it be my router? I have read and re-read oodles of pages on that, but nothing works. Not sure what to do next. Any ideas would be very welcome.


    PMBT

  • Thursday, July 26, 2012 9:43 PM
     
     

    You are using named instance, normally (by default) named instance use dynamic port to run. Have you change it back to static port 1433 ?

    Please check belwo 3 things more :-

    • Check the current port on which SQL server is runing
    • Network conenctivity between database & applicaiton servers by TRACERT command
    • Check telent connectivity - telnet <IPadress> <portno on sql server runing>

    Please click the Mark as Answer or Vote As Helpful if a post solves your problem or is helpful!



  • Thursday, July 26, 2012 10:10 PM
    Moderator
     
     
    Would you please share the exact connection failure message.

    Regards,
    Ahmed Ibrahim
    SQL Server Setup Team
    My Blog
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you.
    This can be beneficial to other community members reading the thread.

  • Monday, July 30, 2012 2:34 PM
     
     

    Hi,

    Thank you for all your responses. Turns out it is my Verizon FIOS router. I have tried the same exercise somewhere else, where there is no router, server's actual IP address is machine's public address - and it works, I can connect to the server just fine.

    The darn thing ate a lot of time that I don't have... Sorry for bothering you all, and thanks again for all the feedback.

    I am giving back on the Verizon Actiontec router. Does anybody know if this is just a bad unit, or does Verizon actively block port forwarding to SQL servers? The router does have tools for port forwarding mapping, however it does not seem to work??

    Peter Battelino
    BTE Corporation


    PMBT

  • Monday, July 30, 2012 3:47 PM
    Moderator
     
     Answered

    Hello,

    Try calling Verizon Support and ask them about possible firmware updates for that router.

    The following resources may help:

    http://forums.verizon.com/t5/FiOS-Internet/Verizon-FIOS-Actiontec-MI424-WR-Port-Forwarding-Problem/m-p/225232#M14668  

    http://forums.verizon.com/t5/FiOS-Internet/Port-forwarding/td-p/79268

    Hope this helps.

    Regards,

    Alberto Morillo
    SQLCoffee.com