Connecting to On-premises SQL Server Database Using Gateway
Learning Outcome
6
Apply basic security best practices
5
Connect Power BI Desktop reports using the gateway
4
Register SQL Server as a data source in Power BI Service
3
Install and configure an on-premises data gateway
2
Understand the end-to-end connection flow
1
Explain why a gateway is required for on-premises SQL Server
What an on-premises data gateway
What an on-premises data gateway
scheduled refresh happens in Power BI Service
How Power BI Service works
Difference between Import and DirectQuery
Students already know:
Imagine Your SQL Server sits inside the company.
Power BI Service is outside.
In the cloud.
Far away.
The cloud asks for data.
The database refuses.
They stay inside the building.
Power BI Service is outside.
In the cloud.
Far away.
The door never opens.
The data never leaves control.
If Power BI Service lives in the cloud:
How can it safely read data
from a SQL Server that must stay on-premises?
Power BI Service never directly connects to your SQL Server.
Instead, it uses a trusted middleman called the On-Premises Data Gateway.
It then sends the data to Power BI Service using encrypted outbound connections.
This way, the firewall stays closed, and the database remains under full company control.
SQL Server is hosted:
On a local server
Inside a private network
Power BI Service:
Cannot directly reach on-prem servers
Power BI Service sends a refresh or query request
Gateway securely polls the service
Gateway connects to SQL Server locally
Data is encrypted and sent back to Power BI Service
Dataset refresh completes
Connection Flow
Installing the On-Premises Data Gateway
Steps
Go to Power BI Service
Download On-Premises Data Gateway
Install on:
A server or machine with access to SQL Server
Sign in using Power BI account
Install on a machine that:
Registering and Verifying the Gateway
Steps
The gateway must be registered with Power BI Service
It should appear as Online
Creating a SQL Server Data Source in Gateway
Steps
Click Add data source
Choose:
Choose authentication:
Connecting Power BI Desktop to SQL Server
Choose:
Publishing and Mapping to the Gateway
SQL Server data source
Enabling Scheduled Refresh
Set:
Save settings
Security Best Practices
Use Windows Authentication when possible
Restrict gateway access to authorized users only
Store credentials securely
Use encryption (SSL/TLS) for data in transit
Common Issues and Troubleshooting
Summary
5
Proper security is essential
4
Power BI Service handles refresh and sharing
3
SQL Server is registered as a gateway data source
2
Gateway enables secure cloud-to-local communication
1
On-premises SQL Server requires a gateway
Quiz
Why is a gateway required for on-premises SQL Server?
A. To store SQL Server data in Power BI Desktop
B. To allow Power BI Service to access on-premises data
C. To increase SQL Server performance
D. To replace DirectQuery mode
Why is a gateway required for on-premises SQL Server?
A. To store SQL Server data in Power BI Desktop
B. To allow Power BI Service to access on-premises data
C. To increase SQL Server performance
D. To replace DirectQuery mode
Quiz-Answer