SQL SERVER – Fix : Error 701 There is insufficient system memory to run this query

Generic Solution:
Check the settings for both min server memory (MB) and max server memory (MB). If max server memory (MB) is a value close to the value of min server memory (MB), then increase the max server memory (MB) value.
Check the size of the virtual memory paging file. If possible, increase the size of the file.

For SQL Server 2005:
Install following HotFix and Restart Server.

Additionally following DBCC Commands can be ran to free memory:


Reference : Pinal Dave (https://blog.sqlauthority.com)

SQL Download, SQL Error Messages, SQL Scripts, SQL Server DBCC, SQL Server Security, SQL Stored Procedure
Previous Post
SQL SERVER – @@IDENTITY vs SCOPE_IDENTITY() vs IDENT_CURRENT – Retrieve Last Inserted Identity of Record
Next Post
SQL SERVER – Fix : Error 8101 An explicit value for the identity column in table can only be specified when a column list is used and IDENTITY_INSERT is ON

Related Posts

24 Comments. Leave new

  • Correct. Thank you Sharper for pointing out. I will edit my post to reflect it.

    Pinal Dave

  • Isn’t this hotfix for 2005?

  • This kind of error isn’t resolved by SQL Server 2005 SP2.
    I’m going to open a microsoft support case to resolve it permanently….

  • I also have this problem and I’ve applied SP2 already.
    Does anyone know if there’s a resolution?


  • Nicolas, Any resolution from microsoft. I have mssql 2005 with sp2 still having this issue, when we ran etl process

    Any update helps us a lot

  • Just want to know if the hotfix for SQL Server SP2 will solve the “There is insufficient system memory to run this query” issue.

  • Hi!

    We had exectly the same problem, on Windows 2003 32 bit & SQL 2005 SP2 with AWE enabled, when trying to make Database Integrity Check (Database size 60GB, with one hudge, 22 GB Table. Yeah, I know, it’s another problem and we are working on it :) ) there was “Error 701 There is insufficient system memory to run this query” error. After that, server was runngin slow, with strange errors in log, a lot of CLR errors and so on and the only solution was SQL Server restart. Also during working day, there were a lot of locks and sometimes the only solution was restarting the server, because killing locked processes didn’t helped.

    Yestarday I tried to manually configure Max server memory and… IT WORKS! Integrity check works on 60GB database and besides server WORKS MUCH MORE STABLE. It’s strange, but I think that there is some strange memory management error in AWE (or in something related) and it is reflected on complex operations and objects.

    I just wanted to thank you for helping with this terrible problem, SETTING MAX SERVER MEMORY WORKS FOR ME.

    P.S. the better solution is to migrate to x64 :) but it’s difficult on production server…

  • Hi, I have the same error; I really worry about it, because some process (importantant process) that run in my applications made the error when they run; it’s really important to solve this issue, I installed sp2 and the problem continue.. I also executed a disk defracmentation and the result no’t change.

    Any other idea to solve the problem…
    I really apreciate any help
    thanks in advance.


  • Hi,

    Im using Windows NT with sql server 6.5.
    now i days i facing a problem when i m going enterprise manager and open the database, sql query, or any other option its shows the error msg.

    “A Connection could not be establish to Fisher(Data base name). [SQL Server] There is insufficient system momory to run this query”.

    i change my system memory update virtual system memory.

    Kindly tell me how i resolve this problem

  • Hi!

    We had exactly the same problem, on Windows 2003 32 bit & SQL 2005 SP2 with AWE enabled… Like Gode we configure Max server memory, first day it works but now it crashes again.
    I want to ask that what was your maximum server memory, GODE?

    If anybody help us, I will be gratefull

  • Hi team,

    I am getting the same error in my sql server. Please assist me to know where do is specify the min and max server memory.

    I would be grateful to get this resolved.



  • WE are facting same problem. Is there any working solution for this? have tried everything mentioned above. Pls help.

  • Hello Parag,

    Check the value of “min memory per query” option. Default value of this option is 1024 KB. Even not recommonded but you can try a lesser value for this option. Let us know if that helped.

    Pinal Dave

  • The maximum server memory on our server is set to 2147483647 MB and our virtual memory is 2046 MB, would the maximum server memory setting cause Error 701? Do we need to set the max server memory to a realistic number?

  • @ Pinal Dave: what are the standard values?
    We have an W2k8 member server; x64 with 8 Gb physical memory; SQL 2008 and now and then (once a day) event ID 701.
    Min memory = 0 max memory = 2147483647 MB
    Min memory per query = 1024 KB

  • Hey there. First of all thank you.. I have found your site to be a great resource on a couple of instances now, and I think you have helped me again.

    Here is what I found. I have a 64 bit Windows server running 32 bit SQL 2005 (SP3)

    I think the issue here is that I have 16GB physical memory on the server. My SQL MAX memory is set to 11000 MB, and my MIN is set at 0

    I have a system PageFile that is only 4GB.

    I have SQL running with a service account, and that service account did not have the system policy of “Lock Pages in Memory”

    Seems to me that if SQL is trying to Page out to the pagefile and its all full up , i might have troubles. Makes sense to me.

  • Dear All,

    Please help me as I am suffering from the same error. We have a reporting toolthat works on the SQL2008. But it gives the same error. The memory min=0 and the max=2147483647 MB. The Minimum memory per query is 1024.

    Can anyone suggest why this occurs. Once this problem occurs I have to start the reporting toola nd also the sql express service.

    Your reply is appreciated. Thanks in advance..

  • I’ve also been thinking the very same idea myself recently. Delighted to see an individual on the same wavelength! Nice article.

  • Re: Additionally following DBCC Commands can be ran to free memory:


    How will running these fix the problem? If these are run in a production system then this can cause other performance problems. This is extremely bad advice!


  • Tanyu Elvis Shey
    March 14, 2012 5:22 pm

    Once the insufficeint memory space problem shows up, restore your system to a restore point before it occured and bam you are back in business.


Leave a Reply