Unable To Connect On Prem SQL Server From Azure ADF

Akshay Goel 0 Reputation points
2024-04-09T08:05:18.8166667+00:00

Hi

We are trying to connect an on-prem sql server from our Azure ADF. There are firewalls involved. What are we missing . Please see the error :

"

Cannot connect to SQL Database. Please contact SQL server team for further support. Server: 'servertest.test.loc', Database: 'test_sirius', User: 'test\testdevsvc'. Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server), SqlErrorNumber=53,Class=20,State=0, The network path was not found

"

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
SQL Server Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Amira Bedhiafi 33,071 Reputation points Volunteer Moderator
    2024-04-09T13:59:28.7433333+00:00

    Here are several steps to troubleshoot your issue:

    • Ensure the configuration for the linked service is accurate. This includes verifying the server name, database name, and user credentials are correct.
    • Review the firewall settings in your Azure SQL Database. To allow access from the Azure Integration Runtime, navigate to the "Firewalls and virtual networks" section in the Azure portal for your SQL database.
    • Confirm that the Azure Integration Runtime can connect to the Azure SQL Database through a private endpoint. Use network diagnostic tools such as ping or traceroute to test the connectivity.
    • If you are using AAD for authentication, verify that the user account in use has the appropriate permissions for the Azure SQL Database.
    • Finally the Azure Integration Runtime logs for any additional error messages or details that might clarify the root cause of the problem.

    https://learn.microsoft.com/en-us/azure/private-link/tutorial-private-endpoint-sql-portal

    0 comments No comments

  2. Bhargava-MSFT 31,261 Reputation points Microsoft Employee Moderator
    2024-04-15T16:46:55.3666667+00:00

    Hello Akshay Goel,

    <In addition to Amira's answer>

    Please try to connect to the SQL Server via the SHIR UI’s diagnostic tab and see if you can be able to reproduce the connectivity issue.

    If the SHIR is behind a firewall, please work with your network admin so that it can communicate with the SQL Server.

    A similar issue was discussed on the below stack overflow thread:https://stackoverflow.com/questions/72215532/adf-sql-server-untrusted-domain

    Please let us know if you need any further help here.

    User's image

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.