Understanding On-Premises Data Gateway in Power BI
Course: Microsoft Power BI Training
Topic: Understanding On-Premises Data Gateway
Course Link: Microsoft Power BI Training – JustAcademy
Demo Link: Register for a Course Demo
JustAcademy Website: Visit JustAcademy
1. Introduction to On-Premises Data Gateway
Power BI is a business intelligence platform used to connect data sources, transform information, create interactive reports, and share business insights. In many organizations, data is stored on local computers, internal servers, or databases located inside a private company network. The Power BI service runs in the cloud and may not be able to access these internal data sources directly.
The On-premises data gateway provides a secure communication bridge between supported cloud services, such as the Power BI service, and data sources that are located inside an organization's network or otherwise require gateway connectivity.
For example, a company may store sales information in a SQL Server database on its office network. A Power BI developer creates a report using that database and publishes it to the Power BI service. When the service needs to refresh the report's data or execute supported queries, the gateway enables communication with the internal database without requiring the database to be exposed directly to the public internet.
1.1 What Is an On-Premises Data Gateway?
An on-premises data gateway is software installed on a supported Windows computer or server. It securely transfers requests and data between supported cloud services and data sources that the gateway can reach.
The gateway can support scenarios such as:
- Refreshing Power BI semantic models from local databases.
- Connecting to supported on-premises SQL Server databases.
- Accessing supported files stored on internal network locations.
- Supporting DirectQuery connections to compatible data sources.
- Supporting live connections to SQL Server Analysis Services where applicable.
- Connecting supported data sources to other Microsoft cloud services through standard mode.
1.2 Why Is a Gateway Needed?
A cloud service cannot automatically access every database, file server, or application inside a private network. Network firewalls and authentication requirements often prevent direct external connections.
The gateway provides a controlled connection path so that authorized cloud services can access supported data without requiring organizations to make their internal data sources publicly accessible.
1.3 Key Benefits
- Secure connectivity: Provides a controlled communication path between cloud services and supported internal data sources.
- Scheduled refresh: Helps keep imported semantic models updated with source data.
- DirectQuery support: Enables supported queries to access source data when users interact with reports.
- Centralized management: Standard mode supports centrally managed gateway connections and access.
- Reduced infrastructure exposure: Uses outbound communication rather than requiring inbound firewall ports to be opened for the gateway's normal communication flow.
- Business continuity: Gateway clusters can improve availability for supported standard-mode deployments.
2. Understanding On-Premises and Cloud Data
Before learning how a gateway works, it is important to understand the difference between on-premises data and cloud data.
2.1 What Is On-Premises Data?
On-premises data is information stored on infrastructure that an organization manages locally or within its private network. This may include physical servers, office computers, private-network virtual machines, and internal file servers.
Examples include:
- SQL Server databases hosted on company servers.
- Excel files stored on an internal network drive.
- Oracle databases located in a private corporate network.
- SQL Server Analysis Services models hosted internally.
- Business application databases accessible only through an internal network.
2.2 What Is Cloud Data?
Cloud data is hosted in a cloud service or environment that can be accessed through supported network connections and authentication methods.
Examples include:
- Supported cloud-hosted databases.
- SharePoint Online files.
- OneDrive for work or school files.
- Supported online business applications.
- Cloud data warehouses accessible through supported connectors.
Not every cloud source requires a gateway. A gateway may still be necessary for some cloud-hosted sources when network restrictions, private connectivity, connector requirements, or other architectural conditions make it necessary.
2.3 On-Premises Data Versus Cloud Data
| Feature |
On-Premises Data |
Cloud Data |
| Storage location |
Local infrastructure or a private network. |
Cloud-hosted infrastructure or services. |
| Infrastructure management |
Often managed by the organization or its IT provider. |
Usually managed partly or fully by the cloud provider. |
| Accessibility |
May require internal network access or a gateway. |
May be directly accessible through a supported cloud connector. |
| Security controls |
Internal firewalls, network controls, and authentication. |
Cloud identity, permissions, network policies, and authentication. |
| Power BI connectivity |
Often requires a gateway for cloud refresh or query scenarios. |
May connect directly, depending on the source and configuration. |
3. How the On-Premises Data Gateway Works
The gateway establishes communication between Power BI and supported data sources. It runs on a machine that can access the data source and communicate with the required Microsoft cloud services.
3.1 Basic Working Process
- A developer connects Power BI Desktop to an internal database or another supported source.
- The developer transforms the data, builds a semantic model, and creates reports.
- The developer publishes the report and semantic model to the Power BI service.
- The gateway administrator configures the gateway and the required data source connection.
- The semantic model is mapped to the appropriate gateway connection where required.
- When a scheduled refresh, manual refresh, or supported query is initiated, the Power BI service communicates with the gateway.
- The gateway accesses the source using its configured connectivity and authentication.
- For an import refresh, the gateway retrieves the required data and transfers it securely to the service.
- The Power BI service updates the semantic model or returns query results according to the connection mode.
3.2 Simple Architecture Diagram
Internal Data Source
(SQL Server / Network File / Other Supported Source)
|
v
On-Premises Data Gateway
(Windows Machine)
|
| Secure Outbound Communication
v
Power BI Service
|
v
Semantic Model and Reports
|
v
Report Consumers
This diagram represents a simplified flow. Actual communication depends on the data source, connector, storage mode, authentication method, and gateway configuration.
3.3 Does the Gateway Require an Inbound Firewall Port?
The gateway normally initiates outbound connections to the required Microsoft cloud services. As a result, the standard communication pattern does not require opening inbound ports to the organization's internal network for the gateway to receive cloud requests.
However, network administrators must configure outbound connectivity according to Microsoft's current gateway network requirements. Proxy servers, firewalls, DNS settings, TLS inspection, and organizational security policies can affect connectivity.
4. Types of Power BI Gateways
Power BI supports three gateway options: the on-premises data gateway in standard mode, the on-premises data gateway in personal mode, and the virtual network data gateway.
4.1 Standard Mode Gateway
The standard-mode gateway is designed for shared and centrally managed use. Multiple authorized users can use its configured connections, and gateway administrators can manage data source connections and permissions.
Standard mode is suitable for:
- Departmental and enterprise reporting solutions.
- Shared database connections.
- DirectQuery scenarios that require a gateway.
- Supported live connections to Analysis Services.
- Multiple users who need access to shared data sources.
- Gateway clusters for high availability and load distribution.
- Scenarios involving other supported Microsoft cloud services.
4.2 Personal Mode Gateway
The personal-mode gateway is intended for an individual Power BI user who needs to refresh their own imported semantic models from supported on-premises sources. It is managed by the individual rather than through centrally shared gateway connections.
Personal mode is suitable for:
- Individual report authors.
- Personal business intelligence projects.
- Import models that require scheduled or manual refresh.
- Scenarios that do not require shared gateway administration.
Personal mode does not support the same capabilities as standard mode. It does not support DirectQuery, live connections to Analysis Services, or gateway clustering and high availability.
4.3 Virtual Network (VNet) Data Gateway
A virtual network data gateway is a Microsoft-managed gateway service used to connect supported cloud analytics services to data sources protected within a virtual network. Unlike an on-premises gateway, it does not require the organization to install and maintain gateway software on a local Windows machine.
VNet gateways may be appropriate when:
- Data sources are secured inside a supported virtual network.
- Private network connectivity is required.
- The architecture meets the gateway service's regional, networking, and capacity requirements.
4.4 Gateway Comparison
| Feature |
Standard Mode |
Personal Mode |
VNet Gateway |
| Installation |
Installed on a supported Windows machine. |
Installed on a supported Windows machine. |
Microsoft-managed service. |
| Multiple users |
Yes, through managed connections and permissions. |
No, intended for an individual user. |
Supports eligible service connections according to configuration. |
| Centralized administration |
Yes. |
Limited. |
Managed through supported cloud configuration. |
| Scheduled import refresh |
Yes. |
Yes. |
Supported scenarios depend on the source and service configuration. |
| DirectQuery |
Yes, for supported sources and scenarios. |
No. |
Supported scenarios depend on the source and configuration. |
| High availability cluster |
Yes. |
No. |
Uses its managed service architecture rather than a local gateway cluster. |
| Typical use |
Shared departmental or enterprise BI. |
Individual Power BI refresh. |
Supported sources protected by a virtual network. |
Recommendation: For most shared business reporting solutions that require access to on-premises data, standard mode is generally the preferred option. Select the gateway type according to the architecture, data source, security needs, and supported features.
5. When Is an On-Premises Data Gateway Required?
A gateway is generally required when Power BI or another supported cloud service needs to access a data source that is not directly accessible through a supported cloud connection.
5.1 Common Gateway Scenarios
- Refreshing a semantic model that uses a database hosted inside a private network.
- Connecting to local files or network files that the gateway machine can access.
- Running supported DirectQuery requests against an on-premises database.
- Using a supported live connection to SQL Server Analysis Services.
- Connecting to a source that requires a gateway-hosted driver, library, or supported custom connector.
- Combining cloud and on-premises sources in a query that requires gateway connectivity.
5.2 When a Gateway May Not Be Required
- The data source is a supported cloud source that Power BI can access directly.
- The data is hosted in SharePoint Online or OneDrive for work or school and a supported direct connection meets the requirement.
- The data has been moved to a suitable cloud platform that Power BI can access without a gateway.
- The source is accessible through a supported cloud-native connection and does not require a gateway for the selected scenario.
Always evaluate the source type, network configuration, connector, and connection mode before deciding whether a gateway is necessary.
6. Installing the On-Premises Data Gateway
Installing the gateway is an important step in establishing connectivity between Power BI and internal data sources. For business environments, the installation should be planned with the IT or BI administration team.
6.1 Prerequisites
- A supported Windows computer or server.
- Administrative rights to install the standard-mode gateway.
- A stable network connection.
- Outbound access to the Microsoft services required by the gateway.
- An organizational account authorized to register the gateway.
- Network access from the gateway machine to the target data source.
- Required database drivers, connectors, or supporting software where applicable.
- Sufficient CPU, memory, disk space, and network capacity for the expected workload.
Check Microsoft's current gateway installation documentation for supported Windows versions, software dependencies, and system requirements before installing the gateway.
6.2 Downloading the Gateway
- Open the official Microsoft Power BI gateway page.
- Choose the appropriate gateway download, such as standard mode or personal mode.
- Download the installer from the official Microsoft source.
- Confirm that the Windows machine meets the current requirements.
- Ensure that the installation is approved by the organization's IT policy.
Official download page: Download the Power BI Gateway.
6.3 Installing Standard Mode
- Run the gateway installer on the designated Windows machine.
- Review and accept the license terms.
- Confirm or change the installation location if needed.
- Choose the standard-mode gateway option.
- Complete the installation.
- Open the gateway configuration application.
- Sign in with an authorized organizational account.
- Register a new gateway or migrate an existing gateway according to the intended setup.
- Enter a descriptive gateway name.
- Create and securely store a gateway recovery key.
- Complete the configuration process.
- Confirm that the gateway is online and registered correctly.
6.4 Choosing a Gateway Name
Gateway names should make their purpose and environment clear.
Examples:
- PowerBI-Gateway-Production
- Sales-Data-Gateway
- Finance-Gateway-Prod
- Gateway-Development-01
For clustered deployments, use a consistent naming convention that identifies the cluster and individual nodes.
7. Registering and Configuring a Gateway
Installing the gateway software does not automatically make every data source available to Power BI. The gateway must be registered, and the required data source connections must be configured and authorized.
7.1 Registering the Gateway
- Launch the gateway configuration application.
- Sign in with the appropriate organizational account.
- Choose the option to register a new gateway or recover an existing one.
- Enter the gateway name.
- Create or provide the recovery key when requested.
- Complete registration.
- Open the Power BI service or Microsoft Fabric portal.
- Navigate to the relevant connections and gateways management area.
- Confirm that the gateway is listed and available.
7.2 Configuring a Data Source Connection
- Open the gateway management area in the Power BI service.
- Select the registered gateway.
- Choose the option to create or manage a connection or data source.
- Select the appropriate data source type.
- Enter the server name, database name, file path, or other required connection information.
- Choose the supported authentication method.
- Enter the required credentials or configure the supported identity method.
- Configure any required privacy level and connector settings.
- Test the connection if the interface provides that option.
- Save the connection after successful validation.
7.3 Example: SQL Server Data Source
Suppose the organization stores sales data in a SQL Server database named SalesDB on a server called SQLSERVER01.
| Setting |
Example Value |
| Data source type |
SQL Server |
| Server |
SQLSERVER01 |
| Database |
SalesDB |
| Authentication |
An approved authentication method supported by the connector |
| Gateway |
PowerBI-Gateway-Production |
These values are illustrative. Use the actual server name, database name, and authentication settings provided by the database administrator.
8. Connecting Power BI Desktop to a Gateway Data Source
Power BI Desktop is commonly used to connect to data sources, transform data, create semantic models, and design reports. When a report is published, the corresponding service-side model must be configured to access its source through the appropriate gateway when required.
8.1 Desktop Connection Process
- Open Power BI Desktop.
- Select Get data.
- Choose the appropriate source, such as SQL Server.
- Enter the server and database details.
- Select the desired connectivity mode, such as Import or DirectQuery, where supported.
- Authenticate using an approved account.
- Select the required tables or views.
- Transform and model the data as needed.
- Create the report visuals.
- Publish the report to the intended Power BI workspace.
8.2 Matching the Data Source After Publishing
After publishing, the semantic model in the Power BI service must be associated with the correct gateway connection when the source requires one. The source information used by the model must match the configured connection details.
For example, a model that connects to SQLSERVER01 and SalesDB may not map to a gateway connection configured with a different server name or database. Consistent source names and connection settings help avoid mapping and refresh errors.
9. Understanding Import Mode and DirectQuery
Power BI supports different data connectivity modes. The selected mode affects how data is retrieved, stored, and updated, as well as how the gateway is used.
9.1 Import Mode
In Import mode, Power BI loads data into the semantic model. Users interact with the imported data, and the model must be refreshed to retrieve subsequent changes from the source.
The gateway may be used to refresh imported data from on-premises sources.
Example: A company imports sales transactions from SQL Server every morning at 6:00 AM. The gateway allows the Power BI service to reach the database during the scheduled refresh.
9.2 DirectQuery Mode
In DirectQuery mode, supported report interactions can send queries to the underlying data source rather than relying entirely on a fully imported copy of the data.
When the data source requires a gateway, the gateway can relay supported queries between the Power BI service and the source.
Example: A sales manager opens a report and filters sales by region. Depending on the model and query, Power BI can send a query to the underlying database to retrieve the required results.
9.3 Import Versus DirectQuery
| Feature |
Import Mode |
DirectQuery Mode |
| Data storage |
Data is loaded into the semantic model. |
Data remains primarily in the source for supported queries. |
| Data freshness |
Depends on the refresh schedule or manual refresh. |
Depends on source data, query behavior, caching, and model configuration. |
| Gateway use |
May be required for refresh from an internal source. |
May be required for supported queries against an internal source. |
| Performance factors |
Model size, refresh time, and report design. |
Source performance, query complexity, network latency, and concurrency. |
| Typical use |
Reporting that benefits from imported data and scheduled updates. |
Reporting that needs supported source-query behavior or source-level data access. |
10. Configuring Scheduled Refresh Through a Gateway
Scheduled refresh updates an imported semantic model by retrieving current data from its source. If the source is on-premises and requires a gateway, the gateway must be online and correctly configured for the refresh to succeed.
10.1 Prerequisites for Scheduled Refresh
- The gateway is installed, registered, and online.
- The required data source connection is configured.
- The semantic model is mapped to the correct gateway connection.
- The configured credentials are valid.
- The gateway machine can reach the source database or file.
- The required network and firewall settings are correct.
- The semantic model and refresh configuration meet applicable licensing and capacity requirements.
10.2 Step-by-Step Refresh Configuration
- Publish the semantic model and report to the Power BI service.
- Open the workspace containing the semantic model.
- Open the semantic model's settings.
- Locate the gateway and connection settings.
- Select or map the appropriate gateway connection.
- Verify that the required data sources are recognized and configured.
- Configure the source credentials where necessary.
- Open the scheduled refresh section.
- Enable refresh if required.
- Choose the refresh frequency and time according to business needs and available limits.
- Save the settings.
- Run a test refresh and review its status.
10.3 Example Refresh Schedule
| Report |
Data Source |
Refresh Schedule |
Business Purpose |
| Daily Sales Report |
SQL Server |
Every business morning |
Review recent sales performance. |
| Inventory Report |
Internal inventory database |
Several times per day, if required and supported |
Monitor stock availability. |
| Monthly Finance Report |
Finance database |
After the monthly close process |
Review finalized financial results. |
Refresh frequency should be based on data requirements, available capacity, source-system workload, and applicable Power BI limits. Avoid unnecessary refreshes that increase database load without improving business decisions.
11. Gateway Administration and User Roles
A standard-mode gateway can be managed centrally. Gateway roles determine who can administer the gateway or use its configured connections.
11.1 Gateway Administrator
Gateway administrators can manage and update the gateway and perform supported administrative tasks. They should be trusted technical personnel who understand the organization's data security and network requirements.
11.2 Connection-Level Roles
Standard-mode gateway connections can have their own access permissions. Depending on the connection and interface, users may be able to manage a connection or use it to connect to a data source.
A person who only needs to use an approved gateway connection does not necessarily need to be a gateway administrator.
11.3 Gateway Role Best Practices
- Limit gateway administration to trusted personnel.
- Use approved security groups where practical.
- Give users connection access only when they need it.
- Review administrators and connection users periodically.
- Maintain a record of gateway ownership and support responsibilities.
- Store recovery keys securely and make them available to authorized backup administrators.
12. Gateway Security Best Practices
Gateways connect cloud services to internal data sources, so their configuration must be managed carefully. Poorly managed gateway access can expose sensitive information or interrupt business-critical reporting.
12.1 Secure the Gateway Machine
- Install the gateway on a supported, appropriately secured Windows machine.
- Use a dedicated, always-on machine for business-critical standard-mode gateways where practical.
- Apply Windows security updates and organizational endpoint protections.
- Restrict interactive and administrative access to authorized personnel.
- Monitor CPU, memory, disk space, and network utilization.
- Avoid unnecessary software that could interfere with gateway performance.
12.2 Protect Credentials and Recovery Keys
- Use approved authentication methods for each source.
- Never store passwords in report notes or source code.
- Restrict access to gateway configuration and credentials.
- Store standard-mode gateway recovery keys in an approved secure vault.
- Ensure authorized backup personnel can recover the gateway when required.
- Follow organizational procedures when credentials change.
12.3 Apply the Principle of Least Privilege
Grant gateway administration rights only to people who need to manage the gateway. Grant connection usage rights to users who need to access the approved source. Do not assume that every report consumer requires gateway administration access.
12.4 Protect Internal Networks
Follow Microsoft's documented network requirements and the organization's firewall policies. Configure outbound connectivity as required and avoid exposing internal databases directly to the internet merely to make Power BI connectivity easier.
13. Gateway Clusters and High Availability
A gateway cluster consists of multiple standard-mode gateway installations configured to work together. Clustering can improve availability and help distribute workloads, reducing dependence on a single gateway machine.
13.1 Why Use a Gateway Cluster?
- Improve availability for business-critical reporting.
- Reduce the impact of an individual gateway machine becoming unavailable.
- Support workloads with multiple concurrent users.
- Provide additional capacity where the architecture and configuration support it.
- Help maintain gateway services during planned maintenance.
13.2 Basic Cluster Architecture
Power BI Service
|
v
Gateway Cluster
/ \
v v
Gateway Node 1 Gateway Node 2
\ /
\ /
v v
Internal Data Source
This is a simplified conceptual diagram. Cluster behavior, workload distribution, failover, and configuration depend on the gateway setup and current Microsoft guidance.
13.3 Planning a Cluster
- Identify the reports and semantic models that depend on the gateway.
- Estimate expected refresh workloads and concurrent queries.
- Choose supported Windows machines with sufficient resources.
- Install and register the primary standard-mode gateway.
- Add additional gateway nodes using the supported cluster procedure.
- Confirm that nodes can reach the required data sources.
- Verify credentials, connection configuration, and recovery procedures.
- Test availability and monitor performance.
13.4 When Is Clustering Appropriate?
Clustering is useful when a gateway supports important reports or operational processes that cannot tolerate a single machine becoming unavailable. A small personal reporting project may not need a cluster, but a large organization with business-critical refreshes may benefit from one.
14. Gateway Performance Optimization
Gateway performance affects refresh duration, DirectQuery response times, and the overall reliability of reports that depend on the source.
14.1 Common Performance Factors
- CPU and memory resources on the gateway machine.
- Number of simultaneous refreshes and queries.
- Size of the data being transferred.
- Complexity of Power Query transformations.
- Database indexing and query performance.
- Network latency between the gateway and data source.
- Connector and driver performance.
- Competing workloads on the gateway machine.
14.2 Optimization Techniques
- Install the gateway close to the source system where practical.
- Use a stable wired network connection for on-premises installations.
- Ensure that the gateway machine has sufficient resources.
- Keep gateway software and required drivers up to date.
- Optimize source database queries and indexes.
- Reduce unnecessary columns and rows in imported data.
- Use query folding where supported and appropriate.
- Avoid unnecessary transformations that increase refresh workload.
- Schedule large refreshes to reduce resource contention.
- Monitor gateway logs and performance metrics when troubleshooting.
15. Troubleshooting Common Gateway Problems
| Problem |
Possible Cause |
Suggested Solution |
| Gateway appears offline. |
The gateway service is stopped, the machine is shut down, or network connectivity is blocked. |
Check machine availability, gateway service status, and outbound network access. |
| Scheduled refresh fails. |
Credentials are invalid, the source is unreachable, or the gateway mapping is incorrect. |
Verify credentials, connection settings, source availability, and model-to-gateway mapping. |
| Power BI cannot find the gateway. |
The gateway is registered to a different account or tenant, or the user lacks access. |
Confirm gateway registration, tenant, and permissions. |
| Data source connection test fails. |
Incorrect server name, database name, authentication, firewall settings, or missing driver. |
Test connectivity from the gateway machine and correct the source configuration. |
| Refresh is slow. |
Large data volume, complex transformations, limited resources, or a slow source database. |
Optimize queries, reduce unnecessary data, review resource usage, and investigate source performance. |
| Gateway service cannot start. |
Operating system, service account, software, or machine configuration issue. |
Check service status, system logs, installation health, and supported configuration requirements. |
| DirectQuery requests fail. |
The gateway or source may be unreachable, the model mapping may be incorrect, or the source may reject queries. |
Check the gateway connection, source permissions, network path, and database logs. |
| Credentials are repeatedly requested. |
Credentials changed, authentication failed, or the saved connection settings are invalid. |
Update credentials in the appropriate gateway connection or semantic model settings. |
| Gateway performance is inconsistent. |
Resource contention, concurrent workloads, network instability, or outdated software. |
Monitor resource utilization, update the gateway, and evaluate workload distribution. |
| Network file cannot be accessed. |
The gateway service identity lacks access to the file or share. |
Verify the path and permissions using the identity under which the gateway accesses the source. |
15.1 A Systematic Troubleshooting Workflow
- Identify the failed report, semantic model, or query.
- Check whether the gateway is online.
- Verify that the gateway machine is running.
- Confirm that the source database or file is available.
- Check the source connection and authentication settings.
- Confirm that the semantic model is mapped to the correct gateway connection.
- Review network, firewall, DNS, and proxy settings where relevant.
- Check refresh history and available gateway logs.
- Test the connection from the gateway machine.
- Apply the corrective action and run a test refresh or query.
- Document the cause and resolution for future support.
16. Gateway Maintenance and Updates
A gateway requires ongoing maintenance to remain secure, compatible, and reliable. Standard-mode gateway software is updated periodically, and administrators should plan for updates instead of leaving installations outdated.
16.1 Regular Maintenance Tasks
- Update gateway software according to Microsoft's supported release guidance.
- Install operating system security updates.
- Maintain required drivers, libraries, and connectors.
- Check gateway service status and connectivity.
- Monitor refresh history and error messages.
- Review credentials and connection permissions.
- Confirm recovery-key storage and recovery procedures.
- Monitor resource consumption and available disk space.
- Document maintenance activities.
16.2 Why Gateway Updates Matter
Updates can provide fixes, compatibility improvements, and security enhancements. An outdated gateway may also cause inconsistencies between the local transformation environment and the cloud service.
Before updating a business-critical gateway, follow the organization's change-management process and confirm that the appropriate support and recovery arrangements are in place.
17. Understanding Gateway Recovery and Disaster Recovery
Gateway recovery procedures help administrators restore gateway functionality after machine failure, replacement, or other operational incidents.
17.1 Why the Recovery Key Is Important
When registering a standard-mode gateway, administrators create a recovery key. The key is used in supported gateway recovery or migration operations and helps protect the gateway's configuration and credentials.
The recovery key should be stored securely in an approved password vault or another protected location accessible to authorized backup administrators.
17.2 Recovery Planning Checklist
- Document the gateway name and purpose.
- Record the gateway machine and its operational owner.
- Securely store the recovery key.
- Document the data source connections and required drivers.
- Identify the network and firewall requirements.
- Maintain a list of authorized gateway administrators.
- Document the recovery or migration procedure.
- Test the recovery plan according to business continuity requirements.
18. Gateway Use Case: Connecting Power BI to SQL Server
18.1 Business Scenario
A retail company stores its sales transactions in a SQL Server database hosted on its internal network. Management wants a Power BI report that displays daily sales, monthly revenue, product performance, and regional comparisons.
18.2 Solution Architecture
- Source: Internal SQL Server database.
- Development tool: Power BI Desktop.
- Gateway: Standard-mode gateway on an approved Windows server.
- Cloud platform: Power BI service.
- Output: Published sales report and semantic model.
18.3 Implementation Steps
- Confirm that the SQL Server database is available on the internal network.
- Install and register a standard-mode gateway on an appropriate machine.
- Create a gateway connection for the SQL Server database.
- Configure the approved authentication method.
- Connect Power BI Desktop to the SQL Server database.
- Load the required tables and transform the data.
- Create measures such as Total Sales and Total Profit.
- Build report pages for daily, monthly, product, and regional analysis.
- Publish the report to the Power BI service.
- Map the semantic model to the correct gateway connection.
- Configure scheduled refresh if using Import mode.
- Test refresh and verify that report values match the source data.
- Document the gateway configuration and maintenance responsibilities.
18.4 Expected Result
The Power BI service can access the internal SQL Server data through the configured gateway for supported refresh or query operations. Authorized users can view the published report, and imported data can be updated according to the configured refresh schedule.
19. Gateway Use Case: Refreshing an Excel File on a Network Drive
An organization may store operational data in an Excel workbook on an internal file server. If the workbook must remain on that internal network and the Power BI service needs to refresh data from it, a gateway may be required.
19.1 Implementation Steps
- Confirm that the workbook is stored in an accessible network location.
- Verify that the gateway machine can reach the file path.
- Check that the identity used for file access has the required permissions.
- Connect Power BI Desktop to the workbook.
- Transform the data and build the report.
- Publish the semantic model and report.
- Configure the appropriate gateway connection if required.
- Verify that the file path and source configuration match.
- Configure scheduled refresh and test it.
If the workbook can be moved to SharePoint Online or OneDrive for work or school, a supported cloud connection may remove the need for a gateway. The correct approach depends on the organization's storage, security, and governance requirements.
20. Gateway Planning for Organizations
Organizations should plan gateway deployment before using it for important reporting solutions. Planning helps avoid unnecessary installations, performance problems, unclear ownership, and access-control risks.
20.1 Gateway Planning Checklist
- Create an inventory of data sources that require gateway connectivity.
- Identify the reports, semantic models, and services that depend on each source.
- Choose standard mode, personal mode, or VNet gateway according to the scenario.
- Identify a trusted gateway owner and backup administrators.
- Select an appropriate machine and location.
- Confirm network, authentication, driver, and connector requirements.
- Estimate refresh and query workloads.
- Determine whether high availability or clustering is needed.
- Define gateway naming conventions.
- Establish monitoring, update, and recovery procedures.
- Document access policies and data source ownership.
20.2 Choosing the Right Installation Location
The gateway should normally be installed on a machine that is close enough to the data source to provide reliable connectivity and low network latency. It should also meet the organization's security, availability, and data residency requirements.
For business-critical solutions, a dedicated and always-on virtual machine or server is often more appropriate than a personal employee computer.
21. Common Gateway Misconceptions
| Misconception |
Correct Explanation |
| The gateway stores all the business data. |
The gateway provides connectivity and data transfer. In Import mode, the semantic model stores imported data in the Power BI service. |
| Installing the gateway automatically configures every data source. |
Each required connection and its authentication must be configured and authorized. |
| Every Power BI report requires a gateway. |
Only scenarios that require gateway connectivity need one. Many supported cloud sources connect directly. |
| Personal mode is best for enterprise reporting. |
Standard mode is generally more suitable for shared and centrally managed business reporting. |
| Sharing a report requires giving everyone gateway administrator access. |
Report access and gateway administration are separate. Consumers do not normally need gateway administration rights. |
| The gateway always provides real-time data. |
Data freshness depends on the connectivity mode, source behavior, refresh configuration, and query execution. |
| Opening inbound ports is always required. |
The gateway normally uses outbound communication, although required network endpoints and firewall rules must still be configured. |
| A successful desktop connection guarantees service refresh will work. |
The service also requires correct gateway mapping, credentials, source accessibility, and applicable permissions. |
22. Practical Exercises
Exercise 1: Gateway Type Selection
A company has one analyst who refreshes a personal report and another team that manages reports for 100 employees. Decide which gateway type is appropriate for each scenario and explain why.
Exercise 2: SQL Server Connectivity
Prepare a gateway configuration checklist for a Power BI semantic model that connects to an internal SQL Server database. Include server details, authentication, gateway mapping, and testing.
Exercise 3: Scheduled Refresh Troubleshooting
A report refresh works in Power BI Desktop but fails in the Power BI service. Create a troubleshooting checklist covering gateway status, credentials, source accessibility, and connection mapping.
Exercise 4: Gateway Security
Design a gateway security policy that defines gateway administrators, connection users, recovery-key storage, and access-review responsibilities.
Exercise 5: High Availability
A company depends on several important reports that refresh throughout the business day. Explain how a standard-mode gateway cluster may improve availability and what should be considered before implementation.
Exercise 6: Gateway Versus Cloud Storage
An Excel workbook is stored on an internal network drive. Compare keeping the file on the network and using a gateway with moving it to an approved SharePoint Online location and using a supported cloud connection.
23. Interview Questions and Answers
Q1. What is an on-premises data gateway in Power BI?
Answer: It is software installed on a supported Windows machine that provides a secure communication bridge between the Power BI service and supported data sources that are located on an internal network or otherwise require gateway connectivity.
Q2. Why is a gateway required?
Answer: A gateway allows supported cloud services to access internal data sources for refresh or query operations without requiring those sources to be directly exposed to the public internet.
Q3. What are the three gateway options in Power BI?
Answer: On-premises data gateway in standard mode, on-premises data gateway in personal mode, and virtual network data gateway.
Q4. What is the difference between standard mode and personal mode?
Answer: Standard mode supports shared connections, centralized management, DirectQuery, supported live connections, and clustering. Personal mode is intended for an individual user refreshing their own imported semantic models and has more limited functionality.
Q5. Does a gateway store all Power BI data?
Answer: No. The gateway provides connectivity and transfers data or query requests. Imported data is stored in the Power BI semantic model, while DirectQuery uses supported queries against the source.
Q6. What is the purpose of a gateway recovery key?
Answer: The recovery key is used for supported recovery or migration operations involving a standard-mode gateway. It must be stored securely and made available to authorized administrators.
Q7. What is a gateway data source connection?
Answer: It is a configured connection that specifies how the gateway accesses a particular data source, including source details, authentication, and relevant settings.
Q8. What is the relationship between a gateway and scheduled refresh?
Answer: When an imported semantic model uses an on-premises source that requires a gateway, the gateway provides the service with a path to retrieve updated data during scheduled or manual refresh.
Q9. Can Power BI DirectQuery use a gateway?
Answer: Yes. Standard mode supports DirectQuery for supported data sources and scenarios that require gateway connectivity. Personal mode does not support DirectQuery.
Q10. What is a gateway cluster?
Answer: A gateway cluster is a group of standard-mode gateway installations configured together to improve availability and support workload distribution in supported scenarios.
Q11. What should you check when a gateway is offline?
Answer: Check the gateway machine, gateway service, network connectivity, required outbound access, and relevant gateway status information.
Q12. Why can a refresh fail even when Power BI Desktop works?
Answer: The service may have incorrect gateway mapping, credentials, permissions, source paths, or network access. Desktop connectivity alone does not guarantee service-side refresh will succeed.
Q13. Does every cloud data source need a gateway?
Answer: No. Many supported cloud data sources connect directly. A gateway is needed only when the source or architecture requires it.
Q14. How can gateway performance be improved?
Answer: Use sufficient machine resources, keep the gateway updated, optimize source queries and transformations, reduce unnecessary data, minimize network latency, and monitor concurrent workloads.
Q15. Why is gateway security important?
Answer: The gateway connects cloud services to internal sources. Restricting administrative access, protecting credentials, securing recovery keys, and monitoring the gateway help protect organizational data.
24. Quick Revision Checklist
- Understand the purpose of the on-premises data gateway.
- Know the difference between on-premises data and cloud data.
- Understand standard mode, personal mode, and VNet gateways.
- Know when gateway connectivity is required.
- Understand the basic gateway communication flow.
- Learn how to install and register a standard-mode gateway.
- Understand how gateway data source connections are configured.
- Know how to map a semantic model to the correct gateway connection.
- Understand Import mode and DirectQuery.
- Know how to configure and troubleshoot scheduled refresh.
- Understand gateway administration and connection-level permissions.
- Protect credentials and recovery keys.
- Understand gateway clustering and high availability.
- Monitor gateway performance and update gateway software.
- Follow security, maintenance, and recovery best practices.
25. Conclusion
The On-premises data gateway is an important component of Power BI architecture when cloud-based reporting solutions need to connect to supported data sources inside private networks. It provides a controlled communication path that helps organizations refresh imported semantic models, execute supported DirectQuery operations, and maintain connectivity to internal business data.
Understanding gateway types, installation, source configuration, scheduled refresh, access permissions, security, performance, and troubleshooting is essential for building reliable Power BI solutions. For shared organizational reporting, standard mode is generally the preferred starting point, while personal mode and VNet gateways serve different requirements.
A well-managed gateway deployment should include secure installation, limited administration, protected credentials and recovery keys, regular updates, performance monitoring, and a documented recovery plan. These practices help ensure that Power BI reports remain reliable, secure, and available to authorized users.
26. Additional Learning Resources