logo
search
Others

How to Fix Power BI SQL Database Gateway and Connection Errors

Bushra ParveenBushra Parveen Oct 9, 2026 869 views

Question details

The user needs to resolve connection and gateway errors when linking a new user to a SQL Server database via Power BI.

How to Troubleshoot Power BI SQL Database Gateway and Connection Errors
Product
Power BI
Device & OS
not provided
Scenario
Connecting a new user account to a SQL Server database for data analysis using Power BI Desktop and Power BI Online.
Observed behavior
Power BI Online displays an offline SQL connection and a gateway error, while Power BI Desktop throws an error stating that a key did not match any rows in the table.
Before you start

Ensure you have the exact SQL Server connection details, including the server IP address, database name, and active user credentials, before modifying any gateway settings.

Solution 1Recommended

Verify SQL Server Credentials and Permissions

Confirm that the login credentials are correct and that the user has the necessary permissions to access the target SQL database.

Authentication failures and missing database mapping are common causes for key matching errors in Power BI Desktop.

1
Test with Server IP Address

In Power BI Desktop, navigate to 'Get Data' > 'SQL Server database'. Enter the server's IP address instead of the server name to rule out any DNS resolution problems.

2
Validate Credentials in SSMS

Open SQL Server Management Studio (SSMS) and attempt to log in using the exact same username and password to ensure the credentials are valid and the account is not locked.

3
Check Database Mapping

In SSMS, navigate to 'Security' > 'Logins'. Right-click the user account, select 'Properties', and check the 'User Mapping' page to ensure the user has 'db_datareader' access to the required database.

Verify SQL Server Credentials and Permissions
Document Exact Errors: If the connection still fails, click 'Show details' on the error prompt to obtain the exact error code provided by Power BI for further diagnosis.
Free Microsoft Office alternative

Analyze and Visualize Data Easily with WPS Spreadsheet

While Power BI is a robust tool for complex enterprise dashboarding, everyday data analysis, reporting, and visualization can be handled effortlessly with WPS Spreadsheet. As a comprehensive office suite, it provides a seamless and lightweight environment for all your data tasks.

  1. 1. Download the Installer: Navigate to the official WPS Office website and click the free download button.
  2. 2. Install WPS Office: Run the downloaded installer and follow the on-screen prompts to set up the software on your device.
  3. 3. Open and Analyze Data: Launch WPS Spreadsheet, import your dataset or SQL export, and begin utilizing built-in visualization tools instantly.
Fully compatible with Microsoft Excel (.xlsx) file formatsBuilt-in pivot tables and advanced charting for quick data analysisFree, lightweight, and fast-loading alternative to Microsoft OfficeFamiliar user interface requiring zero learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power BI Desktop report 'the key didn't match any rows in the table'?

This error typically means the specific table, view, or schema you are referencing in your Power Query or data model no longer exists, has been renamed in the SQL database, or the user lacks sufficient permissions to view it.

How do I fix the gateway offline error in Power BI Online?

To fix a gateway offline error, ensure that the machine hosting the On-premises data gateway is turned on and connected to the internet. Open the gateway app locally, sign in, and verify its status says 'Online and ready to be used'.

Should I use the server name or IP address when connecting Power BI to SQL Server?

It is best practice to use the server's IP address during initial troubleshooting. If connecting via the IP address succeeds but the server name fails, your network is experiencing DNS resolution issues.