Forum Discussion

icon2023's avatar
icon2023
New Member
2 years ago
Solved

Powershell can't connect to Azure SQL when running Data Factory pipeline

I want to restore a database in Azure SQL using a PowerShell script in Data Factory. For this I have created a pipeline in Data Factory with a Custom Activity. I am connecting to a Batch account and ...
  • NandanHegde's avatar
    2 years ago

    Hey,

    since you are using powershell script to access the Azure SQL database and powershell is being executed within Azure batch, it is the Azure batch that needs to have access on the Azure SQL database and not the ADF.

    There is not even the need to create a linked service to Azure SQL DB from ADF as ADF is just there to trigger the Azure batch,

     

    Also for ADF reletaed queries, plz use the below MSFT forum :

    https://learn.microsoft.com/en-us/answers/tags/194/azure-data-factory?source=docs