简体   繁体   中英

Unable to insert data into Azure SQL Database from On-premises SQL Database in Azure data factory pipeline

Scenarios:

  1. I have to move data from an on-premise SQL Server database to Azure SQL database using Azure Data Factory pipeline.

  2. I have created a self-hosted linked service for on-premises database and provided managed identity access to Azure SQL database for the ADF account.

  3. Linked Service Configuration:

     IR Configuration: Azure Managed Virtual Run time. I tried with both SQL Authentication type and System assigned managed identity.
  4. Test Connection is giving successful and we are able to do select operation individually by Azure SQL Server

  5. Getting below error while doing insert when running the pipeline.

Error:

ErrorCode=SqlFailedToConnect,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot connect to SQL Database: ' ', 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=Cannot open server " " requested by the login. The login failed.,Source=.Net SqlClient Data Provider,SqlErrorNumber=40532,Class=14,ErrorCode=-2146232060,State=1,Errors=[{Class=14,Number=40532,State=1,Message=Cannot open server "*****" requested by the login. The login failed.,},],'

In copy activity, in case if either the source or the sink is leveraging an IR, than it is expected that both the source and sink should be accessible from the server containing the IR.

So to debug : please login into the Server hosting the IR and check whether you are able to access the Azure DB from that server. If not than please whietlist the IP and make the necessary port updates

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM