none
Error trying to CREATE DATA SOURCE to AZURESQLDB - Exception Code: 40532 RRS feed

  • Question

  • I'm trying to create an external DATA SOURCE from my ADLA database to my Azure SQL server but am getting an exception:

    Severity    Code    Description    Project    File    Line    Suppression State
    Error    E_CSC_USER_DATASOURCECONNECTIONFAILURE    Failed to connect to data source: 'ds_AzureSQLDB_dhcommon', with error(s): 'E_COSMOS_USER_GENERIC: User Error: Sql command failed after 3 attempt(s). Exception Code: 40532 Original exception: Cannot open server "acme.com" requested by the login.  The login failed.
    **************

    (I've changed my actual domain above to a fictitious "acme.com" value above) I am first creating the ADLA Credential via PowerShell:


    As you can see /\ the Credential gets created.  I am using my own AAD credential (login) which is also a member of the AAD Security Group which is assigned as the (SQL) server Active Directory Admin.  I can make a connection to the SQL database.  I have also ensured that "Allow access to Azure services" is enabled on the SQL server Firewall rules.

    Oh, here is my U-SQL to create the DATA SOURCE which is throwing the exception:

    CREATE DATA SOURCE IF NOT EXISTS ds_AzureSQLDB_dhcommon
    FROM AZURESQLDB
    WITH
    (
        PROVIDER_STRING = "Database=dhcommon;Trusted_Connection=False;Encrypt=True",
        CREDENTIAL = AzureSQLDBCred,
        REMOTABLE_TYPES = (bool, byte, sbyte, short, ushort, int, uint, long, ulong, decimal, float, double, string, DateTime)
    );
    

    I'm at a loss, not having much luck in searching for that error code in the exception.

    Anyone?


    Bill Blakey

    Thursday, August 15, 2019 12:17 AM

All replies

  • Hello Bill , 

    We are reaching out to the internal team to get some help on this . 


    Thanks Himanshu

    Tuesday, August 20, 2019 4:56 PM
    Moderator
  • Can you please check if you are using the right port ? generally it should be 1433 ( by default) . 

    One more thing which worked for me ( though I was never able repro the issue)  execute the New-AzureRmDataLakeAnalyticsCatalogCredential and when the credential window pop's up , please pass in the user_id for a SQL user which have access to the DB with the password  , it worked for me . 


    Thanks Himanshu

    Tuesday, August 20, 2019 10:37 PM
    Moderator