LinqPad to AzureSQL (ActiveDirectory-Password authentication)

Hello,

I am successfully connecting to an Azure SQL instance every day and querying. I would like to leverage LinqPad Pro Edition (v5.31.00) for the same reason, but use an ObjectContext. However, I cannot connect to the Azure SQL no matter how I approach it with LinqPad. I am using SQL Azure as the Provider for the LINQ to SQL Connection, and Windows Auth (AD) for Log On details. I've tried using Advanced for a manually-specified connString, to no avail.

tcp:xxxxxxxx-sql.database.windows.net,1433

Is what I am doing possible yet in LinqPad?


Thank you,
Barry

Comments

  • I have been struggling with that as well. After trying a variety of combinations I was able to connect to Azure. Here is what I did, maybe it will prove to helpful to you as well:
    1) Add Connection
    2) I used the "Build Data context automatically" feature and selected "Default (LINQ to SQL)
    3) Provider: SQL Azure
    4) Server: address of Azure database (something like *****.database.windows.net where the ***** represents the name of the dbserver)
    5) Log on details: SQL Authentication - provide username and password
    6) Database: I chose to "Specify new or existing database" so I did not get other options that I was not going to use.
    7) Data Context Option: I left the defaults checked
    8) Remember this connection (so I don't have to do this again)
    9) I checked "Contains production data" which provides a pretty nice feature of adding a colored band to the left side of window where your write linq queries reminding you that you are using a production database.
    10) test: and this should connect.

    Hope this helps.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!