Problem with the connection to Azure SQL Database

Konrad Majcherczyk 1 Reputation point
2022-11-29T14:34:42.773+00:00

Hi, I am making a simple pipeline in Azure Data Factory. The source is an Oracle database hosted on VM (in ADF the connection to this database works properly. I used here a self-hosted Integration Runtime). The sink is an Azure SQL Database. In ADF the connection to Azure SQL Database also works properly (I used here Auto Resolve Integration Runtime.) The validation goes without errors. When I trigger the pipeline, it always fails with the message: "Cannot connect to SQL Database. Please contact SQL server team for further support."

I have enabled the option: "Allow azure services and resources to access this server".

The whole error:

Operation on target Copy data failed: ErrorCode=SqlFailedToConnect,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot connect to SQL Database. Please contact SQL server team for further support. Server: '----.database.windows.net', Database: '----', User: '----'. Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.),Source=.Net SqlClient Data Provider,SqlErrorNumber=10060,Class=20,ErrorCode=-2146232060,State=0,Errors=[{Class=20,Number=10060,State=0,Message=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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.),},],''Type=System.ComponentModel.Win32Exception,Message=A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond,Source=,'

Could you tell me what the reason of that is? Thank You in advance.

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,159 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Konrad Majcherczyk 1 Reputation point
    2022-11-30T11:51:51.84+00:00

    265657-azure-2.png

    settings

    0 comments No comments

  2. ShaikMaheer-MSFT 38,401 Reputation points Microsoft Employee
    2022-12-02T06:18:01.667+00:00

    Hi @Konrad Majcherczyk ,

    Thank you for posting query in Microsoft Q&A Platform.

    Changing Azure SQL linked service to use same selfhosted IR which you used for onprem and also changing firewall rules to allow selfhosted IR IP to access Azure SQL should solve this issue.

    Hope this helps. Please let me know if any further queries.

    -------------

    Please consider hitting Accept Answer button. Accepted answers help community as well.