Last active
October 5, 2016 17:32
-
-
Save ronascentes/a8445e3d83f9a9554b1c773b3dc7c36d to your computer and use it in GitHub Desktop.
Clearing cache and buffer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- releases all unused cache entries from all caches | |
DBCC FREESYSTEMCACHE('All') WITH NO_INFOMSGS; | |
-- flushes the distributed query connection cache used by distributed queries against an instance | |
DBCC FREESESSIONCACHE WITH NO_INFOMSGS; | |
-- manually removes a single plan or all plans from the cache | |
DBCC FREEPROCCACHE WITH NO_INFOMSGS; | |
-- clear the data buffer | |
DBCC DROPCLEANBUFFERS WITH NO_INFOMSGS; | |
-- resets the wait statistics data that your SQL Server has collected since it was last restarted | |
DBCC SQLPERF('sys.dm_os_wait_stats' , CLEAR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment