You are here:Home » SQL Server » There is insufficient system memory in resource pool 'default' to run this query - Error in SQL Server

There is insufficient system memory in resource pool 'default' to run this query - Error in SQL Server

Backup and restore database activity is common and routine task for all DBA when need to move a database at another place. I did the same thing while needed to move a database from one server to another server. But suddenly I encountered one issue while restoring database to the destination server and it was about to memory. Earlier I posted one tip in just learned of the same memory issue, but it was for replicaion. Please visit and read this link before going ahead this post. You can see that error “There is insufficient system memory to run this query” .

Now looking here too for the error while restoring database is the same, but slightly with different statement as follows,

Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Msg 701, Level 17, State 17, Line 1
There is insufficient system memory in resource pool 'default' to run this query.


An error seems the same with different operation, but the solution is the same.

DBCC FREESESSIONCACHE
DBCC FREEPROCCACHE
DBCC DROPCLEANBUFFERS
DBCC FREESYSTEMCACHE('ALL')

This is quick solution, but I am not recommending to apply this solution because this may create an issue as it will flush all caches and may affect on performance. So it is better to find cause of memory consumption and resolve it or apply optimized way like we can increase RAM, see if any idle sessions or session with high memory usage. In an earlier post of such error with replication, received some comments which can be helpful to us. I would like you put your valuable inputs here.