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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sciomac
Frequent Visitor

Unable to refresh Power BI from Azure Virtual Machine connected to an on-premises SQL database

Hello,

I am developing a report for a customer. The source is a on-premises SQL Database. The customer gave me credentials and open the SQL Database just for my Static IP. From my computer or any other physical computer through my VPN works fine. 

 

The customer doesn't want to install a Gateway, so as alternative, I thought using a Azure Virtual Server that I can automatically start and stop once a day just for the update of the report.

 

This Azure VM is connected with a  OpenVPN Client to my VPN. So it's the same static IP.

 

When I open the report in the VM and go to Power Query, all the queries against the SQL Database work fine but the ones that have some Merge  step. It breaks when the merge is expanded:

 

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)
Details:
DataSourceKind=SQL
DataSourcePath=app.xxxxxxxxx.com;RxxxxxPxxx
Message=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)
ErrorCode=-2146232060
Number=53
Class=20

 

 

 

Any idea how to solve it?

 

Thank you for your help.

 

Miguel

2 REPLIES 2
jaideepnema
Solution Sage
Solution Sage

Hi @sciomac ,

Are you merging tables from two separate databases from two separate servers ? or its only a single server having a single DB Instance ?

Hi @jaideepnema 

 

I am not an expert in SQL but here it is the source of both queries:

 

QUERY1
Source = Sql.Databases("app.sciomac.com"),
SciomacProd = Source{[Name="SciomacProd"]}[Data],
dbo_Calls = SciomacProd{[Schema="dbo",Item="Calls"]}[Data]

QUERY2
Source = Sql.Databases("app.sciomac.com"),
SciomacProd = Source{[Name="SciomacProd"]}[Data],
dbo_Videos = SciomacProd{[Schema="dbo",Item="Videos"]}[Data],

 

Thank you

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors