Search code examples
azure-sql-databaseazure-data-factory

New Linked Service (Azure SQL Database) Test connection failed


I'm creating New Linked Service that would allow connecting to PaaS DB but the Test Connection is failing. Things I've checked are:

-Firewall on Logical VM for PaaS DB(Relevant IP are in place)

-Connect to PaaS DB via SSMS(It Works)

-Typos

I've used AutoResolveIntegrationRuntime since DB is in the same RG as the Azure DataFactory. Google didn't help much.

Regards

PS: More info can be provided if needed.enter image description here


Solution

  • Firstly, make sure you have opened the "Allow access to Azure Service" in firewall setting. enter image description here

    What's your PSSA DB, single database or managed instance?

    For single database:

    The important thing you need to know that: enter image description here

    For managed instance:

    To use copy data from an Azure SQL Database Managed Instance that's located in a virtual network, set up a self-hosted integration runtime that can access the database. For more information, see Self-hosted integration runtime.

    If you provision your self-hosted integration runtime in the same virtual network as your managed instance, make sure that your integration runtime machine is in a different subnet than your managed instance. If you provision your self-hosted integration runtime in a different virtual network than your managed instance, you can use either a virtual network peering or virtual network to virtual network connection. For more information, see Connect your application to Azure SQL Database Managed Instance.

    Here an tutorial can helps you: Azure SQL Managed Instances and Azure Data Factory: a walk-through.

    Hope this helps.