Forum Discussion
Assistance Required: SQL Timeout Issue When Connecting Power BI
Hi Pavan_123456789 - Since you already loaded one month data, and you are facing issue while loading the full dataset. Below are the options you can review:
1) 80% of the times, issue will be at SQL Server end because of poor indexes, stored procedure logic, and if any blocks. Try running sp_who2 in SSMS to check if any blocks, review stored procedure logic, review indexes and query performances by using execution plans.
2) Review timeout settings in Power BI connection to SQL Server - Every time a Power BI Import mode dataset connects to a data source it goes through a Power Query query, and inside the code of that Power Query "Advanced Editor" will be an M function that connects to a specific type of data source. Most – but not all – of these M functions have the option to set timeouts. The M functions that connect to relational databases (for example Sql.Database which is used to connect to SQL Server-related sources, or Odbc.DataSource which is used to connect to ODBC sources) typically allow you to configure two types of timeout:
A connection timeout, which specifies how long to wait when trying to open a connection to the data source
A command timeout, which specifies how long the query to get data from the source is allowed to run