none
Unable to connect SQL Azure RRS feed

  • Question

  • I just got the invitation code this morning and I've got hte SQL Azure server and master database setup.
    But, I'm not able to connect to the database using SQL Server management studion. Firewall has port 1433 enabled in my machine.
    Any pointers?
    Thursday, August 27, 2009 10:01 PM

Answers

All replies

  • Hi,

    Try the following steps to connect using SSMS:

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

    If this doesn't work, can you try sqlcmd:
    sqlcmd  -S serverName.ctp.databae.windows.net -U userID@serverName -P password

    Stan
    Program Manager, SQL Azure
    Friday, August 28, 2009 12:38 AM
  • I have tried both the options, but the results are same.
    Here is the output when I tried using sqlcmd.

    HResult 0x35, Level 16, State 1
    Named Pipes Provider: Could not open a connection to SQL Server [53].
    Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
    shing a connection to the server. When connecting to SQL Server 2005, this failu
    re may be caused by the fact that under the default settings SQL Server does not
     allow remote connections..
    Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
    Friday, August 28, 2009 1:13 AM
  • Both methods work for me.  For sqlcmd the user id needs to be followed by the server name.  But note that the server name is only the first segment for the user id.  Skip the ctp.database.windows.net part and it should work fine.

    Jerry
    Friday, August 28, 2009 3:18 AM
  • Looks like you are using named pipes.  Try prefixing servername with tcp:
    sqlcmd  -S tcp:serverName.ctp.databae.windows.net -U userID@serverName -P password


    Program Manager, SQL Azure
    Friday, August 28, 2009 4:31 AM
  • Thanks for all the replies. It was corporate policy blocking the connection. It's working from a datacenter network.

    -Mujir
    Monday, August 31, 2009 7:37 PM
  • Hi,

    Even I am having the same problem. I have tried to connect to SQL Azure using sqlcmd, yet get the same error. I have tried connecting using two different internet connections on my laptop, yet no luck.

    Any help would be greatly appreciated....

    Thanks.

    >sqlcmd -S tcp:ServerName.ctp.database.windows.net -U myUserName@ServerName -P myPassword 

    HResult 0x2AF9, Level 16, State 1 TCP Provider: No such host is known.

    Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in stance-specific error has occurred while establishing a connection to SQL Server . Server is not found or not accessible. Check if instance name is correct and i f SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.
    Wednesday, September 30, 2009 11:43 AM
  • I too have the very same issue as AnujSM as in identical error message from sqlcmd.  Additional details...

    • From the SQL Azure portal I can connect and create a database.
    • It has been approximately one day since I established by SQL Azure account.  How long does it take to get the DNS active?
    • Should I be able to "ping [server].ctp.database.windows.net"?  I cannot.
    Wednesday, September 30, 2009 5:55 PM
  • Hi bju1,

    Ping will not work.
    You can try this alternate method,
    Open SQL Server Management Studio:
     1 . cancel the initial database connection window.
     2. click "New Query' and this will open a connection dialog. 
                  Set Server name - ServerName.ctp.database.windows.net, Authentication - SQL Server Authentication, Login - just the username 

    If you still face the same error, then it could be your network firewall policy that is blocking connection on port 1433.

    • Proposed as answer by Brad U Thursday, October 1, 2009 4:12 PM
    Wednesday, September 30, 2009 10:10 PM
  • Thanks MujirH,
    Turns out it was network firewall policy.  For me, installing ISA firewall client fixed it.
    Thursday, October 1, 2009 4:14 PM
  • I am really frustrated with SQL Azure. I have tried all the things mentioned in the earlier posts.
    I still cannot connect to SQL Azure. I am not behind a corporate firewall. I have tried connecting using
    two different internet connections, that too from home.

    I tried connecting using the new SQL Azure Explorer Add in for Visual Studio 2010 Beta, yet no luck.
    I guess I will have to just give up...

    It is quite a pity that such a simple act of establishing connection to the service should be such a pain...
    Saturday, October 3, 2009 8:10 AM
  • I understand your frustration. Connection being the first thing should be made painless.

    May be this article will help you. It shows you step by step making a connection and testing. Try it.

    http://hodentek.blogspot.com/2009/10/migrating-table-from-sql-server-2008-to.html

    The first three or four screen shots shows you clearly how it is done. If it does not work, it could be for a different reason.



    mysorian
    Thursday, October 8, 2009 2:43 AM