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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
johnmelbourne
Helper V
Helper V

Connecting to SQL server offsite via on-prem gateway using Power BI desktop

Hi,

 

We have an external vendor that is hosting a SQL database which we need to connect to through Power Bi desktop. They have installed the on-premises gateway succesfully and from our Power BI service gateway settings menu (I have a pro account and am the admin) I am getting "Online: You are good to go.", which is great.

 

Now I need to connect to the database from Power BI desktop. I have a Pro account  I am having issues and not sure where the problem lies.

 

I have credentails of 

 

Username:  domain\username

Servername: UAT-SERVERNAME

Database: UAT-DBNAME

 

Can I connect from Power Bi desktop from external to the domain, into the external vendors domain from Power Bi desktop?

 

What comibination of credential should I use in these menus?

 

sdb.PNG

 

Should I use windows, database or Microsoft account?

 

sdb1.PNG

 

I am not sure what account to use, Windows, Database or Microsoft.

I am not sure what level to apply, servername, or servername;UAT-DBNAME

 

Does Power BI desktop connect to the database via the Power BI service, to the on-premises gateway then to the database. 

Or does Power Bi desktop connect via Power Bi desktoip to the external vendor gateway, then to the database?

 

In one combination of trying to connect I am getting the error 40, which has to do with opening communication ports. That is the error in power BI desktop, but the service is connected fine.  Do they perhaps have to open the appropriate ports so I can connect via power Bi desktop even though the Power BI service gateway appears online and ready to go?

 

Any assistance would be appreciated.

 

 

1 ACCEPTED SOLUTION

It would work to a point - you could only do very limited work in Power Query since you could not refresh the SQL data source at all.  You could still do the usual UI work and DAX etc.

 

It might be quicker if you set up your own SQL Server with some sample data and the same structure as the Vendor's server.  That way you can test the full cycle on the desktop, and only have to make sure to change the connection string when you hand it back over to the vendor or when you publish yourself. Might want to try using parameters on the service for that.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

I'm afraid that's not how this works.

 

Your third party vendor hosts an on-prem database in their network. They need the gateway to allow the Azure Service to access that database. This has nothing to do with your Power BI Desktop.

 

Most likely you access your vendor's network through a VPN. If so, then your connection from your Power BI Desktop to the vendor's database should be transparent as long as you are connected to the VPN.

 

One other option would be to host your database not at the vendor's network but in the public cloud (for example on Azure).  That would remove the need for a gateway, but obviously would come with some security concerns that you will want to address first.

Thanks @lbendlin 

 

I had an idea that might be the case. That I needed to be within their network to access the database, and couldn't go from PBI DT to Service to their network. 

 

I don't currently have access to the external vendors network at all. So instead of that, could the vendor create a pbix file, connect to the SQL server within their own network, import the data into the pbix, send the pbix to me to model and build a report / reports, which I then upload to the service which then can refresh through the service and gateway to the SQL server?

 

And then perhaps could i download the pbix from the service, with updated data everynow and then? 

Would that work?

 

and if it would work, is that just a mess and I should avoid arrange VPN access to directly access the SQL server.

 

Thanks for your advice and knowledge sharing. 

 

John

It would work to a point - you could only do very limited work in Power Query since you could not refresh the SQL data source at all.  You could still do the usual UI work and DAX etc.

 

It might be quicker if you set up your own SQL Server with some sample data and the same structure as the Vendor's server.  That way you can test the full cycle on the desktop, and only have to make sure to change the connection string when you hand it back over to the vendor or when you publish yourself. Might want to try using parameters on the service for that.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.