Rob Bowman
Rob Bowman

Reputation: 8741

Data Factory - Cannot connect to SQL Database only when triggered from Blob

Also on the Microsoft Docs site here

I have a data factory pipeline that should use a Copy Data activity to insert rows from a CSV file of a blob into Azure Sql.

enter image description here

enter image description here

enter image description here

If I run the pipeline by clicking the "Debug" button in the designer window then it all works great. However, if I trigger the pipeline by copying the sample CSV to the blob container then I get the following 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

I have checked that the target sql server database has the option checked to "Allow Azure services and resources to access this server".

Any ideas gratefully received!

Upvotes: 0

Views: 3800

Answers (1)

Rob Bowman
Rob Bowman

Reputation: 8741

Problem was I was missing a connection string value from the "Override template parameters" section of the release pipeline.

enter image description here

This meant that after deployment, the linked service did not have a connection string.

The key to Understanding this was learning of the "Switch to live mode" button from the data factory pipeline editor view:

enter image description here

After clicking this, I was able to browse the status of the linked service as were - rather than as per "development" mode.

Upvotes: 0

Related Questions