Warning : Not to be used in production env.
In Development or tsesting env its very common that during performance tuning we do clear cache to get correct picture. It may also required that only a particular db related cache should be clear. here wo go...
(a) Clear entire procedure and databuffer cache
Checkpoint -- Write dirty pages to disk
DBCC FreeProcCache -- Clear entire proc cache
DBCC DropCleanBuffers -- Clear entire data cache
(b) Clear only a particular db procedure cache using undocumented DBCC command
Declare @DBID int
Select @DBID =db_id(‘YourDBname’)
DBCC FLUSHPROCINDB(@DBID) – Undocumented dbcc command to clear only a db proc cache
Tuesday, April 1, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment