Search

Showing posts with label Releasing unused memory in SQL server. Show all posts
Showing posts with label Releasing unused memory in SQL server. Show all posts

Saturday, May 12, 2012

Releasing unused memory in SQL server

As SQL Server does automatic Memory management , it means that SQL Server will ask for memory from the OS as and when it requires, and will keep it as long as it can. This is intended and a default behavior of SQL Server. The memory component (Buffer Pool) does this. So, when does SQL Server release memory back to the OS? It releases memory back to the OS when any other process will ask for memory from the OS. Despite this automatic memory management, there are 2 commands that can be used to free up memory in SQL Server.


DBCC FREEPROCCACHE :- To flush out execution plans from the procedure cache &


DBCC DROPCLEANBUFFERS :- To flush out data pages from the memory.