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
- 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;
- 2Step 2: Set max server memory appropriately (leave 10-20% for OS): EXEC sp_configure 'max server memory (MB)', 12000; RECONFIGURE;
- 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
Official documentation: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-701-database-engine-error