How to Fix Power BI Dashboard Refresh Problems with SQL Server
Question details
The user is experiencing issues when attempting to refresh a Power BI dashboard connected to a SQL Server database.

- Product
- Power BI, SQL Server
- Device & OS
- not provided
- Scenario
- Refreshing a dataset or dashboard using SQL Server as the underlying data source.
- Observed behavior
- The data refresh operation fails, potentially due to credential errors, gateway misconfigurations, schema changes, or query timeouts.
Ensure you have access to SQL Server Management Studio (SSMS) to test your database connection and verify that your Power BI account holds the necessary permissions for the dataset.
Verify Credentials and On-Premises Data Gateway Status
Ensure that your connection to SQL Server is active and the Data Gateway is properly configured and online.
The most common cause of refresh failures is outdated database credentials or an offline On-premises Data Gateway. Verifying these settings in the Power BI Service can quickly restore your data connection.
Open the Power BI service, go to your workspace, select the dataset's settings, and check the 'Refresh history' to identify the exact error code or message.
Open SQL Server Management Studio (SSMS) on the machine hosting the gateway and attempt to log into the database using the same credentials configured in Power BI.
In the Power BI service, click the gear icon and select 'Manage gateways'. Ensure your On-premises Data Gateway is online and the status indicator is green.
Navigate to the dataset settings, expand 'Data source credentials', and click 'Edit credentials'. Re-enter your SQL Server username and password, then apply the changes.

Resolve Network, Firewall, and Timeout Issues
Fix underlying network restrictions or query performance issues that block Power BI from fetching data from SQL Server.
Check for Schema Changes and Licensing Requirements
Ensure that the underlying database structure matches your report model and your Power BI license is active.
Enhance Your Data Reporting with WPS Office
While troubleshooting database connections, you may need a reliable productivity suite to analyze exported data or present your insights. WPS Office offers a lightweight, free alternative to Microsoft Office, providing familiar interfaces for spreadsheets and presentations.
- 1. Download and install: Get WPS Office Free from the official website and follow the installation prompts.
- 2. Open exported data: Export your Power BI visuals or SQL queries to CSV format and open them instantly in WPS Spreadsheet.
- 3. Analyze and present: Use built-in charts and pivot tables to summarize data, then copy the visuals directly into WPS Presentation for your meetings.

Frequently Asked Questions
Why does my Power BI refresh timeout when connecting to SQL Server?
By default, Power BI has a query timeout limit (usually 10 minutes in the service for individual queries, or up to 2 hours for the entire dataset depending on your license). If your SQL query takes longer to execute, the refresh will fail. To fix this, optimize your SQL query in the database or increase the command timeout setting in Power BI Desktop.
Do I always need a gateway to connect Power BI to SQL Server?
If your SQL Server is hosted on-premises or on a virtual machine within a private virtual network, you must use an On-premises Data Gateway. If you are using Azure SQL Database, a gateway is generally not required unless your server is hidden behind a highly restrictive firewall.
How do I know if my On-premises Data Gateway is offline?
In the Power BI service, navigate to Settings > Manage gateways. Find your gateway cluster in the list. If it displays a red warning icon or indicates it cannot be reached, the machine hosting the gateway may be turned off, asleep, or disconnected from the network.
Can schema changes in SQL Server cause refresh failures?
Yes. If a column or table referenced in your Power BI dataset is renamed, deleted, or has its data type changed in SQL Server, Power BI will fail to refresh because Power Query can no longer find the expected data structure during the extraction process.




