MS SQL ServerMS SQL Server 

How to Fix SQL Server Error – Restore Operation Failed for Database Due to Insufficient Memory in the Resource Pool ‘Default’

one fine day when working with SQL server we faced this error. the error states like below
*************************************************************************************************
Msg 41379, Level 16, State 0, Line 0
Restore operation failed for database ‘InMemoryDB’ due to insufficient memory in the resource pool ‘default’. Close other applications to increase the available memory, ensure that both SQL Server memory configuration and resource pool memory limits are correct and try again. See ‘http://go.microsoft.com/fwlink/?LinkID=507574’ for more information.
Msg 3167, Level 16, State 1, Line 2
RESTORE could not start database ‘InMemoryDB’.
Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally.
*************************************************************************************************

Solution as Follows:

Need to  increase the available memory to the default resource pool in SQL Server. The memory available to default memory pool is usually 25%. We increased that to 90% and our error was disappeared. How to Alter the Memory? Follow below steps:

ALTER RESOURCE GOVERNOR DISABLE 
GO
ALTER RESOURCE POOL "default" WITH ( MAX_MEMORY_PERCENT = 90 )  
GO 
ALTER RESOURCE GOVERNOR RECONFIGURE   
GO
Also Read:  Stored Procedure Vs Function in MS SQL Server

Related posts