none
How to access a data in a local SQL Server instance usind U-SQL

    Question

  • Hello,

    I am trying to connect a local azure compute emulator with a local SQL Server instance using New-​Azure​Rm​Data​Lake​Analytics​Catalog​Credential, but everything I am trying results in a NullReferenceException. e.g.:

    PS C:\Users\...> New-AzureRmDataLakeAnalyticsCatalogCredential -AccountName "devstoreaccount1" -DatabaseName
     "testdb" -CredentialName "[WindowsAccount]" -Credential (Get-Credential) -DatabaseHost "localhost" -Port 1433

    Any Ideas?

    Thanks a lot.

    Enrico

    Thursday, June 1, 2017 2:19 PM

All replies

  • Hi Enrico,

    Could you share the full error details, without any secrets/passwords/sensitive info, please?

    It looks like you may be trying to submit a U-SQL script / ADLA job that accesses a locally-hosted SQL database. This is not currently supported, unfortunately. U-SQL scripts running in ADLA can only access SQL databases and SQL data warehouses running in Azure, for the time being.

    Could you share some more information about the action you're trying to perform? There may be another way to accomplish your goals, depending on what they are.

    Regards,

    Matthew

    Wednesday, June 14, 2017 10:35 PM
  • Enrico, If you are trying to create an external table referencing a local SQL Server, or run a federated U-SQL query that tries run against a SQL Server on your local PC, then these are not supported. See the destinations listed on https://msdn.microsoft.com/en-us/library/azure/mt763307.aspx.

    Also, the local run environment for testing U-SQL, if that is what you're using, does not let you access local SQL Server instances on the same box.

    Wednesday, June 14, 2017 10:36 PM