Ask a questionAsk a question
 

Answerissue in connecting sql azure database

  • Monday, November 02, 2009 4:26 PMbhattpinal Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    i have sql azure account and i am able to create and drop database from web interface, but i am not able to connect to database by any method. I tried with Management Studio and SQLCMD.

    With Managaement studio i am getting following error:

    Cannot connect to xj52nj1vaf.database.windows.net .

    ------------------------------
    ADDITIONAL INFORMATION:

    Cannot open server 'xj52nj1vaf' requested by the login. Client with IP address '38.105.214.33' is not allowed to access the server.
    Login failed for user 'pinalbhatt'. (Microsoft SQL Server, Error: 40615)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=40615&LinkId=20476

Answers

  • Monday, November 02, 2009 4:55 PMbhattpinal Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Got it... after more googling i could find solution for myself. The  new Firewall Feature was the culprit.


    Using the portal just click on the Firewall Settings tab.  From there you can either check the box to Allow Microsoft Services access to this server which will enable all Windows Azure Web and Worker Roles to access your server.   

    imageAdditionally, you can click the Add Record button and add your current IP address which is shown in the dialog box.

    These updated rules may take up to 5 minutes for the change to take affect so please be patient.

    • Marked As Answer bybhattpinal Monday, November 02, 2009 4:56 PM
    •  

All Replies

  • Monday, November 02, 2009 4:36 PMbhattpinal Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I get similar error with following  sqlcmd
    sqlcmd -S tcp:xj52nj1vaf.database.windows.net -U pinalbhatt@xj52nj1vaf -P xxx -d AppDb
  • Monday, November 02, 2009 4:55 PMbhattpinal Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Got it... after more googling i could find solution for myself. The  new Firewall Feature was the culprit.


    Using the portal just click on the Firewall Settings tab.  From there you can either check the box to Allow Microsoft Services access to this server which will enable all Windows Azure Web and Worker Roles to access your server.   

    imageAdditionally, you can click the Add Record button and add your current IP address which is shown in the dialog box.

    These updated rules may take up to 5 minutes for the change to take affect so please be patient.

    • Marked As Answer bybhattpinal Monday, November 02, 2009 4:56 PM
    •