BULK INSERT WITH Self hosted IR failing

Harish Sunderaraj 176 Reputation points
2020-09-04T15:31:35.147+00:00

Hi

With Azure ADF copy method BULKINSERT copy data to OnPrem sql server to Azure Synapse its failing with below error.

I verified the connection to azure synapse with : telnet <azure server name> 1433 its working.

Firewall is opened to connect *.database.windows.net

Same credentials working when used copy method Polybase used with BLOB staging area to same azure synapse.

Do you know why its failing when BULKINSERT used, is any other ports need to be opened

Error:

Operation on target cp_Load_SQLServer_to_Synapse failed: ErrorCode=SqlFailedToConnect,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot connect to SQL Database: 'Synapse-01.database.windows.net', Database: 'synapse-db', User: 'useracc'. 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.
9,662 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Evgeny Grishchenko 486 Reputation points
    2020-09-07T10:32:41.977+00:00

    In a COPY activity, there is source and destination, and both have datasets, which are using linked services.

    Could you please

    • check which integration runtimes are being used by those datasets?
    • do data preview for source and destination ?

    It could be that the selected integration runtime is a default one, which is hosted in Azure, and you do not have access from that runtime to your azure SQL Server.

    0 comments No comments

  2. HarithaMaddi-MSFT 10,136 Reputation points
    2020-09-09T07:30:22.047+00:00

    Hi anonymous userunderaraj-3480,

    Thanks for your patience! I discussed with Product team and please find below observations.

    • When using Polybase, there is no direct connection with Synapse in SHIR as there will be staging area before loading into Synapse.
    • Since you mentioned it worked when using SSMS, please confirm if the machine you tried from is the same used to setup SHIR. If issue is reproduced from SHIR host machine, please reach out to your network team for resolving this and if not, please share the pipeline run id that is successful when using SHIR Host machine to load the data.
    • Please try using "connection timeout" properties in Synapse Linked Service as shown in below snap

    23326-additionalconnectionparameters.png

    Hope this helps! Please let us know for further queries and we will be glad to assist.