Data Factory, copy from On-prem SQL to Azure SQL - SqlFailedToConnect to Azure SQL

Brian Refshauge 1 Reputation point
2022-02-24T08:34:32.21+00:00

Hi.

We have an issue where we get below error. I believe we have set up things correctly but maybe not. Testing connection is successfull and we have added the IP of the on-prem server to the firewall of the Azure SQL Server.

We have validated server, database and user id - all correct.

ERROR:
Operation on target Copy_9wg failed: ErrorCode=SqlFailedToConnect,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot connect to SQL Database: '[OUR AZURE SQL SERVER].database.windows.net', Database: '[OUR DATABASE]', User: '[OUR 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=,'

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

1 answer

Sort by: Most helpful
  1. Nandan Hegde 32,421 Reputation points MVP
    2022-02-26T04:33:53.437+00:00

    Hey,
    Based on my understanding it seems the server on which the self hosted IR is set up is unable to access the azure sql database.
    In case of a copy activity, it is a necessary scenario that in case if either your source or sink is leveraging a self IR, the self IR should be able to access both source and sink.

    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.