Connecting to Azure Linux VM SQL server through ADF

Madhavi Kareddy 0 Reputation points
2023-09-19T14:14:58.1933333+00:00

Hi,

I've Azure Linux Virtual Machine with MS-SQL server installed. I would like to access this sql server through ADF to read and write data. Could you help me on this since i couldn't install self-hosted integration runtime on linux vm.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,698 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,599 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 23,566 Reputation points
    2023-09-19T15:48:51.5533333+00:00

    First you need to ensure that your Azure SQL Server instance on the Linux VM allows traffic from Azure services. This is typically controlled by Network Security Group (NSG) rules and firewalls.

    Then for SQL Server Configuration, ensure that it is configured to allow TCP/IP connections and it is listening on the correct port, typically 1433 for default installations.

    When it comes to connectivity, in the ADF Copy Data tool or your specific pipeline. First, select the source as SQL Server. Then enter the fully qualified domain name (FQDN) of the VM (exple mylinuxvm.westus.cloudapp.azure.com) in the Server field. Don't forget to input the SQL Server's username and password. You need to specify the database name and then test the connection.

    A more secure way to allow ADF to access resources in a VNet is to use Private Link which will setup a Managed Private Endpoint in your Data Factory. By setting this up, ADF can securely and privately access the SQL Server on the VM without requiring the VM's SQL Server to be exposed to the public internet. This will also eliminate the need for Self-hosted IR.

    a. Navigate to your Azure Data Factory instance in the Azure portal

    b. In the left menu, under the 'Security + networking' section, click on 'Managed private endpoints'

    c. Click on 'New'

    d. Follow the prompts to create a new private endpoint for the SQL Server. Ensure you target the correct resource type and resource.

    Once the private endpoint is approved and connected, use the private endpoint as the server name in your ADF pipeline.

    Since you can't install a self-hosted integration runtime on the Linux VM, you can use another Windows machine either on-prem or on Azure. Once you install the self-hosted integration runtime on this machine, make sure it has network access to your SQL Server on the Linux VM. Then, configure ADF to use this IR to connect to your SQL Server.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.