DataFactory Copy Activity Error

Joel Prescilla 46 Reputation points
2021-09-17T01:54:57.03+00:00

Hi,
I am facing the below issue in Data Factory:

ErrorCode=SqlFailedToConnect,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot connect to SQL Database: '[servername]', Database: '[dbname]', User: '[username]'. 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=Cannot open server '[server]' requested by the login. Client is not allowed to access the server.,Source=.Net SqlClient Data Provider,SqlErrorNumber=40914,Class=14,ErrorCode=-2146232060,State=1,Errors=[{Class=14,Number=40914,State=1,Message=Cannot open server '[server]' requested by the login. Client is not allowed to access the server.,},],'*

The weird thing is the linked service test connection is a success.... some activity like lookup via a stored proc is working as well, and can preview data... but when running the pipeline I get the above error during the Copy Activity only.

I have added all possible IP address in my region in the whitelist and still not successful.

Also, when I switch on "Allow Azure services and resources to access this server", it works.... Obviously, I still prefer IP whitelisting but not sure what is happening. Thanks

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,487 questions
0 comments No comments
{count} votes

Accepted answer
  1. Nandan Hegde 29,886 Reputation points MVP
    2021-09-17T03:06:20.633+00:00

    Hey,
    Based on the above scenario , My assumption is either your source or sink in copy activity is leveraging an integration run time.
    In that scenario , the server on which the IR is set up should be able to access both the source and the sink.

    So login to the IR server and try accessing both source and sink from it and accordingly take the appropriate steps of whitelisting or opening ports.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Joel Prescilla 46 Reputation points
    2021-09-17T03:17:00.563+00:00

    Hi.. Thank you for the response...

    My setup is source is SQL Server via SHIR, and sink is Azure DB SQL using Azure IR. So you want me to check the SHIR server, then grab the IP, and add that to the whitelist?