Release all unused cache entries from all caches.
Syntax
DBCC FREESYSTEMCACHE
('ALL' [ , pool_name ] )
[WITH [MARK_IN_USE_FOR_REMOVAL] , [NO_INFOMSGS] ]
Key:
ALL - All supported caches.
MARK_IN_USE_FOR_REMOVAL - Free up currently used cache entries asap (asynchronous).
After the DBCC FREESYSTEMCACHE WITH MARK_IN_USE_FOR_REMOVAL runs,
new entries created in the cache aren't affected.
NO_INFOMSGS - Suppress all information messages.
pool_name - Specifies a resource governor pool cache.
Only entries associated with this pool are freed.
To list the available pool names, run: SQL SELECT name FROM sys.dm_resource_governor_resource_pools;
MARK_IN_USE_FOR_REMOVAL will not prevent new entries being created in the cache.
Requires ALTER SERVER STATE permission on the server.
Release unused cache entries from a Resource Governor pool cache:
-- Clean all the caches with entries specific to the
-- resource pool named "default".
DBCC FREESYSTEMCACHE ('ALL', [default]);
Release entries from their respective caches after they become unused:
DBCC FREESYSTEMCACHE ('ALL') WITH MARK_IN_USE_FOR_REMOVAL;
“It's hard to be funny when you have to be clean” ~ Mae West
DBCC FREEPROCCACHE - Remove items from plan cache.
DBCC FREESESSIONCACHE - Flush the distributed query connection cache.