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.