SQL Server Error 701 — There is insufficient system memory

There is insufficient system memory in resource pool 'X' to run this query.

SQL Server (or a specific Resource Governor pool) couldn't get the memory grant it needed. This can be a server-level configuration issue or a single poorly-optimized query demanding far more memory than it should.

Common causes

How to fix it

  1. Check current memory configuration vs. actual server RAM: sp_configure 'max server memory'.
  2. Look for queries waiting on or requesting large memory grants: SELECT * FROM sys.dm_exec_query_memory_grants.
  3. If one query is the culprit, get its execution plan and look for large sort/hash operators — often fixable with a better index that avoids the sort entirely.
  4. If Resource Governor is in use, review whether the relevant pool's MAX_MEMORY_PERCENT is too tight for real workload needs.
  5. Confirm no other applications are competing for memory on the same box, and that "Lock Pages in Memory" / OS-level settings are configured correctly for a dedicated SQL Server host.

Paste the query and its execution plan here to see exactly why it's requesting so much memory.

Try query analyzer free →

Related