none
Can't connect to Sql Azure Server from local Management Studio

    Question

  • 1. I'm a total newbie. (Just setup my first Windows Azure, Sql Azure Server from my home system tonight). I'm surely doing something dumb.

    2. When I setup the server I was asked for  "Firewall Rules". It told me my current IP address and, right or wrong, I used that as the IP range Start and End. That address is not the same address shown when I type IPCONFIG in a DOS box on my local machine.

    3. From the Management Portal I was able to setup a table in the database.

    4. When I started Management Studio from my local box, typed the

    Server name "myServername.database.windows.net", used the SQL Admin user and

    password for the server, then tried to connect, I got the famous "Can't connect to..... A network-related or instance-specific error occurrred while establishing....."

    Question: Any ideas why I can't connect to the Sql Azure server?  Or how to diagnose the problem? (e.g. I can't ping the SQL Azure server name from my local box. Don't know if I am suposed to be able to)

    TIA,

    Barkingdog

    Tuesday, February 14, 2012 6:15 AM

Answers

  • You should see something like this:

    And regarding, security risks: The rule of thumb is that more ports you open - the less secure you are. I personally have not researched the security risks of opening 1433 - so may be someone else could answer that..

    btw, i found this article : Securing your network with firewalls and ports that should get you started and if you have further questions, you could also consider asking that on security forum - becasue those guys obviously know a lot more about that domain.


    Paras Doshi (Blog: ParasDoshi.com | Twitter: @Paras_Doshi )



    • Edited by Paras DoshiModerator Thursday, February 16, 2012 12:53 AM
    • Marked as answer by edm2 Friday, February 17, 2012 6:24 AM
    Thursday, February 16, 2012 12:52 AM
    Moderator

All replies

  • Use this resoruce:

    SQL Azure Connectivity Troubleshooting Guide

    And follow up if you have any issue..

    Also, I hope you are locally using SQL Server management studio (SSMS) 2008 R2 or better..


    Paras Doshi (Blog: ParasDoshi.com | Twitter: @Paras_Doshi )


    Tuesday, February 14, 2012 6:34 AM
    Moderator
  • HI,

    Please ensure that you have configured your environment to allow outbound TCP connections over port TCP/1433 to enable applications and tools to connect to SQL Azure. For more details, check out the section 'Configuring the Client-side Firewall' at the url: http://social.technet.microsoft.com/wiki/contents/articles/sql-azure-firewall.aspx 

    I hope this helps!!


    If you found this post useful, Please "Mark as Answer" or "Vote as Helpful". Thanks! Vaibhav Gujral.

    Tuesday, February 14, 2012 7:49 AM
  • Paras,

    Regarding "Also, I hope you are locally using SQL Server management studio (SSMS) 2008 R2 or better.."

    I believe I am using using Sql 2008 (not the R2 version). Is there an issue\problem with that?

    Barkingdog

    Tuesday, February 14, 2012 7:51 AM
  • Hi,

    When using SQL Server 2008 for connecting to SQL Azure, there is a known issue. But, in that case, you dont get the error you have mentioned in your post. I believe you are missing the firewall settings in your local machine. 

    Please ensure that you have configured your environment to allow outbound TCP connections over port TCP/1433 to enable applications and tools to connect to SQL Azure. For more details, check out the section 'Configuring the Client-side Firewall' at the url: http://social.technet.microsoft.com/wiki/contents/articles/sql-azure-firewall.aspx 

    Once you are done with the local firewall settings, you can try connecting SQL Azure via SQL Server 2008 with the following steps:

    1. cancel out of the first connection dialog that pops up.
    2. click on the New Query button from the toolbar (upper left)
    3. enter the following details:
           Server name: full servername
           Login: just the username (no @...)
    4. Under Options, Connect to Database, use Master
    5. Hit connect.

    I hope this helps!!


    If you found this post useful, Please "Mark as Answer" or "Vote as Helpful". Thanks! Vaibhav Gujral.


    Tuesday, February 14, 2012 8:02 AM
  • Hello.

    Adding to what other said i can say that in my situation i can't connect to SQL Azure because of hardware router in my organization. Try do it from other place.

    Tuesday, February 14, 2012 3:50 PM
  • I checked and found I couldn't telnet to 65.55.74.143 1433 so it looks like we need to allow outbound TCP connections on that port.

    1. What is the IP address  (65.55.74.143) the address of ? 

    2. On my Windows AzurePlatform main page, Firewall rules, I entered the externally known IP address (http://www.whatsmyip.org/)  of my Win 7 box. Is that the correct addressto have entered?

    TIA,

    Barkingdog

    Wednesday, February 15, 2012 9:13 PM
  • Yes, you need to allow outbound access on 1433. And your IP would be visible in one of the wizard in SQL azure firewall rules wizard. And whatismyip and ipchicken websites should also give you that info. But I go with ip address made available in SQL azure firewall rules wizard.

    Paras Doshi (Blog: ParasDoshi.com | Twitter: @Paras_Doshi )

    Wednesday, February 15, 2012 9:34 PM
    Moderator
  • So after outbound access on 1433 is allowed the "SQL Azure Firewall Rules" Wizard should see (most likely) my external address.

    I just spoke to the LAN manager and he wonders if opening 1433, outbound, could pose any security risks.  (I don't see them.) Your thoughts on this one?

    Barkingdog

    Wednesday, February 15, 2012 9:58 PM
  • You should see something like this:

    And regarding, security risks: The rule of thumb is that more ports you open - the less secure you are. I personally have not researched the security risks of opening 1433 - so may be someone else could answer that..

    btw, i found this article : Securing your network with firewalls and ports that should get you started and if you have further questions, you could also consider asking that on security forum - becasue those guys obviously know a lot more about that domain.


    Paras Doshi (Blog: ParasDoshi.com | Twitter: @Paras_Doshi )



    • Edited by Paras DoshiModerator Thursday, February 16, 2012 12:53 AM
    • Marked as answer by edm2 Friday, February 17, 2012 6:24 AM
    Thursday, February 16, 2012 12:52 AM
    Moderator