metricsign
Start free
High severityresource

Power BI Refresh Error:
701

What does this error mean?

SQL Server ran out of memory to execute the query — the memory grant could not be satisfied.

Common causes

  • 1Multiple large queries competing for memory grants simultaneously
  • 2SQL Server max server memory is set too low or not configured, leaving too little memory for queries
  • 3A single query requires an unexpectedly large sort or hash operation due to missing indexes or data skew

How to fix it

  1. 1Step 1: Check current memory pressure: SELECT * FROM sys.dm_os_memory_clerks ORDER BY pages_kb DESC; and SELECT * FROM sys.dm_exec_query_memory_grants WHERE granted_memory_kb > 100000;
  2. 2Step 2: Set max server memory appropriately (leave 10-20% for OS): EXEC sp_configure 'max server memory (MB)', 12000; RECONFIGURE;
  3. 3Step 3: Add indexes to eliminate sorts and hash joins in the failing queries: run the query in SSMS with Actual Execution Plan to identify the memory-heavy operators.

Frequently asked questions

How much memory should I leave for the OS on a SQL Server?

Leave at least 10% or 4 GB (whichever is larger) for the OS. For a 64 GB server, set max server memory to 57–58 GB.

Can error 701 occur on Azure SQL Database?

Yes — Azure SQL Database has service tier memory limits. If queries exceed the DTU or vCore memory limits, error 701 surfaces. Scale up the service tier or optimize queries.

Does Resource Governor help with error 701?

Yes — Resource Governor can cap memory grants per workload group, preventing a single workload (like ETL) from starving other workloads (like reports). Configure it under Server Objects → Resource Governor.

Official documentation: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-701-database-engine-error

Other resource errors