Azure Data Factory Copy From SQL On premise to Azure Postgres?

Klaus Nørregaard 6 Reputation points
2023-03-23T08:45:16.6066667+00:00

Hi

I am trying to do a simple copy actitivity in Azure Data Factory Data Pipelines.

User's image

The source is a SQL On premise database. I can preview data fine.

The Sink is a Azure Postgresql Cluster. The test connection returns with success.

When I try to execute the pipeline it returns an error:
'Type=System.Net.Sockets.SocketException,Message=No connection could be made because the target machine actively refused it,Source=Npgsql,'

If I change the Source to a CSV file everything works fine. I would prefer not to stage the data as files in Storage Lake if possible.

Why do I get this error?

Thanks in advance

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

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2023-03-24T12:27:45.1733333+00:00

    Hi Klaus Nørregaard,

    Thank you for posting query in Microsoft Q&A Platform.

    Please note, if your source linked service uses Self hosted IR and Sink linked service uses different IR, then when you perform copy task, then both source and sink linked services uses selfhosted IRs and if your self hosted IR is not able to access your Sink then it results in error. Click here to know more.

    So, kindly make sure your Selfhosted IR can access your sink database too. Make sure if any firewall settings needs to be enabled for this.

    Hope this helps. Please let me know how it goes.


    Please consider hitting Accept Answer button. Accepted answers help community as well.