开发者

SQL Server 2008, recovering RAM memory

Is there a way to reset the memory used by SQL Server 2008 R2 to what it would be if I restarted the service? (but I don't want to restart the service)

I tried using

Checkpoint -- Write dirty pages to dis开发者_开发百科k
DBCC FreeProcCache -- Clear entire proc cache
DBCC DropCleanBuffers -- Clear entire data cache

but I always free up more memory by restarting the service.


You can use the sp_configure procedure to change the max server memory (MB) configuration setting. SQL Server will adjust to the new setting without a restart.

You should configure this setting with the desired value then leave it if you find that SQL Server is hogging memory needed by other processes.


I found the excellent webcast Mission-Critical SQLCLR, which explains that the max mem setting in SQL Server does not include memory used by SQLCLR. To find out how much memory is actually used by SQLCLR, you can run:

select * 
from sys.dm_os_memory_objects 
where [type] like '%CLR%'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜