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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
itays
Regular Visitor

Connecting to a remote SQL Server using the DirectQuery method

Hi,

I have a SQL Server database running on some server on the network. I have another machine on the same network which runs the gateway to that SQL Server database and it functions correctly.

I'm trying to create a live report, which uses the DirectQuery connectivity method, and I cant seem to connect to my data source.

When I use the import method - I can choose my gateway and connect to the source, but using DirectQuery I can't provide any credentials other than server address.

Is there even a way to connect to a remote SQL Server using DirectQuery?

PowerBI1.png

Providing server nameProviding server nameFailing to connect (Probably since no credentials have been provided)Failing to connect (Probably since no credentials have been provided)

1 ACCEPTED SOLUTION

Your original post indicated that when designing a Power BI model that was to connect to SQL Server, you got an error stating that it could not find that SQL server on the network. You are desiggning from you LOCAL MACHINE correct? Does that LOCAL MACHINE have the ability to connect to the SQL Server?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





View solution in original post

11 REPLIES 11
serives4
New Member

Connecting to a remote SQL Server using the DirectQuery method in Power BI involves establishing a live connection between your Power BI report and the SQL Server database. This method allows you to retrieve and visualize data directly from the SQL Server in real time. Here's how you can do it:

1. Prepare Your SQL Server:

  • Ensure that your remote SQL Server is properly configured and accessible from the network where your Power BI application resides.
  • Make sure you have the necessary credentials (username and password) to connect to the SQL Server database.
  • chiropractor rome, ga
ToddChitt
Super User
Super User

Have you tried with supplying a Database Name? 




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Thanks for your reply. I have tried providing the database name, still no connection was made.

The database is secured with a username and password and it seems impossible to connect to it without providing any credentials.

>>The database is secured with a username and password and it seems impossible to connect to it without providing any credentials.<<

Is this a surprise to you? What happens when you supply theese? Do you even have them? If not, that's not Power BI's fault.

 

Me to my mechanic: My car won't start!

My Mechanic: OK, let me have the keys and I will try it.

Me: I don't have the keys.

🙂




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Obviously I do have the credentials (I did manage to set up the gateway which requires db authentication). As I mentioned before: There is no appropriate place to provide the db credentials as well as choosing to connect to the gateway. What I'm asking is if there is a way to connect to a SQL Server which is NOT on my local machine?

The error in the orgininal post indicated that Power BI could not find the SQL Server. Let's start there. Can you connect to that SQL instance via SSMS or some other SQL client FROM YOUR LOCAL MACHINE?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Yes, from my local machine I can connect with a SQL Server client by providing a Username and Passsword

 

RDP as in Remote Desktop. No, doesn't count. I need you to verify that your LOCAL MACHINE can make a SQL Connection to that server. Do you have SSMS installed locally?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





The machine which has the gateway installed on it has a SSMS client and can connect to the db machine.

Your original post indicated that when designing a Power BI model that was to connect to SQL Server, you got an error stating that it could not find that SQL server on the network. You are desiggning from you LOCAL MACHINE correct? Does that LOCAL MACHINE have the ability to connect to the SQL Server?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





You are right, I tried to connect through my local machine and just now realized the server address im trying to connect to is an organizational IP address. Thanks for the hints, I will take it from here!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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