Unable to refresh Power BI from Azure Virtual Machine connected to an on-premises SQL /PostgreSQL db

%3CLINGO-SUB%20id%3D%22lingo-sub-2289758%22%20slang%3D%22en-US%22%3EUnable%20to%20refresh%20Power%20BI%20from%20Azure%20Virtual%20Machine%20connected%20to%20an%20on-premises%20SQL%20%2FPostgreSQL%20db%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2289758%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20posted%20this%20issue%20in%20the%20Power%20BI%20community%20but%20to%20answer%20at%20all.%20I%20hope%20someone%20can%20give%20me%20some%20light.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20developing%20a%20report%20for%20a%20customer.%20The%20source%20is%20a%20on-premises%20SQL%20Database.%20The%20customer%20gave%20me%20credentials%20and%20open%20the%20SQL%20Database%20just%20for%20my%20Static%20IP.%20From%20my%20computer%20or%20any%20other%20physical%20computer%20through%20my%20VPN%20works%20fine.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20customer%20doesn't%20want%20to%20install%20a%20Gateway%2C%20so%20as%20alternative%2C%20I%20thought%20using%20a%20Azure%20Virtual%20Server%20that%20I%20can%20automatically%20start%20and%20stop%20once%20a%20day%20just%20for%20the%20update%20of%20the%20report.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20Azure%20VM%20is%20connected%20with%20a%26nbsp%3B%20OpenVPN%20Client%20to%20my%20VPN.%20So%20it's%20the%20same%20static%20IP%20(I've%20tested%20it).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20open%20the%20report%20in%20the%20VM%20and%20go%20to%20Power%20Query%2C%20all%20the%20queries%20against%20the%20SQL%20Database%20work%20fine%20but%20the%20ones%20that%20have%20some%20Merge%26nbsp%3B%20step.%20It%20breaks%20when%20the%20merge%20is%20expanded%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EDataSource.Error%3A%20Microsoft%20SQL%3A%20A%20network-related%20or%20instance-specific%20error%20occurred%20while%20establishing%20a%20connection%20to%20SQL%20Server.%20The%20server%20was%20not%20found%20or%20was%20not%20accessible.%20Verify%20that%20the%20instance%20name%20is%20correct%20and%20that%20SQL%20Server%20is%20configured%20to%20allow%20remote%20connections.%20(provider%3A%20Named%20Pipes%20Provider%2C%20error%3A%2040%20-%20Could%20not%20open%20a%20connection%20to%20SQL%20Server)%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EDetails%3A%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EDataSourceKind%3DSQL%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EDataSourcePath%3Dapp.sciomac.com%3BSciomacProd%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EMessage%3DA%20network-related%20or%20instance-specific%20error%20occurred%20while%20establishing%20a%20connection%20to%20SQL%20Server.%20The%20server%20was%20not%20found%20or%20was%20not%20accessible.%20Verify%20that%20the%20instance%20name%20is%20correct%20and%20that%20SQL%20Server%20is%20configured%20to%20allow%20remote%20connections.%20(provider%3A%20Named%20Pipes%20Provider%2C%20error%3A%2040%20-%20Could%20not%20open%20a%20connection%20to%20SQL%20Server)%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EErrorCode%3D-2146232060%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3ENumber%3D53%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EClass%3D20%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20source%20of%20the%20queries%20are%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EQUERY1%3C%2FEM%3E%3CBR%20%2F%3ESource%20%3D%20Sql.Databases(%22app.sciomac.com%22)%2C%3CBR%20%2F%3ESciomacProd%20%3D%20Source%7B%5BName%3D%22SciomacProd%22%5D%7D%5BData%5D%2C%3CBR%20%2F%3Edbo_Calls%20%3D%20SciomacProd%7B%5BSchema%3D%22dbo%22%2CItem%3D%22Calls%22%5D%7D%5BData%5D%3C%2FP%3E%3CP%3E%3CEM%3EQUERY2%3C%2FEM%3E%3CBR%20%2F%3ESource%20%3D%20Sql.Databases(%22app.sciomac.com%22)%2C%3CBR%20%2F%3ESciomacProd%20%3D%20Source%7B%5BName%3D%22SciomacProd%22%5D%7D%5BData%5D%2C%3CBR%20%2F%3Edbo_Videos%20%3D%20SciomacProd%7B%5BSchema%3D%22dbo%22%2CItem%3D%22Videos%22%5D%7D%5BData%5D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIndividually%20both%20queries%20connect%20to%20the%20SQL%20Database%20without%20any%20problem%2C%20but%20when%20I%20make%20a%20merge%20step%20the%20query%20breaks%20when%20expanded.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20the%20same%20issue%20if%20I%20tried%20to%20connect%20to%20a%20PostgreSQL%20db%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20idea%20how%20to%20solve%20it%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMiguel%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hello,

 

I posted this issue in the Power BI community but to answer at all. I hope someone can give me some light.

 

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 (I've tested it).

 

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.sciomac.com;SciomacProd
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

 

The source of the queries are:

 

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]

 

Individually both queries connect to the SQL Database without any problem, but when I make a merge step the query breaks when expanded.

 

I have the same issue if I tried to connect to a PostgreSQL db

 

 

Any idea how to solve it?

 

Thank you for your help.

 

Miguel

0 Replies