Share via

Looking for ADF to connect on-prem SQL server. Need help or suggestions

Althaf Hussain Shaik 0 Reputation points
2026-04-01T15:30:40.43+00:00

Hello Cloud Gurus, I have a required in setting up the On-prem SQL server connectivity through ADF for the DB migration project.

Please share as i am looking for the instructions on the pre-requisites to setup on this and a detailed notes if any.

Do I really require the acesss on the on-prem server. if yes what permissions is it a local db admin user or a domain user with full permissions.?

I would really appreciate if anybody can share some suggestion, as i already tried doing so with the vendor, he is unable to set up and ending up with the below error.

==================================================================

Error Code: SqlFailedToConnect

Cannot connect to SQL Database. Please contact SQL Server team for further Support. Server: XXXXX.1421, Database: 'xxxxxx', User: 'sa'. Check the linked service configuration is correct. and make sure the SQL Database firewall allows the integration runtime to access.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The Server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - TCP Provider: )

=================================================================

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


2 answers

Sort by: Most helpful
  1. Nandan Hegde 36,796 Reputation points MVP Volunteer Moderator
    2026-04-02T04:42:50.04+00:00

    In order to access your On prem database from ADF, you would need to use a Self hosted IR.
    For that you need to have a server within your on prem network which is able to communicate with the On prem SQL server and install the Integration run time within that server which would act as a bridge between the On Prem database and ADF.

    https://learn.microsoft.com/en-us/azure/data-factory/create-self-hosted-integration-runtime?tabs=data-factory

    Assuming you just want to read the data from the on Prem SQL database, you can either create a SQL account with just read only access on the On Prem database and leverage SQL authentication or use a service account with read only access on the database and use windows auth (no need of admin/owner access)

    0 comments No comments

  2. Q&A Assist
    2026-04-01T15:31:11.08+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    For Azure Data Factory to connect to an on-premises SQL Server for migration, the following areas must be in place: network connectivity, SQL Server configuration, firewall rules, and correct linked service configuration.

    1. Network and runtime prerequisites
    • Use either:
      • A self-hosted Integration Runtime (SHIR) installed on a machine that can reach the on-prem SQL Server, or
      • A Managed VNet Data Factory with private connectivity to on-prem (for example, via VPN/ExpressRoute and private endpoint) as shown in the managed VNet tutorial.
    • Ensure the network path from the runtime host to SQL Server works (ping or name resolution, and port reachability).
    1. SQL Server configuration on-premises Follow the standard remote-connectivity requirements:
    2. In SQL Server Management Studio, on the on-prem instance:
      • Right-click the server → Properties → Connections → enable Allow remote connections to this server.
    3. In SQL Server Configuration Manager:
      • Under SQL Server Network Configuration → Protocols for <instance>:
        • Enable TCP/IP.
    4. In TCP/IP Properties:
      • On the IP Addresses tab, in IPAll, confirm the TCP Port (default 1433). Note this port.
    5. On the Windows Firewall of the SQL Server machine:
      • Create an inbound rule to allow TCP traffic on that SQL port.
    6. Verify connectivity from another machine (ideally the SHIR host or a test machine on the same network) using SSMS with the FQDN and port, for example:
      • server.domain.corp.company.com,1433

    If these are not configured, the error A network-related or instance-specific error occurred while establishing a connection to SQL Server and Server was not found or was not accessible is expected.

    1. Data Factory with Managed VNet / private endpoint (if used) If using Managed VNet and private endpoint to reach on-prem SQL Server:
    2. Ensure prerequisites are met:
      • Azure subscription.
      • Virtual Network.
      • Connectivity between the VNet and on-prem network (VPN or ExpressRoute) or a private link setup.
      • Data Factory with Managed VNet enabled.
    3. In the tutorial scenario, when using a NAT VM and multiple SQL Servers/ports, explicitly include the port in the linked service server name (for example, server.domain.corp.company.com,1433). If the port is not specified, connections can time out.
    4. For troubleshooting, from the backend server VM, confirm:
      • telnet <FQDN> 1433 succeeds.
    5. Linked service configuration in ADF
    6. In the ADF UI:
      • Go to Manage → Linked services → + New → SQL Server.
      • Enable Interactive Authoring if using Managed VNet.
      • Enter the FQDN of the on-prem SQL Server and, if needed, append the port (for example, servername.domain.com,1433).
      • Provide the database name (optional) and credentials.
    7. Test the connection from the linked service blade.
      • If there are multiple SQL Servers or custom ports, ensure the correct port is explicitly specified; otherwise, the connection can time out.
    8. Authentication and permissions
    • The error shown (SqlFailedToConnect with network-related error) indicates a connectivity issue, not a permission issue.
    • For connectivity testing and migration, a SQL login with sufficient rights on the source database is required (for example, db_owner on the databases to be migrated). Using sa is technically sufficient but not required; a dedicated SQL login with appropriate rights is recommended.
    • Domain vs local account:
      • For SQL authentication (like sa), domain membership is not required.
      • Domain accounts are relevant if using Windows authentication from SSIS or Azure-SSIS IR joined to a VNet. In that case, ensure:
        • The Azure-SSIS IR is joined to a VNet that can reach the on-prem SQL Server.
        • TCP/IP is enabled and firewall allows access.
    1. Specific checks for the current error Given the error message:
    • Confirm the SQL Server instance is running and listening on the expected port.
    • Confirm TCP/IP is enabled on the instance.
    • Confirm the firewall on the SQL Server host allows inbound TCP on that port.
    • Confirm the SHIR host or Managed VNet environment can resolve the server name and reach the port (telnet test).
    • Confirm the linked service uses the correct server name and port.

    Once these are correct, the SqlFailedToConnect and network-related errors should be resolved, and authentication/permissions can then be addressed if any login failures appear.


    References:

    0 comments No comments

Your answer

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