Buffer cache is a part of the buffer pool which is also referred to as the data cache. The buffer cache is responsible for holding the data pages in memory which are frequently accessed by Sql Server. Alternatively data pages are read from the disk which causes high IO operations.
- DBCC DropCleanBuffers
This DBCC command clears the entire buffer cache for a give sql server instance
- DBCC FlushProcinDB (DBID)
The DBCC command clears the buffer cache for the given database
Example 1
This shows the buffer cache can be cleaned using the
DBCC FLUSHPROCINDB
SELECT * FROM sys.syscacheobjects where dbid = db_id('ADVENTUREWORKS')
GO
DBCC FLUSHPROCINDB(12)
GO
SELECT * FROM sys.syscacheobjects where dbid = db_id('ADVENTUREWORKS')
Comments
Post a Comment