Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Syndicate_Admin
Administrator
Administrator

How to connect external sql server in dataflow?

I would like to make a dataflow which retrieve data from external (No Azure) sql server and create records in dataverse. But I cannot connect the sql server and got error "An exception occurred: DataSource.Error: Microsoft SQL: 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"

 

How I tried is as follow:

 

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi 


Where is the SQL Server database located? If it is on an on-premises server/computer or in a VM, you need to configure an on-premises data gateway to query data from the database. An on-premises data gateway is used to connect your cloud services to on-premises data sources. 

What is an on-premises data gateway? - Power Apps | Microsoft Learn

Manage an on-premises data gateway in Power Apps - Power Apps | Microsoft Learn

 

In addition, the error message indicates that you cannot connect to the database server. You can use PowerShell Test-NetConnection command to test whether the server and port can be connected from your computer successfully. For example,

Test-NetConnection -ComputerName xx.xx.xx.xx -Port xx 

 

If you cannot connect to the server and port, you could refer to Lesson 2: Connecting from Another Computer - SQL Server | Microsoft Learn to check whether the database server allows the remote connection. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Hi @Syndicate_Admin 

 

I have tested as you said. It replies success.

 

TcpTestSucceeded : True

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors